diff -Nru phcpack-2.4.84/debian/changelog phcpack-2.4.85/debian/changelog --- phcpack-2.4.84/debian/changelog 2021-06-29 11:03:41.000000000 +0000 +++ phcpack-2.4.85/debian/changelog 2021-07-02 14:24:40.000000000 +0000 @@ -1,8 +1,25 @@ -phcpack (2.4.84-0ppa1~ubuntu20.04.1) focal; urgency=low +phcpack (2.4.85-0ppa2~ubuntu20.04.1) focal; urgency=low * Auto build. - -- Doug Torrance Tue, 29 Jun 2021 11:03:41 +0000 + -- Doug Torrance Fri, 02 Jul 2021 14:24:40 +0000 + +phcpack (2.4.85-0ppa2) bionic; urgency=medium + + * debian/gbp.conf + - Add PPA-specific settings for 'gbp dch'. + * debian/patches/hardening.patch + - Fix fuzz created from linking against libpython. + + -- Doug Torrance Thu, 01 Jul 2021 11:19:28 -0400 + +phcpack (2.4.85-0ppa1) bionic; urgency=medium + + * New upstream release (PPA build). + * debian/patches/use-dynamic-libs.patch + - Link against libpython; necessary for python < 3.8 (i.e., bionic). + + -- Doug Torrance Thu, 01 Jul 2021 00:05:45 -0400 phcpack (2.4.84-0ppa1) bionic; urgency=low diff -Nru phcpack-2.4.84/debian/gbp.conf phcpack-2.4.85/debian/gbp.conf --- phcpack-2.4.84/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/debian/gbp.conf 2021-07-02 14:24:37.000000000 +0000 @@ -0,0 +1,3 @@ +[dch] +debian-branch = ppa/bionic +dch-opt = ['--vendor', ' ppa'] diff -Nru phcpack-2.4.84/debian/git-build-recipe.manifest phcpack-2.4.85/debian/git-build-recipe.manifest --- phcpack-2.4.84/debian/git-build-recipe.manifest 2021-06-29 11:03:41.000000000 +0000 +++ phcpack-2.4.85/debian/git-build-recipe.manifest 2021-07-02 14:24:40.000000000 +0000 @@ -1,2 +1,2 @@ # git-build-recipe format 0.4 deb-version {debversion} -lp:~profzoom/macaulay2/+git/phcpack git-commit:4f795317d3b3b2ae15133096f9537a33f31936f6 +lp:~profzoom/macaulay2/+git/phcpack git-commit:16fe529f02f0aad9243b92d85f27dd973ea538a3 diff -Nru phcpack-2.4.84/debian/patches/fix-spelling-errors.patch phcpack-2.4.85/debian/patches/fix-spelling-errors.patch --- phcpack-2.4.84/debian/patches/fix-spelling-errors.patch 2021-06-29 11:03:11.000000000 +0000 +++ phcpack-2.4.85/debian/patches/fix-spelling-errors.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,191 +0,0 @@ -Description: Fix spelling errors -Author: Doug Torrance -Origin: https://github.com/janverschelde/PHCpack/pull/46 -Last-Update: 2021-05-19 - ---- a/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb -+++ b/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb -@@ -53,7 +53,7 @@ - i : array(1..6) of string(1..65); - - begin -- i(1):=" Symmetric lifting allows to exploit permutation symmetries in"; -+ i(1):=" Symmetric lifting allows one to exploit permutation symmetries in"; - i(2):="the tuple of Newton polytopes. A symmetric subdivision is"; - i(3):="induced by lifting the points in the same orbit up to the same"; - i(4):="height. The corresponding random coefficient start system has"; ---- a/src/Ada/Schubert/Induction/main_schubert_induction.adb -+++ b/src/Ada/Schubert/Induction/main_schubert_induction.adb -@@ -849,7 +849,7 @@ - new_line; - put_line("MENU for kind of output in Littlewood-Richardson homotopies :"); - put_line(" 0. no intermediate output will be written to file;"); -- put_line(" 1. output to file allows to monitor the progress;"); -+ put_line(" 1. output to file allows one to monitor the progress;"); - put_line(" 2. monitoring progress with extra verifying diagnostics."); - put("Type 0, 1, or 2 to select the kind of output : "); - Ask_Alternative(ans,"012"); ---- a/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb -+++ b/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb -@@ -813,10 +813,10 @@ - put(integer32(p),1); - put_line(" of " & s & " in Parse_Term."); - put_line("The character is " & s(p)); -- put_line("Surrouding characters are " & s(s'first..p+1)); -- put_line("Surrouding characters are " & s(p-3..p+1)); -- put_line("Surrouding characters are " & s(p-5..p+1)); -- put_line("Surrouding characters are " & s(p-7..p+1)); -+ put_line("Surrounding characters are " & s(s'first..p+1)); -+ put_line("Surrounding characters are " & s(p-3..p+1)); -+ put_line("Surrounding characters are " & s(p-5..p+1)); -+ put_line("Surrounding characters are " & s(p-7..p+1)); - raise; - when others => - put("Exception raised at character "); put(integer32(p),1); ---- a/src/Ada/Deformations/Solutions/standard_select_solutions.adb -+++ b/src/Ada/Deformations/Solutions/standard_select_solutions.adb -@@ -29,7 +29,7 @@ - - begin - new_line; -- put("Are the solutions preceeded by a system ? (y/n) "); -+ put("Are the solutions preceded by a system ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'y' then - bannered := true; ---- a/src/Ada/Deformations/Solutions/ts_quad.adb -+++ b/src/Ada/Deformations/Solutions/ts_quad.adb -@@ -405,7 +405,7 @@ - put_line("Reading solution list first into memory..."); - Read_Name_and_Open_File(infile); - new_line; -- put("Is the solution list preceeded by a system ? (y/n) "); -+ put("Is the solution list preceded by a system ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'n' then - get(infile,sols); fail := false; ---- a/src/Ada/Deformations/Curves/series_path_trackers.adb -+++ b/src/Ada/Deformations/Curves/series_path_trackers.adb -@@ -837,7 +837,7 @@ - begin - new_line; - put("Let us define a partition of "); put(nvr,1); -- put(" variabes, of size "); put(mhom,1); put_line(" ..."); -+ put(" variables, of size "); put(mhom,1); put_line(" ..."); - declare - res : constant Standard_Natural_Vectors.Vector(1..integer32(nvr)) - := Partitions_of_Sets_of_Unknowns_io.iget(mhom); ---- a/src/Ada/Root_Counts/Binomials/ts_binpser.adb -+++ b/src/Ada/Root_Counts/Binomials/ts_binpser.adb -@@ -239,7 +239,7 @@ - put(" give the number of equations : "); get(nq); - -- put(" give the number of variables : "); get(nv); - nv := nq + 1; -- put("-> the number of variabes is "); put(nv,1); new_line; -+ put("-> the number of variables is "); put(nv,1); new_line; - lp := new Poly_Sys'(Create_Random_Binomial_System(nq,nv)); - else - put_line("Reading a polynomial system..."); ---- a/src/Lib/phcpy2c3.c -+++ b/src/Lib/phcpy2c3.c -@@ -10481,28 +10481,28 @@ - "Returns the number of Laurent polynomials with coefficients in\n arbitrary multiprecision as stored in the systems container."}, - {"py2c_syscon_initialize_number_of_standard_polynomials", - py2c_syscon_initialize_number_of_standard_polynomials, METH_VARARGS, -- "Initialzes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_polynomials", - py2c_syscon_initialize_number_of_dobldobl_polynomials, METH_VARARGS, -- "Initialzes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_polynomials", - py2c_syscon_initialize_number_of_quaddobl_polynomials, METH_VARARGS, -- "Initialzes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_polynomials", - py2c_syscon_initialize_number_of_multprec_polynomials, METH_VARARGS, -- "Initialzes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_standard_Laurentials", - py2c_syscon_initialize_number_of_standard_Laurentials, METH_VARARGS, -- "Initialzes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_Laurentials", - py2c_syscon_initialize_number_of_dobldobl_Laurentials, METH_VARARGS, -- "Initialzes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_Laurentials", - py2c_syscon_initialize_number_of_quaddobl_Laurentials, METH_VARARGS, -- "Initialzes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_Laurentials", - py2c_syscon_initialize_number_of_multprec_Laurentials, METH_VARARGS, -- "Initialzes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, -+ "Initializes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_degree_of_standard_polynomial", - py2c_syscon_degree_of_standard_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in standard double precision.\n The index k of the polynomial is the one input argument."}, -@@ -10576,37 +10576,37 @@ - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, -- "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, -- "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, -- "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_index", - py2c_syscon_standard_Laurent_drop_variable_by_index, METH_VARARGS, -- "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_name", - py2c_syscon_standard_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_index", - py2c_syscon_dobldobl_Laurent_drop_variable_by_index, METH_VARARGS, -- "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_name", - py2c_syscon_dobldobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the double double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_index", - py2c_syscon_quaddobl_Laurent_drop_variable_by_index, METH_VARARGS, -- "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, -+ "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_name", - py2c_syscon_quaddobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, ---- a/src/doc/source/options.rst -+++ b/src/doc/source/options.rst -@@ -15,7 +15,7 @@ - leading to different random constants in each run. - As different random values give different random start systems, - this may cause differences in the solution paths and fluctuations --in the executation time. Another notable effect of generating a -+in the execution time. Another notable effect of generating a - different random constant each time is that the order of the - solutions in the list may differ. Although the same solutions - should be found with each run, a solution that appears first -@@ -991,7 +991,7 @@ - the degeneration of the given polynomial system on input such that - every input polynomial is degenerated to a product of linear factors. - --The fourth option of the ``-r`` allows to take -+The fourth option of the ``-r`` allows one to take - :index:`permutation symmetry` - into account to construct symmetric start systems. - If the start system respects the same permutation symmetry as the diff -Nru phcpack-2.4.84/debian/patches/hardening.patch phcpack-2.4.85/debian/patches/hardening.patch --- phcpack-2.4.84/debian/patches/hardening.patch 2021-06-29 11:03:11.000000000 +0000 +++ phcpack-2.4.85/debian/patches/hardening.patch 2021-07-02 14:24:37.000000000 +0000 @@ -4,218 +4,218 @@ --- a/src/Objects/makefile_unix +++ b/src/Objects/makefile_unix -@@ -97,9 +97,9 @@ - phc: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o lib2path.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecount.o -- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c -- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c -- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c -+ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syscon.c -+ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/solcon.c -+ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/phcpack.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ - $(GNATFLAGS) phctop.adb -@@ -163,10 +163,10 @@ - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_timer.adb -o $(BIN)/ts_timer - - get_clock.o: -- gcc -c $(PHCAda)/System/Basic_Timer/get_clock.c -+ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/System/Basic_Timer/get_clock.c - - get_clocks_per_sec.o: -- gcc -c $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c -+ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c - - ts_ctimer: get_clock.o get_clocks_per_sec.o - gnatmake -o $(BIN)/ts_ctimer $(INCLULIBS) ts_ctimer.adb \ -@@ -1426,19 +1426,19 @@ - DEMiCs_CFLAGS = -O3 -DNDEBUG - - inputData.o: -- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp -+ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp - - iTest.o: -- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp -+ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp - - fTest.o: -- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp -+ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp - - simplex.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp - - reltab.o: -- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp -+ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp - - mvc.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -@@ -1474,19 +1474,19 @@ - - outputData.o: - $(gpp) -O2 -Dcompilewgpp=1 \ -- -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp - - simplex4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ -- -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o - - mvc4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ -- -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o - - demicsrun4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ -- -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o - - demicsrun.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -@@ -2061,7 +2061,7 @@ - # files in feedback : - - lib.a:$(PHCAda)/../Feedback/*.c $(PHCAda)/../Feedback/*.h -- gcc -c $(PHCAda)/../Feedback/*.c -+ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/../Feedback/*.c - ar ruv lib.a dc_interpolation.o dcmplx.o poly_matrix.o\ - append_dcmatrix.o dc_inverse.o pieri_sols.o poly_smith.o\ - c2ada_dc_matrix.o dc_matrix.o poly_dcmplx.o realization.o\ -@@ -2077,7 +2077,7 @@ - get_clock.o get_clocks_per_sec.o - - feedback.o: -- gcc -c $(PHCAda)/../Feedback/feedback.c -+ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/../Feedback/feedback.c - - # Test program to test the C interface to GPU acceleration : - -@@ -3004,19 +3004,19 @@ - - parameter.o: - $(gpp) -O3 -fPIC -I$(PHCgpu)/Path/Host2 \ -- -c $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o - - lib2path_d.o: - $(gpp) -O3 -fPIC -I$(PHCLib) \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ - -I$(PHCgpu)/Path/Host2 \ -- -c $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o - - lib2path.o: - $(gpp) -O3 -fPIC -I$(PHCLib) -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ - -I$(PHCgpu)/Path/Host2 \ -- -c $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o -+ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o - - ademanypaths.o: - $(gpp) -O2 -I$(PHCLib) -I$(QD_ROOT)/include \ -@@ -3047,7 +3047,7 @@ - # Test programs for the Tasking : - - corecount.o: -- gcc -c $(PHCAda)/Tasking/corecount.c -+ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/Tasking/corecount.c - - ts_corecount: corecount.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_corecount.adb -@@ -4041,56 +4041,56 @@ - - phcpy2c3.so: parameter.o lib2path.o - /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syscon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/tabform.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/solcon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/product.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) \ - $(PHCLib)/lists_and_strings.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c -- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c -- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/celcon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/intcelcon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/scalers.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/reducers.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/sweep.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/multiplicity.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/numbtrop.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/witset.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/witsols.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/unisolvers.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/giftwrappers.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/phcpack.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/schubert.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/mapcon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/series.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/padcon.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syspool.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/jump_track.c -+ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/next_track.c -+ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp -- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp -- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp -- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp -- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o -- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp -- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o -- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ -+ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PYTHON3) -I$(PHCLib) \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ -- -I$(PHCgpu)/Path/Poly3 $(PHCLib)/phcpy2c3.c -+ -I$(PHCgpu)/Path/Poly3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/phcpy2c3.c - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -static use_c2phc -o use_c2phc_binder.adb - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb - ar ruv phcpy2c3.a *.o - ranlib phcpy2c3.a -- $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ -+ $(gpp) $(LDFLAGS) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ - -Wl,-whole-archive phcpy2c3.a -lqd -lgnat -lgnarl \ - -Wl,-no-whole-archive -lrt - +@@ -100,9 +100,9 @@ + phc: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o lib2path.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o +- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c +- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c +- $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c ++ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syscon.c ++ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/solcon.c ++ $(gpp) -O2 -Dcompilewgpp=1 -c $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/phcpack.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ + $(GNATFLAGS) phctop.adb +@@ -166,10 +166,10 @@ + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_timer.adb -o $(BIN)/ts_timer + + get_clock.o: +- gcc -c $(PHCAda)/System/Basic_Timer/get_clock.c ++ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/System/Basic_Timer/get_clock.c + + get_clocks_per_sec.o: +- gcc -c $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c ++ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c + + ts_ctimer: get_clock.o get_clocks_per_sec.o + gnatmake -o $(BIN)/ts_ctimer $(INCLULIBS) ts_ctimer.adb \ +@@ -1443,19 +1443,19 @@ + DEMiCs_CFLAGS = -O3 -DNDEBUG + + inputData.o: +- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp ++ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp + + iTest.o: +- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp ++ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp + + fTest.o: +- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp ++ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp + + simplex.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp + + reltab.o: +- $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp ++ $(gpp) $(DEMiCs_CFLAGS) -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp + + mvc.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp +@@ -1491,19 +1491,19 @@ + + outputData.o: + $(gpp) -O2 -Dcompilewgpp=1 \ +- -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp + + simplex4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ +- -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o + + mvc4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ +- -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o + + demicsrun4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ +- -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o + + demicsrun.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp +@@ -2078,7 +2078,7 @@ + # files in feedback : + + lib.a:$(PHCAda)/../Feedback/*.c $(PHCAda)/../Feedback/*.h +- gcc -c $(PHCAda)/../Feedback/*.c ++ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/../Feedback/*.c + ar ruv lib.a dc_interpolation.o dcmplx.o poly_matrix.o\ + append_dcmatrix.o dc_inverse.o pieri_sols.o poly_smith.o\ + c2ada_dc_matrix.o dc_matrix.o poly_dcmplx.o realization.o\ +@@ -2094,7 +2094,7 @@ + get_clock.o get_clocks_per_sec.o + + feedback.o: +- gcc -c $(PHCAda)/../Feedback/feedback.c ++ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/../Feedback/feedback.c + + # Test program to test the C interface to GPU acceleration : + +@@ -3021,19 +3021,19 @@ + + parameter.o: + $(gpp) -O3 -fPIC -I$(PHCgpu)/Path/Host2 \ +- -c $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o + + lib2path_d.o: + $(gpp) -O3 -fPIC -I$(PHCLib) \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ + -I$(PHCgpu)/Path/Host2 \ +- -c $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o + + lib2path.o: + $(gpp) -O3 -fPIC -I$(PHCLib) -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ + -I$(PHCgpu)/Path/Host2 \ +- -c $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o ++ -c $(CPPFLAGS) $(CXXFLAGS) $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o + + ademanypaths.o: + $(gpp) -O2 -I$(PHCLib) -I$(QD_ROOT)/include \ +@@ -3064,7 +3064,7 @@ + # Test programs for the Tasking : + + corecount.o: +- gcc -c $(PHCAda)/Tasking/corecount.c ++ gcc -c $(CPPFLAGS) $(CFLAGS) $(PHCAda)/Tasking/corecount.c + + # ts_corecount: corecount.o + # gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_corecount.adb +@@ -4065,56 +4065,56 @@ + + phcpy2c3.so: parameter.o lib2path.o + /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syscon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/tabform.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/solcon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/product.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) \ + $(PHCLib)/lists_and_strings.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c +- $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c +- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/celcon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/intcelcon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/scalers.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/reducers.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/sweep.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/multiplicity.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/numbtrop.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/witset.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/witsols.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/unisolvers.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/giftwrappers.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/phcpack.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/schubert.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/mapcon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/series.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/padcon.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/syspool.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/jump_track.c ++ $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(CPPFLAGS) $(CXXFLAGS) $(PHCLib)/next_track.c ++ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp +- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp +- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp +- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp +- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o +- $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp +- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o +- $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ ++ $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PYTHON3) -I$(PHCLib) \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ +- -I$(PHCgpu)/Path/Poly3 $(PHCmod)/phcpy2c3.c ++ -I$(PHCgpu)/Path/Poly3 $(CPPFLAGS) $(CXXFLAGS) $(PHCmod)/phcpy2c3.c + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -static use_c2phc -o use_c2phc_binder.adb + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb + ar ruv phcpy2c3.a *.o + ranlib phcpy2c3.a +- $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ ++ $(gpp) $(LDFLAGS) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ + -Wl,-whole-archive phcpy2c3.a -lqd -lgnat -lgnarl \ + -Wl,-no-whole-archive -lrt $(shell python3-config --libs) + diff -Nru phcpack-2.4.84/debian/patches/series phcpack-2.4.85/debian/patches/series --- phcpack-2.4.84/debian/patches/series 2021-06-29 11:03:11.000000000 +0000 +++ phcpack-2.4.85/debian/patches/series 2021-07-02 14:24:37.000000000 +0000 @@ -2,4 +2,3 @@ use-imgmath.patch manpage.patch hardening.patch -fix-spelling-errors.patch diff -Nru phcpack-2.4.84/debian/patches/use-dynamic-libs.patch phcpack-2.4.85/debian/patches/use-dynamic-libs.patch --- phcpack-2.4.84/debian/patches/use-dynamic-libs.patch 2021-06-29 11:03:11.000000000 +0000 +++ phcpack-2.4.85/debian/patches/use-dynamic-libs.patch 2021-07-02 14:24:37.000000000 +0000 @@ -6,22 +6,24 @@ --- a/src/Objects/makefile_unix +++ b/src/Objects/makefile_unix -@@ -109,7 +109,7 @@ - parameter.o lib2path.o corecount.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o \ -- lib.a $(QD_LIB)/libqd.a \ -+ lib.a -lqd \ - get_clock.o get_clocks_per_sec.o \ - -o $(BIN)/phc -lm --LINK=$(gpp) - -@@ -4083,8 +4083,7 @@ - ar ruv phcpy2c3.a *.o - ranlib phcpy2c3.a - $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ -- -Wl,-whole-archive phcpy2c3.a $(QD_LIB)/libqd.a \ -- $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ -+ -Wl,-whole-archive phcpy2c3.a -lqd -lgnat -lgnarl \ - -Wl,-no-whole-archive -lrt - - # phcpy2c with double version of Path library : +@@ -112,7 +112,7 @@ + parameter.o lib2path.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o \ +- lib.a $(QD_LIB)/libqd.a \ ++ lib.a -lqd \ + get_clock.o get_clocks_per_sec.o \ + -o $(BIN)/phc -lm --LINK=$(gpp) + +@@ -4115,9 +4115,8 @@ + ar ruv phcpy2c3.a *.o + ranlib phcpy2c3.a + $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ +- -Wl,-whole-archive phcpy2c3.a $(QD_LIB)/libqd.a \ +- $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ +- -Wl,-no-whole-archive -lrt ++ -Wl,-whole-archive phcpy2c3.a -lqd -lgnat -lgnarl \ ++ -Wl,-no-whole-archive -lrt $(shell python3-config --libs) + + # phcpy2c with double version of Path library : + diff -Nru phcpack-2.4.84/src/Ada/Components/components.gpr phcpack-2.4.85/src/Ada/Components/components.gpr --- phcpack-2.4.84/src/Ada/Components/components.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/components.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,13 @@ +aggregate project components is + + for Project_Files use + ( + "Samplers/samplers.gpr", -- witness sets + "Interpolators/interpolators.gpr", -- equations for components + "Factorization/factorization.gpr", -- the absolute factorization + "Decomposition/decomposition.gpr", -- cascade homotopies + "Solver/solver.gpr", -- equation-by-equation solver + "Tropical/tropical.gpr" -- tropical view on witness sets + ); + +end components; diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/decomposition.gpr phcpack-2.4.85/src/Ada/Components/Decomposition/decomposition.gpr --- phcpack-2.4.84/src/Ada/Components/Decomposition/decomposition.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/decomposition.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,75 @@ +project decomposition is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Stalift", "../../Root_Counts/MixedVol", + "../../Root_Counts/Dynlift", "../../Root_Counts/Implift", + "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Factorization", + "../../Tasking", "../../Main", "../../CtoPHC/State"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Stalift", "../../Root_Counts/MixedVol", + "../../Root_Counts/Dynlift", "../../Root_Counts/Implift", + "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Factorization", + "../../Tasking", "../../Main", "../../CtoPHC/State"); + for Excluded_Source_Files use + ("corecount.c", "zero_index_tree.c", "index_tree_lp.c", + "relation_table.c", "prepare_for_mv.c", "one_level_lp.c", + "mv.c", "mixed_volume.c", "form_lp.c", "cell_stack.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_irdeco.adb", -- tests witness generate and classify + -- "ts_diahom.adb", -- tests diagonal homotopies + "ts_intdia.adb", -- tests intersect varieties intrinsically + "ts_jmpdia.adb", -- tests jumpstarting diagonal homotopies + "ts_dimred.adb", -- tests dimension determination + "ts_breakup.adb", -- tests breaking up components + "ts_witsols.adb", -- tests witness solutions + "ts_cascade.adb" -- tests the cascade homotopy + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end decomposition; diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/drivers_to_component_creators.adb phcpack-2.4.85/src/Ada/Components/Decomposition/drivers_to_component_creators.adb --- phcpack-2.4.84/src/Ada/Components/Decomposition/drivers_to_component_creators.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/drivers_to_component_creators.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,230 +0,0 @@ -with integer_io; use integer_io; -with Communications_with_User; use Communications_with_User; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Natural_Vectors; -with Sampling_Machine; -with Interpolation_Filters; use Interpolation_Filters; -with Span_of_Component; use Span_of_Component; -with Irreducible_Components; use Irreducible_Components; -with Drivers_for_Poly_Continuation; use Drivers_for_Poly_Continuation; - -package body Drivers_to_Component_Creators is - - procedure Display_Filter_Settings - ( file : in file_type; full_output : in boolean; - stoptol,membtol : in double_float ) is - begin - new_line(file); - put_line(file,"Current settings in the filter creator :"); - put(file," 1. tolerance for stop test : "); put(file,stoptol,3); - new_line(file); - put(file," 2. tolerance for membership : "); put(file,membtol,3); - new_line(file); - put(file," 3. full intermediate output : "); - if full_output - then put_line(file," yes"); - else put_line(file," no, only summary"); - end if; - end Display_Filter_Settings; - - procedure Standard_Tuner - ( file : in file_type; full_output : in out boolean; - stoptol,membtol : in out double_float ) is - - ans : character; - oc : natural; - - begin - loop - Display_Filter_Settings(Standard_Output,full_output,stoptol,membtol); - put("Type 0 to exit, 1,2 or 3 to change : "); - Ask_Alternative(ans,"0123"); - exit when (ans = '0'); - case ans is - when '1' => put("Give new tolerance for stop test : "); - get(stoptol); - when '2' => put("Give new tolerance for membership : "); - get(membtol); - when '3' => full_output := not full_output; - when others => null; - end case; - end loop; - Display_Filter_Settings(file,full_output,stoptol,membtol); - new_line; - Sampling_Machine.Interactive_Tune_Sampler(file); - -- Sampling_Machine.Default_Tune_Sampler(2); - Sampling_Machine.Interactive_Tune_Refiner(file); - if full_output - then new_line; - Driver_for_Process_io(file,oc); - end if; - end Standard_Tuner; - - procedure Multprec_Tuner - ( file : in file_type; full_output : in out boolean; - size : in natural; stoptol,membtol : in out double_float ) is - - ans : character; - oc : natural; - - begin - loop - Display_Filter_Settings(Standard_Output,full_output,stoptol,membtol); - put("Type 0 to exit, 1,2 or 3 to change : "); - Ask_Alternative(ans,"0123"); - exit when (ans = '0'); - case ans is - when '1' => put("Give new tolerance for stop test : "); - get(stoptol); - when '2' => put("Give new tolerance for membership : "); - get(membtol); - when '3' => full_output := not full_output; - when others => null; - end case; - end loop; - Display_Filter_Settings(file,full_output,stoptol,membtol); - new_line; - Sampling_Machine.Interactive_Tune_Sampler(file); - -- Sampling_Machine.Default_Tune_Sampler(2); - Sampling_Machine.Default_Tune_Refiner; - Sampling_Machine.Interactive_Tune_Refiner(file,size); - if full_output - then new_line; - Driver_for_Process_io(file,oc); - end if; - end Multprec_Tuner; - - function Cardinality ( v : Standard_Natural_Vectors.Vector ) - return natural is - - -- DESCRIPTION : - -- Returns the number of nonzero entries in the vector v. - - res : natural := 0; - - begin - for i in v'range loop - if v(i) = 0 - then return res; - else res := res+1; - end if; - end loop; - return res; - end Cardinality; - - procedure Write_Labels ( file : in file_type; - g : in Standard_Natural_Vectors.Link_to_Vector ) is - - use Standard_Natural_Vectors; - card : natural; - - begin - if g /= null then - card := Cardinality(g.all); - put(file," contains "); - put(file,card,1); - if card = 1 - then put(file," generic point"); - else put(file," generic points"); - end if; - for i in 1..card loop - put(file," "); - put(file,g(i),1); - end loop; - put_line(file,"."); - end if; - end Write_Labels; - - procedure Write_Summary - ( file : in file_type; k : in natural; - deco : in Standard_Irreducible_Component_List ) is - - len : constant natural := Length_Of(deco); - tmp : Standard_Irreducible_Component_List := deco; - sum : natural := 0; - - begin - put(file,"Found "); put(file,len,1); - if len = 1 - then put(file," irreducible component"); - else put(file," irreducible components"); - end if; - put(file," of dimension "); - put(file,k,1); - put_line(file," :"); - for i in 1..len loop - put(file," Component "); put(file,i,1); - declare - c : constant Standard_Irreducible_Component := Head_Of(tmp); - dc : constant natural := Degree(c); - f : constant Standard_Filter := Filter(c); - df : constant natural := Degree(f); - s : constant Standard_Span := Span(c); - begin - put(file," has degree "); put(file,dc,1); - if df > 0 and df < dc - then put(file,"(="); put(file,df,1); - put(file,"+"); put(file,dc-df,1); - put(file,")"); - end if; - if Empty(s) - then put_line(file,";"); - else put(file," and spans space of dimension "); - put(file,Dimension(s),1); put_line(file,";"); - end if; - Write_Labels(file,Labels(c)); - sum := sum + dc; - end; - tmp := Tail_Of(tmp); - end loop; - put(file,"The sum of the degrees is "); put(file,sum,1); - put_line(file,"."); - end Write_Summary; - - procedure Write_Summary - ( file : in file_type; k : in natural; - deco : in Multprec_Irreducible_Component_List ) is - - len : constant natural := Length_Of(deco); - tmp : Multprec_Irreducible_Component_List := deco; - sum : natural := 0; - - begin - put(file,"Found "); put(file,len,1); - if len = 1 - then put(file," irreducible component"); - else put(file," irreducible components"); - end if; - put(file," of dimension "); - put(file,k,1); - put_line(file," :"); - for i in 1..len loop - put(file," Component "); put(file,i,1); - declare - c : constant Multprec_Irreducible_Component := Head_Of(tmp); - dc : constant natural := Degree(c); - f : constant Multprec_Filter := Filter(c); - df : constant natural := Degree(f); - s : constant Multprec_Span := Span(c); - begin - put(file," has degree "); put(file,dc,1); - if df > 0 and df < dc - then put(file,"(="); put(file,df,1); - put(file,"+"); put(file,dc-df,1); - put(file,")"); - end if; - if Empty(s) - then put_line(file,";"); - else put(file," and spans space of dimension "); - put(file,Dimension(s),1); put_line(file,";"); - end if; - Write_Labels(file,Labels(c)); - sum := sum + dc; - end; - tmp := Tail_Of(tmp); - end loop; - put(file,"The sum of the degrees is "); put(file,sum,1); - put_line(file,"."); - end Write_Summary; - -end Drivers_to_Component_Creators; diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/drivers_to_component_creators.ads phcpack-2.4.85/src/Ada/Components/Decomposition/drivers_to_component_creators.ads --- phcpack-2.4.84/src/Ada/Components/Decomposition/drivers_to_component_creators.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/drivers_to_component_creators.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -with text_io; use text_io; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Irreducible_Component_Lists; use Irreducible_Component_Lists; - -package Drivers_to_Component_Creators is - --- DESCRIPTION : --- This package contains facilities to tune the parameters and to --- write the final summary of the breakup of an equidimensional --- solution set into irreducible components. - - procedure Display_Filter_Settings - ( file : in file_type; full_output : in boolean; - stoptol,membtol : in double_float ); - - -- DESCRIPTION : - -- Displays the current settings of the filter. - - -- ON ENTRY : - -- file if Standard_Output, then display will be on screen, - -- otherwise, the settings are written to the file; - -- full_output is flag to indicate whether all intermediate diagnostics - -- of the sampling need to be written, or just a summary; - -- stoptol tolerance to stop interpolating in the filter construction; - -- membtol tolerance to decide membership of any point to component. - - procedure Standard_Tuner - ( file : in file_type; full_output : in out boolean; - stoptol,membtol : in out double_float ); - procedure Multprec_Tuner - ( file : in file_type; full_output : in out boolean; - size : in natural; stoptol,membtol : in out double_float ); - - -- DESCRIPTION : - -- Given default values for tolerances of stop and membership test, - -- this routine allows interactive tuning. - - procedure Write_Summary - ( file : in file_type; k : in natural; - deco : in Standard_Irreducible_Component_List ); - procedure Write_Summary - ( file : in file_type; k : in natural; - deco : in Multprec_Irreducible_Component_List ); - - -- DESCRIPTION : - -- Writes a summary of the list of irreducible components on file. - -end Drivers_to_Component_Creators; diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/READ_ME phcpack-2.4.85/src/Ada/Components/Decomposition/READ_ME --- phcpack-2.4.84/src/Ada/Components/Decomposition/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -A Numerical Irreducible Decomposition with PHCv2.4.83 +A Numerical Irreducible Decomposition with PHCv2.4.85 This directory is entirely new in release 2.1 and contains homotopies to compute witness points on all positive dimensional solution components. @@ -9,6 +9,11 @@ under development and is improved in release 2.2. The binomial solver was added as an option to phc -c in release 2.3.70. +Run "gprbuild decomposition.gpr" to make all test programs. +On windows, type "gprbuild decomposition.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean decomposition.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/ts_dimred.adb phcpack-2.4.85/src/Ada/Components/Decomposition/ts_dimred.adb --- phcpack-2.4.84/src/Ada/Components/Decomposition/ts_dimred.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/ts_dimred.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,7 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_Numbers; use Standard_Complex_Numbers; with Standard_Random_Numbers; use Standard_Random_Numbers; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; @@ -50,7 +52,7 @@ new_line; put_line("Reading the name of the output file."); Read_Name_and_Create_File(file); - put(file,lp'length,1); + put(file,integer32(lp'length),1); new_line(file); put(file,lp.all); declare diff -Nru phcpack-2.4.84/src/Ada/Components/Decomposition/UPDATES phcpack-2.4.85/src/Ada/Components/Decomposition/UPDATES --- phcpack-2.4.84/src/Ada/Components/Decomposition/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Decomposition/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,6 @@ +Fri 11 Jun 2021 : fixed ts_dimred.adb, defined decomposition.gpr to + build the test procedures. + Thu 3 Dec 2020 : moved maindeco to the package main_decomposition. Sun 8 Nov 2020 : updated maindeco.adb, drivers_to_cascade_filtering.adb, diff -Nru phcpack-2.4.84/src/Ada/Components/Factorization/factorization.gpr phcpack-2.4.85/src/Ada/Components/Factorization/factorization.gpr --- phcpack-2.4.84/src/Ada/Components/Factorization/factorization.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Factorization/factorization.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,67 @@ +project factorization is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Decomposition", + "../../Tasking", "../../Main", "../../CtoPHC/State"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Decomposition", + "../../Tasking", "../../Main", "../../CtoPHC/State"); + for Excluded_Source_Files use ("corecount.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_irco.adb", -- tests irreducible components + -- "ts_rwpoly.adb", -- tests rewriting + "ts_combfac.adb", -- tests combinatorial factorization + "ts_mbthom.adb", -- tests the homotopy membership test + "ts_factor.adb", -- tests factorization of one polynomial + "ts_hypfac.adb", -- test on factoring hypersurfaces + "ts_newfac.adb", -- calls monodromy component breakup routines + -- "ts_ifactor.adb", -- tests factorization in intrinsic coordinates + "ts_serwit.adb" -- tests series developments on curves + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end factorization; diff -Nru phcpack-2.4.84/src/Ada/Components/Factorization/READ_ME phcpack-2.4.85/src/Ada/Components/Factorization/READ_ME --- phcpack-2.4.84/src/Ada/Components/Factorization/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Factorization/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Factorization into Irreducible Components with PHCv2.4.84 +Factorization into Irreducible Components with PHCv2.4.85 This directory is entirely new in release 2.1. Changes in release 2.2: * random polynomials are now in Math_Lib/Polynomials; @@ -14,6 +14,11 @@ A particular case is the factorization of multivariate polynomials, which is now directly accessible from the black-box solver. +Run "gprbuild factorization.gpr" to make all test programs. +On windows, type "gprbuild factorization.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean factorization.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Factorization/UPDATES phcpack-2.4.85/src/Ada/Components/Factorization/UPDATES --- phcpack-2.4.84/src/Ada/Components/Factorization/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Factorization/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +Fri 11 Jun 2021 : defined factorization.gpr to build all test procedures. + Wed 17 Feb 2021 : updated main_factorization for the removal of mainfilt. Fri 4 Dec 2020 : moved mainfac into the new package main_factorization. diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/interpolators.gpr phcpack-2.4.85/src/Ada/Components/Interpolators/interpolators.gpr --- phcpack-2.4.84/src/Ada/Components/Interpolators/interpolators.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/interpolators.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,68 @@ +project interpolators is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry", + "../Samplers"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry", + "../Samplers"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_span.adb", -- tests the span + "ts_nbterms.adb", -- number of terms of dense polynomials + "ts_stpolin.adb", -- tests standard arithmetic interpolation + "ts_mupolin.adb", -- tests multi-precision interpolation + "ts_adpolin.adb", -- interpolation with adaptive precision + "ts_divdif.adb", -- tests Newton interpolation + "ts_dvdexp.adb", -- experiment on conditioning/stability + "ts_powtrc.adb", -- tests Newton identities + "ts_newint.adb", -- tests the direct Newton interpolators + "ts_traces.adb", -- tests trace interpolation + "ts_trapol.adb", -- tests trace interpolators for one poly + "ts_project.adb", -- tests linear and central projectors + "ts_filter.adb" -- tests the filter + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end interpolators; diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/READ_ME phcpack-2.4.85/src/Ada/Components/Interpolators/READ_ME --- phcpack-2.4.84/src/Ada/Components/Interpolators/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Interpolation module for solution components with PHCv2.4.01 +Interpolation module for solution components with PHCv2.4.85 The interpolation routines constitute a separate module. Three approaches have been studied and implemented : @@ -16,6 +16,11 @@ The span of a component is needed to ensure the number of central points in the projector, but is otherwise not an essential part of the filter. +Run "gprbuild interpolators.gpr" to make all test programs. +On windows, type "gprbuild interpolators.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean interpolators.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/ts_divdif.adb phcpack-2.4.85/src/Ada/Components/Interpolators/ts_divdif.adb --- phcpack-2.4.84/src/Ada/Components/Interpolators/ts_divdif.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/ts_divdif.adb 2021-06-30 23:22:40.000000000 +0000 @@ -40,7 +40,8 @@ with Rectangular_Sample_Grids; use Rectangular_Sample_Grids; with Standard_Stacked_Sample_Grids; with Multprec_Stacked_Sample_Grids; -with Drivers_to_Grid_Creators; use Drivers_to_Grid_Creators; +--with Drivers_to_Grid_Creators; use Drivers_to_Grid_Creators; +with Make_Sample_Grids; use Make_Sample_Grids; with Divided_Differences; with Standard_Divided_Differences; with QuadDobl_Divided_Differences; diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/ts_dvdexp.adb phcpack-2.4.85/src/Ada/Components/Interpolators/ts_dvdexp.adb --- phcpack-2.4.84/src/Ada/Components/Interpolators/ts_dvdexp.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/ts_dvdexp.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; @@ -28,7 +32,7 @@ with Standard_Homotopy; with Standard_Complex_Solutions; with Continuation_Parameters; -with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; +with Standard_IncFix_Continuation; use Standard_IncFix_Continuation; with Standard_Polynomial_Interpolators; with Multprec_Polynomial_Interpolators; with Witness_Sets; use Witness_Sets; @@ -96,9 +100,9 @@ end Set_Constant_to_One; procedure Generate_Test_Standard_Polynomial - ( file : in file_type; d,cff : in natural; + ( file : in file_type; d,cff : in natural32; p : out Standard_Complex_Polynomials.Poly; - m : out natural ) is + m : out natural32 ) is -- DESCRIPTION : -- Generates a test polynomial and writes this on file. @@ -164,8 +168,8 @@ end Add_Slice; procedure Write_Summary - ( file : in file_type; - sols : in Standard_Complex_Solutions.Solution_List; + -- ( file : in file_type; + ( sols : in Standard_Complex_Solutions.Solution_List; maxerr,minrco,maxres : out double_float ) is -- DESCRIPTION : @@ -217,9 +221,10 @@ epsxa : constant double_float := 1.0E-13; epsfa : constant double_float := 1.0E-13; tolsing : constant double_float := 1.0E-8; - numit : natural := 0; - max : constant natural := 5; + numit : natural32 := 0; + max : constant natural32 := 5; maxerr,minrco,maxres : double_float; + deflate : boolean := false; procedure Continue is new Silent_Continue(Max_Norm,Standard_Homotopy.Eval, @@ -229,9 +234,10 @@ Start_System(sys,q,sols); Standard_Homotopy.Create(sys,q,2,Random1); Continuation_Parameters.Tune(2); - Continue(sols,false,Create(1.0)); - Silent_Root_Refiner(sys,sols,epsxa,epsfa,tolsing,numit,max,false); - Write_Summary(file,sols,maxerr,minrco,maxres); + Continue(sols,false); -- ,Create(1.0)); + Silent_Root_Refiner(sys,sols,epsxa,epsfa,tolsing,numit,max,deflate); + -- Write_Summary(file,sols,maxerr,minrco,maxres); + Write_Summary(sols,maxerr,minrco,maxres); put(file,"GP Max err :"); put(file,maxerr,3); put(file," Min rco :"); put(file,minrco,3); put(file," Max res :"); put(file,maxres,3); new_line(file); @@ -258,21 +264,21 @@ -- ON RETURN : -- grid grid of samples. - lhyp : Standard_Complex_Vectors.Link_to_Vector + lhyp : constant Standard_Complex_Vectors.Link_to_Vector := new Standard_Complex_Vectors.Vector'(hyp); - sli : Standard_Complex_VecVecs.VecVec(1..1) := (1..1 => lhyp); - sps : Standard_Sample_List := Create(sols,sli); + sli : constant Standard_Complex_VecVecs.VecVec(1..1) := (1..1 => lhyp); + sps : constant Standard_Sample_List := Create(sols,sli); begin Sampling_Machine.Initialize(sys); Sampling_Machine.Default_Tune_Sampler(2); Sampling_Machine.Default_Tune_Refiner; - grid := Create1(sps,grid'last); + grid := Create1(sps,natural32(grid'last)); Sampling_Machine.Clear; end Create_Standard_Sample_Grid; procedure Create_Multprec_Sample_Grid - ( file : in file_type; size : in natural; + ( file : in file_type; size : in natural32; sys : Standard_Complex_Poly_Systems.Poly_Sys; embsys : Standard_Complex_Poly_Systems.Poly_Sys; hyp : in Standard_Complex_Vectors.Vector; @@ -291,8 +297,8 @@ -- ON RETURN : -- grid grid of samples. - sli : Standard_Complex_VecVecs.VecVec := Slices(embsys,1); - sps : Standard_Sample_List := Create(sols,sli); + sli : constant Standard_Complex_VecVecs.VecVec := Slices(embsys,1); + sps : constant Standard_Sample_List := Create(sols,sli); mpsys : Multprec_Complex_Poly_Systems.Poly_Sys(1..2); begin @@ -300,7 +306,7 @@ Sampling_Machine.Initialize(embsys,mpsys,1,size); Sampling_Machine.Default_Tune_Sampler(2); Sampling_Machine.Default_Tune_Refiner; - grid := Create1(sps,grid'last,size); + grid := Create1(sps,natural32(grid'last),size); Sampling_Machine.Clear; end Create_Multprec_Sample_Grid; @@ -363,7 +369,7 @@ maxres : double_float; begin - q := Create(grid,Create(0)); + q := Create(grid,Create(integer32(0))); eq := Create(q); exp := Expand(eq); tmp := Maximal_Error(q,grid); maxres := Round(tmp); Clear(tmp); @@ -428,14 +434,14 @@ end Multprec_Direct_Interpolate; procedure Standard_Experiment - ( file : in file_type; d,cff : in natural; - restab : out Matrix ) is + ( file : in file_type; d : in integer32; + cff : in natural32; restab : out Matrix ) is -- DESCRIPTION : -- Performs the comparison Newton versus direct with standard arithmetic. dense,nip,dip : Standard_Complex_Polynomials.Poly; - nbmon : natural; + nbmon : natural32; sys : Standard_Complex_Poly_Systems.Poly_Sys(1..2); sols : Standard_Complex_Solutions.Solution_List; hyp : Standard_Complex_Vectors.Vector(0..2); @@ -444,7 +450,7 @@ begin Add_Symbols; - Generate_Test_Standard_Polynomial(file,d,cff,dense,nbmon); + Generate_Test_Standard_Polynomial(file,natural32(d),cff,dense,nbmon); restab(d,1) := double_float(nbmon); Generic_Points(file,dense,sys,sols,hyp); Create_Standard_Sample_Grid(file,sys,hyp,sols,grid); @@ -503,8 +509,8 @@ end Embed; procedure Multprec_Experiment - ( file : in file_type; d,cff,size : in natural; - restab : out Matrix ) is + ( file : in file_type; d : in integer32; + cff,size : in natural32; restab : out Matrix ) is -- DESCRIPTION : -- Performs the comparison Newton versus direct with multi-precision @@ -512,7 +518,7 @@ stdense : Standard_Complex_Polynomials.Poly; mpdense,nip,dip : Multprec_Complex_Polynomials.Poly; - nbmon : natural; + nbmon : natural32; sys : Standard_Complex_Poly_Systems.Poly_Sys(1..2); embsys : Standard_Complex_Poly_Systems.Poly_Sys(1..3); sols,embsols : Standard_Complex_Solutions.Solution_List; @@ -523,7 +529,7 @@ begin Add_Symbols; - Generate_Test_Standard_Polynomial(file,d,cff,stdense,nbmon); + Generate_Test_Standard_Polynomial(file,natural32(d),cff,stdense,nbmon); restab(d,1) := double_float(nbmon); Generic_Points(file,stdense,sys,sols,hyp); Embed(sys,sols,embsys,embsols); @@ -585,7 +591,7 @@ "--------------------------------------------------------------"); for i in restab'range(1) loop put(file,i,3); put(file," "); - put(file,integer(restab(i,1)),4); put(file," "); + put(file,integer32(restab(i,1)),4); put(file," "); put(file,restab(i,2),2,3,0); put(file," "); put(file,restab(i,3),2,3,0); put(file," "); put(file,restab(i,4),2,3,0); new_line(file); @@ -597,7 +603,8 @@ procedure Main is file : file_type; - d1,d2,cff,deci,size : natural; + cff,deci,size : natural32; + d1,d2 : integer32; begin new_line; @@ -621,21 +628,22 @@ new_line; put("Give the number of decimal places (<= 16 is standard) : "); get(deci); - if deci > 16 - then size := Decimal_to_Size(deci); - Sampling_Machine.Interactive_Tune_Refiner(size); - new_line; - put_line("See the output file for results..."); - new_line; - for d in d1..d2 loop - Multprec_Experiment(file,d,cff,size,restab); - end loop; - else new_line; - put_line("See the output file for results..."); - new_line; - for d in d1..d2 loop - Standard_Experiment(file,d,cff,restab); - end loop; + if deci > 16 then + size := Decimal_to_Size(deci); + Sampling_Machine.Interactive_Tune_Refiner(size); + new_line; + put_line("See the output file for results..."); + new_line; + for d in d1..d2 loop + Multprec_Experiment(file,d,cff,size,restab); + end loop; + else + new_line; + put_line("See the output file for results..."); + new_line; + for d in d1..d2 loop + Standard_Experiment(file,d,cff,restab); + end loop; end if; Write_Results(file,restab); end; diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/ts_powtrc.adb phcpack-2.4.85/src/Ada/Components/Interpolators/ts_powtrc.adb --- phcpack-2.4.84/src/Ada/Components/Interpolators/ts_powtrc.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/ts_powtrc.adb 2021-06-30 23:22:40.000000000 +0000 @@ -37,7 +37,7 @@ with QuadDobl_Durand_Kerner; use QuadDobl_Durand_Kerner; with Witness_Sets,Witness_Sets_io; use Witness_Sets,Witness_Sets_io; with Rectangular_Sample_Grids; use Rectangular_Sample_Grids; -with Drivers_to_Grid_Creators; use Drivers_to_Grid_Creators; +with Make_Sample_Grids; use Make_Sample_Grids; with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; with Multprec_Floating_Numbers_io; use Multprec_Floating_Numbers_io; with Multprec_Complex_Numbers; diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/ts_traces.adb phcpack-2.4.85/src/Ada/Components/Interpolators/ts_traces.adb --- phcpack-2.4.84/src/Ada/Components/Interpolators/ts_traces.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/ts_traces.adb 2021-06-30 23:22:40.000000000 +0000 @@ -65,7 +65,7 @@ with QuadDobl_Sample_Points; use QuadDobl_Sample_Points; with QuadDobl_Sample_Lists; use QuadDobl_Sample_Lists; with Witness_Sets,Witness_Sets_io; use Witness_Sets,Witness_Sets_io; -with Drivers_to_Grid_Creators; use Drivers_to_Grid_Creators; +with Make_Sample_Grids; use Make_Sample_Grids; with Standard_Stacked_Sample_Grids; with DoblDobl_Stacked_Sample_Grids; with QuadDobl_Stacked_Sample_Grids; diff -Nru phcpack-2.4.84/src/Ada/Components/Interpolators/UPDATES phcpack-2.4.85/src/Ada/Components/Interpolators/UPDATES --- phcpack-2.4.84/src/Ada/Components/Interpolators/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Interpolators/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Fri 11 Jun 2021 : updated ts_divdif.adb, ts_powtrc.adb, ts_traces.adb, + and ts_dvdexp.adb for compiler errors. Defined interpolators.gpr to + build all test procedures. + Sat 19 Sep 2015 : in {dobldobl,quaddobl}_trace_interpolators.adb, bug fix in the normalize of a polynomial, changed tuning in ts_traces.adb. The test ts_trapol.adb must use the new standard_lined_hypersurfaces. diff -Nru phcpack-2.4.84/src/Ada/Components/READ_ME phcpack-2.4.85/src/Ada/Components/READ_ME --- phcpack-2.4.84/src/Ada/Components/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,9 @@ -Treatment and representation of solution components with PHCv2.4.82 +Treatment and representation of solution components with PHCv2.4.85. + +Run "gprbuild components.gpr" to make all test programs. +On windows, type "gprbuild components.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean components.gpr" removes all files created by gprbuild. This directory was new in release 2.1 and under continueing development. Release 2.2 offered a blackbox factorization for multivariate polynomials, @@ -16,11 +21,11 @@ The organization of the library is organized as follows: Components : 5. numerical irreducible decomposition - |-- Samplers : 5.1 computing witness points + |-- Samplers : 5.1 witness sets |-- Interpolators : 5.2 finding equations for components |-- Factorization : 5.3 factorization into irreducible components - |-- Decomposition : 5.4 sequence of homotopies to filter and factor - |-- Solver : 5.5 incremental equation by equation solver + |-- Decomposition : 5.4 cascade homotopies to filter and factor + |-- Solver : 5.5 equation-by-equation solver |-- Tropical : 5.6 tropical view on witness sets The goal of the numerical irreducible decomposition is to decompose the diff -Nru phcpack-2.4.84/src/Ada/Components/Samplers/READ_ME phcpack-2.4.85/src/Ada/Components/Samplers/READ_ME --- phcpack-2.4.84/src/Ada/Components/Samplers/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Samplers/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Sampling module for positive dimensional solution components with PHCv2.4.82 +Sampling module for positive dimensional solution components with PHCv2.4.85 This directory is entirely new in release 2.1, with no changes in release 2.2. Intrinsic samplers were added in release 2.3. @@ -15,6 +15,11 @@ Samplers in double double and quad double arithmetic were added in version 2.3.87 of PHCpack. +Run "gprbuild samplers.gpr" to make all test programs. +On windows, type "gprbuild samplers.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean samplers.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Samplers/samplers.gpr phcpack-2.4.85/src/Ada/Components/Samplers/samplers.gpr --- phcpack-2.4.84/src/Ada/Components/Samplers/samplers.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Samplers/samplers.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,75 @@ +project samplers is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Symmetry"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_planes.adb", -- tests manipulating planes + "ts_flag.adb", -- tests formats of flags + "ts_coords.adb", -- tests representations of witness points + "ts_square.adb", -- tests making polynomial systems square + "ts_embed.adb", -- tests embedding a polynomial system + "ts_squemb.adb", -- tests squaring and embedding + "ts_locdim.adb", -- attempt at a local dimension test + "ts_iddnewt.adb", -- tests {dobl,quad}dobl intrinsic Newton + "ts_ispan.adb", -- tests determining linear span + "ts_iwset.adb", -- convert to intrinsic witness sets + -- "ts_inewt.adb", -- tests intrinsic Newton's method + -- "ts_itrack.adb", -- tests intrinsic path trackers + -- "ts_ilocal.adb", -- tests local intrinsic coordinates + -- "ts_sampar.adb", -- tests affine sampler + "ts_sample.adb", -- tests sampler + "ts_ddqdsam.adb", -- tests double double & quad double sampling + -- "ts_mulhom.adb", -- tests multiplicity samplers + "ts_unisam.adb", -- tests Weierstrass method + "ts_hypsam.adb", -- tests hypersurface sampler + "ts_roots.adb", -- tests root finder + "ts_hyppts.adb", -- tests solving p(b+t*v) = 0 + "ts_hyprts.adb" -- tests solving p(t*v) = 0 + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end samplers; diff -Nru phcpack-2.4.84/src/Ada/Components/Samplers/UPDATES phcpack-2.4.85/src/Ada/Components/Samplers/UPDATES --- phcpack-2.4.84/src/Ada/Components/Samplers/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Samplers/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +Thu 10 Jun 2021 : defined samplers.gpr for the test procedures. + Thu 3 Dec 2020 : renamed drivers_to_grid_creators into make_sample_grids and moved code from mainsam into the package main_samplers. diff -Nru phcpack-2.4.84/src/Ada/Components/Solver/READ_ME phcpack-2.4.85/src/Ada/Components/Solver/READ_ME --- phcpack-2.4.84/src/Ada/Components/Solver/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Solver/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,9 +1,14 @@ -A new and progressive equation-by-equation solver with PHCv2.4.83 +A new and progressive equation-by-equation solver with PHCv2.4.85 This directory was created for release 2.3 of PHCpack. The straight-line versions to run the nine-point problem (and the five-point version) were provided by Charles Wampler. +Run "gprbuild solver.gpr" to make all test programs. +On windows, type "gprbuild solver.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean solver.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Solver/solver.gpr phcpack-2.4.85/src/Ada/Components/Solver/solver.gpr --- phcpack-2.4.84/src/Ada/Components/Solver/solver.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Solver/solver.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,59 @@ +project solver is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Factorization", + "../Decomposition"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Symmetry", + "../Samplers", "../Interpolators", "../Factorization", + "../Decomposition"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_hypwit.adb", -- tests hypersurface witness sets + "ts_solver.adb" -- tests the solver + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end solver; diff -Nru phcpack-2.4.84/src/Ada/Components/Solver/UPDATES phcpack-2.4.85/src/Ada/Components/Solver/UPDATES --- phcpack-2.4.84/src/Ada/Components/Solver/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Solver/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +Fri 11 Jun 2021 : defined solver.gpr to build the test procedures. + Fri 4 Dec 2020 : moved mainwit into the new package main_intersection. Added the verbose level to the procedures in main_intersection. diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets.adb phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets.adb --- phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,1073 +0,0 @@ -with text_io; use text_io; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with unchecked_deallocation; ---with Multprec_Integer_Linear_Solvers; use Multprec_Integer_Linear_Solvers; ---with Multprec64_Common_Divisors; use Multprec64_Common_Divisors; -with Multprec_Integer_Linear_Solvers; use Multprec_Integer_Linear_Solvers; -with Multprec_Common_Divisors; use Multprec_Common_Divisors; -with Multprec_Power_Transformations; -with Multprec_Lattice_Polygons; -with Standard_Lattice_Supports; -with Multprec_Lattice_Supports; - -package body Multprec_Lattice_Facets is - --- INITIAL FACET : - - function Lower ( A : Matrix; i,j : integer ) return boolean is - begin - for k in A'range(1) loop - if A(k,i) < A(k,j) then - return true; - elsif A(k,i) > A(k,j) then - return false; - end if; - end loop; - return (A(A'last(1),i) < A(A'last(1),j)); - end Lower; - - function Lowest ( A : Matrix ) return integer is - - res : integer := A'first(2); - - begin - for k in A'first(2)+1..A'last(2) loop - if Lower(A,k,res) - then res := k; - end if; - end loop; - return res; - end Lowest; - - function Second_Lowest ( A : Matrix; k : integer ) return integer is - - res : integer; - min : Integer_Number; - - begin - if k /= A'first(2) - then res := A'first(2); - else res := A'first(2) + 1; - end if; - Copy(A(A'first(1),res),min); - for j in A'range(2) loop - if j /= k then - if A(A'first(1),j) < min then - for i in A'range(1) loop - if not Equal(A(i,j),A(i,k)) - then res := j; Copy(A(A'first(1),j),min); exit; - end if; - end loop; - end if; - end if; - end loop; - Clear(min); - return res; - end Second_Lowest; - - function Largest_Angle ( A : Matrix; k : integer ) return integer is - - res : integer; - v1,v2,w1,w2,p,q : Integer_Number; - - begin - if k = A'first(2) - then res := k+1; - else res := A'first(2); - end if; - v1 := A(A'first(1),res) - A(A'first(1),k); - v2 := A(A'first(1)+1,res) - A(A'first(1)+1,k); - for j in A'range(2) loop - if j /= k then - w1 := A(A'first(1),j) - A(A'first(1),k); - w2 := A(A'first(1)+1,j) - A(A'first(1)+1,k); - p := v1*w2; q := w1*v2; - if p > q - then res := j; Copy(w1,v1); Copy(w2,v2); - end if; - end if; - Clear(w1); Clear(w2); - end loop; - Clear(v1); Clear(v2); - return res; - end Largest_Angle; - - function Initial_Edge ( A : Matrix; k : integer ) return integer is - - res : integer := Second_Lowest(A,k); - - begin - if not Equal(A(A'first(1),res),A(A'first(1),k)) - then res := Largest_Angle(A,k); - end if; - return res; - end Initial_Edge; - - function Edge_Normal ( A : Matrix; i,j : integer ) - return Multprec_Integer_Vectors.Vector is - - res : Multprec_Integer_Vectors.Vector(A'range(1)); - d : Integer_Number; - - begin - for i in res'range loop - res(i) := Multprec_Integer_Numbers.Create(0); - end loop; - if A(A'first(1),i) = A(A'first(1),j) then - res(res'first) := Multprec_Integer_Numbers.Create(1); - elsif A(A'first(1)+1,i) = A(A'first(1)+1,j) then - res(res'first+1) := Multprec_Integer_Numbers.Create(1); - else - res(res'first+1) := A(A'first(1),i) - A(A'first(1),j); - res(res'first) := A(A'first(1)+1,j) - A(A'first(1)+1,i); - if res(res'first) < 0 - then Multprec_Integer_Vectors.Min(res); - end if; - d := gcd(res(res'first),res(res'first+1)); - if not Equal(d,1) then - Div(res(res'first),d); - Div(res(res'first+1),d); - end if; - end if; - Multprec_Lattice_Supports.Inner(A,i,j,res); - return res; - end Edge_Normal; - - function Independent ( A : Matrix; i,j,k : integer ) return boolean is - - res : boolean; - v,w : Multprec_Integer_Vectors.Vector(A'range(1)); - d,e : Integer_Number; - - begin - for p in A'range(1) loop - v(p) := A(p,j) - A(p,i); - w(p) := A(p,k) - A(p,i); - end loop; - d := v(v'first)*w(w'first+1); - e := v(v'first+1)*w(w'first); - Sub(d,e); Clear(e); - if not Equal(d,0) then - res := true; - else - Clear(d); - d := v(v'first)*w(w'first+2); - e := v(v'first+2)*w(w'first); - Sub(d,e); Clear(e); - if not Equal(d,0) then - res := true; - else - Clear(d); - d := v(v'first+1)*w(w'first+2); - e := v(v'first+2)*w(w'first+1); - Sub(d,e); Clear(e); - if not Equal(d,0) - then res := true; - else res := false; - end if; - end if; - end if; - Multprec_Integer_Vectors.Clear(v); - Multprec_Integer_Vectors.Clear(w); - return res; - end Independent; - - function Third_Point - ( A : Matrix; i,j : integer; m : Integer_Number; - v : Multprec_Integer_Vectors.Vector ) return integer is - - ip : Integer_Number; - - begin - for k in A'range(2) loop - if k /= i and k /= j then - ip := Multprec_Lattice_Supports.Inner_Product(A,k,v); - if Equal(ip,m) then - if Independent(A,i,j,k) - then Clear(ip); return k; - end if; - end if; - Clear(ip); - end if; - end loop; - return 0; - end Third_Point; - - procedure Normalize ( v : in out Multprec_Integer_Vectors.Vector ) is - - h : Integer_Number := gcd(v(v'first+1),v(v'first+2)); - h2 : Integer_Number; - - begin - if not Equal(h,1) - then h2 := gcd(v(v'first),h); Copy(h2,h); Clear(h2); - end if; - if not Equal(h,1) and not Equal(h,0) then - for k in v'range loop - Div(v(k),h); - end loop; - end if; - Clear(h); - end Normalize; - - function Normal ( A : Matrix; i,j : integer; - v : Multprec_Integer_Vectors.Vector ) - return Multprec_Integer_Vectors.Vector is - - res,d : Multprec_Integer_Vectors.Vector(A'range(1)); - h,h2 : Integer_Number; - - begin - for k in d'range loop - res(k) := Multprec_Integer_Numbers.Create(0); - d(k) := A(k,j) - A(k,i); - end loop; - if Equal(d(d'last),0) then - res(res'last) := Multprec_Integer_Numbers.Create(1); - elsif Equal(v(v'first),0) then - Copy(d(d'last),res(res'first)); - res(res'first+1) := Multprec_Integer_Numbers.Create(0); - Copy(d(d'first),res(res'first+2)); Min(res(res'first+2)); - h := gcd(res(res'first),res(res'first+2)); - if not Equal(h,1) then - Div(res(res'first),h); - Div(res(res'first+2),h); - end if; - Clear(h); - elsif Equal(v(v'first+1),0) then - res(res'first) := Multprec_Integer_Numbers.Create(0); - Copy(d(d'first+2),res(res'first+1)); - Copy(d(d'first+1),res(res'first+2)); Min(res(res'first+2)); - h := gcd(res(res'first+1),res(res'first+2)); - if not Equal(h,1) then - Div(res(res'first+1),h); - Div(res(res'first+2),h); - end if; - Clear(h); - else - Copy(v(v'first+1),res(res'first)); Min(res(res'first)); - Copy(v(v'first),res(res'first+1)); - h := res(res'first)*d(d'first); - h2 := res(res'first+1)*d(d'first+1); - Add(h,h2); Clear(h2); - Copy(h,res(res'first+2)); Min(res(res'first+2)); - Mul(res(res'first),d(d'last)); - Mul(res(res'first+1),d(d'last)); - Normalize(res); - Clear(h); - end if; - Multprec_Integer_Vectors.Clear(d); - if res(res'first) < 0 - then Multprec_Integer_Vectors.Min(res); - end if; - return res; - end Normal; - - function Shift ( A : Matrix; i,j : integer ) - return Multprec_Integer_Vectors.Vector is - - res : Multprec_Integer_Vectors.Vector(A'range(1)); - - begin - for k in A'range(1) loop - res(k) := A(k,j) - A(k,i); - end loop; - return res; - end Shift; - - function Largest_Angle - ( A : Matrix; i,j : integer; - v,w : Multprec_Integer_Vectors.Vector ) return integer is - - res : integer; - ind : integer := A'first(2)-1; - x1,x2,y1,y2,p,q : Integer_Number; - d : Multprec_Integer_Vectors.Vector(A'range(1)); - - begin - for k in A'range(2) loop - if k /= i and k /= j then - d := Shift(A,i,k); - x1 := Multprec_Lattice_Supports.Inner_Product(d,v); - y1 := Multprec_Lattice_Supports.Inner_Product(d,w); - ind := k; res := k; - Multprec_Integer_Vectors.Clear(d); - end if; - exit when (ind >= A'first(2)); - end loop; - for k in ind+1..A'last(2) loop - if k /= i and k /= j then - d := Shift(A,i,k); - x2 := Multprec_Lattice_Supports.Inner_Product(d,v); - y2 := Multprec_Lattice_Supports.Inner_Product(d,w); - p := x1*y2; q := x2*y1; - if x2 > 0 or Equal(x2,0) then - if p > q - then Copy(x2,x1); Copy(y2,y1); res := k; - end if; - else - if p < q - then Copy(x2,x1); Copy(y2,y1); res := k; - end if; - end if; - Clear(x2); Clear(y2); Clear(p); Clear(q); - Multprec_Integer_Vectors.Clear(d); - end if; - end loop; - Clear(x1); Clear(y1); - return res; - end Largest_Angle; - - function Extreme_Angle - ( A : Matrix; i,j : integer; - f : Standard_Integer_Vectors.Vector; - v,w : Multprec_Integer_Vectors.Vector ) return integer is - - res : integer; - ind : integer := A'first(2)-1; - x1,x2,y1,y2,p,q : Integer_Number; - d : Multprec_Integer_Vectors.Vector(A'range(1)); - - begin - for k in A'range(2) loop - if Standard_Lattice_Supports.Member(f,k) < f'first then - if Independent(A,i,j,k) then - d := Shift(A,i,k); - x1 := Multprec_Lattice_Supports.Inner_Product(d,v); - y1 := Multprec_Lattice_Supports.Inner_Product(d,w); - if y1 < 0 then Min(y1); end if; - ind := k; res := k; - Multprec_Integer_Vectors.Clear(d); - end if; - end if; - exit when (ind >= A'first(2)); - end loop; - for k in ind+1..A'last(2) loop - if Standard_Lattice_Supports.Member(f,k) < f'first then - if Independent(A,i,j,k) then - d := Shift(A,i,k); - x2 := Multprec_Lattice_Supports.Inner_Product(d,v); - y2 := Multprec_Lattice_Supports.Inner_Product(d,w); - if y2 < 0 then Min(y2); end if; - if Equal(x2,0) then - if x1 > 0 - then Copy(x2,x1); Copy(y2,y1); res := k; - end if; - elsif x2 < 0 and (x1 > 0 or Equal(x1,0)) then - Copy(x2,x1); Copy(y2,y1); res := k; - elsif x1 > 0 and x2 > 0 then - p := x1*y2; q := x2*y1; - if p > q - then Copy(x2,x1); Copy(y2,y1); res := k; - end if; - Clear(p); Clear(q); - -- else case x1 < 0 and x2 > 0: no new extreme - elsif x1 < 0 and x2 < 0 then - p := x1*y2; q := x2*y1; - if p > q - then Copy(x2,x1); Copy(y2,y1); res := k; - end if; - Clear(p); Clear(q); - end if; - Clear(x2); Clear(y2); - Multprec_Integer_Vectors.Clear(d); - end if; - end if; - end loop; - Clear(x1); Clear(y1); - return res; - end Extreme_Angle; - - function Normal ( u,v : Multprec_Integer_Vectors.Vector ) - return Multprec_Integer_Vectors.Vector is - - res : Multprec_Integer_Vectors.Vector(u'range); - acc : Integer_Number; - - begin - res(res'first) := u(u'first+1)*v(v'first+2); - acc := u(u'first+2)*v(v'first+1); - Sub(res(res'first),acc); Clear(acc); - res(res'first+1) := u(u'first+2)*v(v'first); - acc := u(u'first)*v(v'first+2); - Sub(res(res'first+1),acc); Clear(acc); - res(res'first+2) := u(u'first)*v(v'first+1); - acc := u(u'first+1)*v(v'first); - Sub(res(res'first+2),acc); Clear(acc); - Normalize(res); - return res; - end Normal; - - function Normal ( A : Matrix; i,j,k : integer ) - return Multprec_Integer_Vectors.Vector is - - res : Multprec_Integer_Vectors.Vector(A'range(1)); - u : Multprec_Integer_Vectors.Vector(A'range(1)) := Shift(A,i,j); - v : Multprec_Integer_Vectors.Vector(A'range(1)) := Shift(A,i,k); - - begin - res := Normal(u,v); - Multprec_Integer_Vectors.Clear(u); - Multprec_Integer_Vectors.Clear(v); - return res; - end Normal; - - function Inner_Normal ( A : Matrix; i,j,k : integer ) - return Multprec_Integer_Vectors.Vector is - - res : Multprec_Integer_Vectors.Vector(A'range(1)) := Normal(A,i,j,k); - - begin - Multprec_Lattice_Supports.Inner(A,i,j,k,res); - return res; - end Inner_Normal; - - procedure Initial_Facet_Normal - ( A : in Matrix; i,j,k : out integer; - v : out Multprec_Integer_Vectors.Vector ) is - - u,w : Multprec_Integer_Vectors.Vector(A'range(1)); - s : Integer_Number; - - begin - i := Lowest(A); - j := Initial_Edge(A,i); - u := Edge_Normal(A,i,j); - s := Multprec_Lattice_Supports.Minimum(A,u); - k := Third_Point(A,i,j,s,u); - if k /= 0 then - Multprec_Lattice_Supports.Inner(A,i,j,k,u); - v := u; - else - w := Normal(A,i,j,u); - k := Largest_Angle(A,i,j,u,w); - v := Inner_Normal(A,i,j,k); - end if; - end Initial_Facet_Normal; - - function Drop ( A : Matrix; p : integer ) return Matrix is - - res : Matrix(1..2,A'range(2)); - - begin - for j in A'range(2) loop - for i in A'range(1) loop - if i < p then - Copy(A(i,j),res(i,j)); - elsif i > p then - Copy(A(i,j),res(i-1,j)); - end if; - end loop; - end loop; - return res; - end Drop; - - function Match ( A,B : Matrix; p,i,j : integer ) return boolean is - begin - for k in A'range(1) loop - if k < p then - if not Equal(A(k,i),B(k,j)) - then return false; - end if; - elsif k > p then - if not Equal(A(k,i),B(k-1,j)) - then return false; - end if; - end if; - end loop; - return true; - end Match; - - function Match_Vertices - ( A,V : Matrix; p : integer ) - return Standard_Integer_Vectors.Vector is - - res : Standard_Integer_Vectors.Vector(V'range(2)) := (V'range(2) => 0); - - begin - for j in V'range(2) loop - for k in A'range(2) loop - if Match(A,V,p,k,j) - then res(j) := k; exit; - end if; - end loop; - end loop; - return res; - end Match_Vertices; - - function Edges_of_Facet - ( A : Matrix; v : Multprec_Integer_Vectors.Vector ) - return Facet is - - s : constant Standard_Integer_Vectors.Vector - := Multprec_Lattice_Supports.Support(A,v); - B : constant Matrix(A'range(1),s'range) - := Multprec_Lattice_Supports.Support_Points(A,s); - p : constant integer := Multprec_Power_Transformations.Pivot(v); - M : constant Matrix(A'range(1),A'range(1)) - := Multprec_Power_Transformations.Eliminate(v,p); - MB : constant Matrix(A'range(1),B'range(2)) := M*B; - B2 : Matrix(1..2,B'range(2)) := Drop(MB,p); - - begin - Multprec_Lattice_Polygons.Lexicographic_Decreasing_Sort(B2); - declare - C2 : constant Matrix := Multprec_Lattice_Polygons.Convex_Hull_2D(B2); - m2 : constant Standard_Integer_Vectors.Vector := Match_Vertices(MB,C2,p); - pts : constant Matrix := Multprec_Lattice_Supports.Support_Points(B,m2); - res : Facet(3,m2'last); - begin - res.label := 0; - Multprec_Integer_Vectors.Copy(v,res.normal); - res.points := Multprec_Lattice_Supports.Indices(A,pts); - res.neighbors := (m2'range => null); - return res; - end; - end Edges_of_Facet; - - function Initial_Facet ( A : Matrix ) return Facet is - - i,j,k : integer; - v : Multprec_Integer_Vectors.Vector(A'range(1)); - - begin - Initial_Facet_Normal(A,i,j,k,v); - return Edges_of_Facet(A,v); - end Initial_Facet; - --- ROTATE facet normal : - - procedure Invert ( p : in out Standard_Integer_Vectors.Vector; - k : in integer ) is - - up,down : integer := k; - cp : constant Standard_Integer_Vectors.Vector(p'range) := p; - - begin - loop - up := up + 1; - if up > p'last - then up := p'first; - end if; - exit when (up = k); - down := down - 1; - if down < p'first - then down := p'last; - end if; - p(down) := cp(up); - end loop; - end Invert; - - procedure Connect ( f : in Link_to_Facet; p,i,j : in integer ) is - - fp : constant Link_to_Facet := f.neighbors(p); - - begin - for k in fp.points'range loop - if fp.points(k) = j then - fp.neighbors(k) := f; - if k < fp.points'last then - if fp.points(k+1) /= i - then Invert(fp.points,k); - end if; - else - if fp.points(fp.points'first) /= i - then Invert(fp.points,k); - end if; - end if; - end if; - end loop; - end Connect; - - procedure Previous_and_Next_Edge - ( f : in Link_to_Facet; i : in integer; p,q : out integer ) is - begin - if i = f.points'first then - p := f.points'last; - q := i + 1; - elsif i = f.points'last then - p := i - 1; - q := f.points'first; - else - p := i - 1; - q := i + 1; - end if; - end Previous_and_Next_Edge; - - procedure Connect ( f,g : in Link_to_Facet; i,j : in integer; - connected : out boolean ) is - - f_prev,f_next,g_prev,g_next : integer; - - begin - connected := false; - Previous_and_Next_Edge(f,i,f_prev,f_next); - Previous_and_Next_Edge(g,j,g_prev,g_next); - if f.neighbors(f_prev) = null then - if g.neighbors(j) = null then - if f.points(f_prev) = g.points(g_next) then - f.neighbors(f_prev) := g; - g.neighbors(j) := f; - connected := true; - end if; - end if; - if g.neighbors(g_next) = null then - if f.points(f_prev) = g.points(g_prev) then - f.neighbors(f_prev) := g; - g.neighbors(g_next) := f; - connected := true; - end if; - end if; - end if; - if f.neighbors(i) = null then - if g.neighbors(g_prev) = null then - if f.points(f_next) = g.points(g_prev) then - f.neighbors(i) := g; - g.neighbors(g_prev) := f; - connected := true; - end if; - end if; - if g.neighbors(j) = null then - if f.points(f_next) = g.points(g_next) then - f.neighbors(i) := g; - g.neighbors(j) := f; - connected := true; - end if; - end if; - end if; - end Connect; - - procedure Connect ( f,g : in Link_to_Facet ) is - - connected : boolean := false; - - begin - for i in f.points'range loop - for j in g.points'range loop - if f.points(i) = g.points(j) - then Connect(f,g,i,j,connected); - end if; - exit when connected; - end loop; - exit when connected; - end loop; - end Connect; - - function Is_Connected ( f : Link_to_Facet ) return boolean is - begin - for i in f.neighbors'range loop - if f.neighbors(i) = null - then return false; - end if; - end loop; - return true; - end Is_Connected; - - procedure Neighbors ( A : in Matrix; f : in Link_to_Facet; - idcnt : in out natural ) is - - u,v,w : Multprec_Integer_Vectors.Vector(A'range(1)); - i,j,k : integer; - - begin - for p in f.points'range loop - if f.neighbors(p) = null then - i := f.points(p); - if p < f.points'last - then j := f.points(p+1); - else j := f.points(f.points'first); - end if; - u := Shift(A,i,j); - w := Normal(u,f.normal); - Multprec_Lattice_Supports.Inner(A,i,j,f.points,w); - k := Extreme_Angle(A,i,j,f.points,w,f.normal); - v := Inner_Normal(A,i,j,k); - f.neighbors(p) := new Facet'(Edges_of_Facet(A,v)); - idcnt := idcnt + 1; - f.neighbors(p).label := idcnt; - Connect(f,p,i,j); - for q in f.neighbors'range loop - if q /= p and f.neighbors(q) /= null - then Connect(f.neighbors(q),f.neighbors(p)); - end if; - end loop; - Multprec_Integer_Vectors.Clear(u); - Multprec_Integer_Vectors.Clear(v); - Multprec_Integer_Vectors.Clear(w); - end if; - end loop; - end Neighbors; - --- MAIN ALGORITHM : - - function Pop ( f : Facet_List ) return Link_to_Facet is - - tmp : Facet_List := f; - lft : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - if not Is_Connected(lft) - then return lft; - end if; - tmp := Tail_Of(tmp); - end loop; - return null; - end Pop; - - procedure Connect ( f : in Facet_List; lft : in Link_to_Facet ) is - - tmp : Facet_List := f; - ptr : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - ptr := Head_Of(tmp); - if not Is_Connected(ptr) - then Connect(ptr,lft); - end if; - tmp := Tail_Of(tmp); - end loop; - end Connect; - - function Convex_Hull_3D ( A : Matrix ) return Facet_List is - - res : Facet_List; - first : constant Link_to_Facet := new Facet'(Initial_Facet(A)); - lft : Link_to_Facet; - cnt,inc,idcnt : natural := 0; - - begin - Construct(first,res); cnt := 1; - loop - lft := Pop(res); - exit when (lft = null); - Neighbors(A,lft,idcnt); - inc := 0; - for i in lft.neighbors'range loop - if lft.neighbors(i).label >= cnt then - if not Is_Connected(lft.neighbors(i)) - then Connect(res,lft.neighbors(i)); - end if; - Construct(lft.neighbors(i),res); - inc := inc + 1; - end if; - end loop; - cnt := cnt + inc; - end loop; - return res; - end Convex_Hull_3D; - --- SELECTORS : - - function Facet_Normals - ( f : Facet_List ) return Lists_of_Integer64_Vectors.List is - - res,res_last : Lists_of_Integer64_Vectors.List; - tmp : Facet_List := f; - lft : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - -- Lists_of_Integer64_Vectors.Append(res,res_last,lft.normal); - tmp := Tail_Of(tmp); - end loop; - return res; - end Facet_Normals; - - function Is_Facet_Normal - ( f : Facet_List; v : Multprec_Integer_Vectors.Vector ) - return boolean is - - tmp : Facet_List := f; - lft : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - if Multprec_Integer_Vectors.Equal(lft.normal,v) - then return true; - end if; - tmp := Tail_Of(tmp); - end loop; - return false; - end Is_Facet_Normal; - - function Select_Facet_Normals - ( f : Facet_List; v : Lists_of_Integer64_Vectors.List ) - return Lists_of_Integer64_Vectors.List is - - res,res_last : Lists_of_Integer64_Vectors.List; - tmp : Lists_of_Integer64_Vectors.List := v; - -- lv : Standard_Integer64_Vectors.Link_to_Vector; - - begin - while not Lists_of_Integer64_Vectors.Is_Null(tmp) loop - -- lv := Lists_of_Integer64_Vectors.Head_Of(tmp); - -- if Is_Facet_Normal(f,lv.all) - -- then Lists_of_Integer64_Vectors.Append(res,res_last,lv.all); - -- end if; - tmp := Lists_of_Integer64_Vectors.Tail_Of(tmp); - end loop; - return res; - end Select_Facet_Normals; - - function Get_Facet - ( f : Facet_List; v : Multprec_Integer_Vectors.Vector ) - return Link_to_Facet is - - tmp : Facet_List := f; - lft : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - if Multprec_Integer_Vectors.Equal(lft.normal,v) - then return lft; - end if; - tmp := Tail_Of(tmp); - end loop; - return null; - end Get_Facet; - - function Edges ( f : Facet_List ) return Lists_of_Integer_Vectors.List is - - res,res_last : Lists_of_Integer_Vectors.List; - tmp : Facet_List := f; - lft : Link_to_Facet; - edge : Standard_Integer_Vectors.Vector(1..2); - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - for i in lft.points'range loop - edge(1) := lft.points(i); - if i < lft.points'last - then edge(2) := lft.points(i+1); - else edge(2) := lft.points(lft.points'first); - end if; - Lists_of_Integer_Vectors.Append(res,res_last,edge); - end loop; - tmp := Tail_Of(tmp); - end loop; - return res; - end Edges; - - function Vertices ( n : natural; f : Facet_List ) - return Standard_Integer_Vectors.Vector is - - res : Standard_Integer_Vectors.Vector(1..n) := (1..n => 0); - ind : natural := 0; - tmp : Facet_List := f; - lft : Link_to_Facet; - found : boolean; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - for i in lft.points'range loop - found := false; - for j in 1..ind loop - if res(j) = lft.points(i) - then found := true; - end if; - exit when found; - end loop; - if not found then - ind := ind + 1; - res(ind) := lft.points(i); - end if; - end loop; - tmp := Tail_Of(tmp); - end loop; - return res(1..ind); - end Vertices; - - function First_Incident_Vertex ( f : Facet_List ) return integer is - - lft : Link_to_Facet; - - begin - if Is_Null(f) then - return 0; - else - lft := Head_Of(f); - if lft = null - then return 0; - else return lft.points(lft.points'first); - end if; - end if; - end First_Incident_Vertex; - - procedure Check_Euler_Characteristic ( m : in natural; f : in Facet_List ) is - - e : Lists_of_Integer_Vectors.List := Edges(f); - v : constant Standard_Integer_Vectors.Vector := Vertices(m,f); - nf : constant natural := Length_Of(f); - ne : constant natural := Lists_of_Integer_Vectors.Length_Of(e); - nv : constant natural := v'last; - - begin - put("#facets : "); put(nf,1); - put(" #edges : "); put(ne/2,1); - put(" #vertices : "); put(nv,1); - put(" Euler characteristic : "); put(nf-ne/2+nv,1); new_line; - Lists_of_Integer_Vectors.Clear(e); - end Check_Euler_Characteristic; - --- ENUMERATORS : walk to enumerate vertices, crawl for edges - - procedure Walk ( f : in Facet_List; v : in integer; - b : in out Boolean_Array ) is - - tmp : Facet_List := f; - lft : Link_to_Facet; - ind,w : integer; - c : boolean := true; - - begin - b(v) := true; - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - ind := Standard_Lattice_Supports.Member(lft.points,v); - if ind >= lft.points'first then -- v is incident to lft - if ind > lft.points'first -- w will be previous neighbor - then w := lft.points(ind-1); - else w := lft.points(lft.points'last); - end if; - if not b(w) - then Report(w,c); b(w) := true; if c then Walk(f,w,b); end if; - end if; - if ind < lft.points'last -- w will be next neighbor - then w := lft.points(ind+1); - else w := lft.points(lft.points'first); - end if; - if not b(w) - then Report(w,c); b(w) := true; if c then Walk(f,w,b); end if; - end if; - end if; - tmp := Tail_Of(tmp); - end loop; - end Walk; - - procedure Crawl ( f : in Facet_List; v : in integer; - b : in out Boolean_Matrix ) is - - tmp : Facet_List := f; - lft : Link_to_Facet; - ind,w : integer; - c : boolean := true; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - ind := Standard_Lattice_Supports.Member(lft.points,v); - if ind >= lft.points'first then -- v is incident to lft - if ind > lft.points'first -- w will be previous neighbor - then w := lft.points(ind-1); - else w := lft.points(lft.points'last); - end if; - if not b(v,w) then - Report(v,w,c); b(v,w) := true; b(w,v) := true; - if c then Crawl(f,w,b); end if; - end if; - if ind < lft.points'last -- w will be next neighbor - then w := lft.points(ind+1); - else w := lft.points(lft.points'first); - end if; - if not b(v,w) then - Report(v,w,c); b(v,w) := true; b(w,v) := true; - if c then Crawl(f,w,b); end if; - end if; - end if; - tmp := Tail_Of(tmp); - end loop; - end Crawl; - --- RANK : - - function Shift ( A : Matrix; k : integer ) return Matrix is - - res : Matrix(A'range(1),A'first(2)..A'last(2)-1); - - begin - for j in A'range(2) loop - if j < k then - for i in A'range(1) loop - res(i,j) := A(i,j) - A(i,k); - end loop; - elsif j > k then - for i in A'range(1) loop - res(i,j-1) := A(i,j) - A(i,k); - end loop; - end if; - end loop; - return res; - end Shift; - - function Rank_of_Upper ( A : Matrix ) return natural is - - res : natural := 0; - - begin - for i in A'range(1) loop - for j in A'range(2) loop - if not Equal(A(i,j),0) - then res := res + 1; exit; - end if; - end loop; - end loop; - return res; - end Rank_of_Upper; - - function Rank ( A : Matrix ) return natural is - - res : natural; - k : constant integer := Lowest(A); - V : Matrix(A'range(1),A'first(2)..A'last(2)-1) := Shift(A,k); - - begin - Upper_Triangulate(V); - res := Rank_of_Upper(V); - return res; - end Rank; - --- DESTRUCTORS : - - procedure Clear ( f : in out Link_to_Facet ) is - - procedure free is new unchecked_deallocation(Facet,Link_to_Facet); - - begin - if f /= null then - -- Clear(f.neighbors); -- else infinite loop ! - free(f); - end if; - end Clear; - - procedure Clear ( f : in out Array_of_Facets ) is - begin - for i in f'range loop - Clear(f(i)); - end loop; - end Clear; - - procedure Clear ( f : in out Facet_List ) is - - tmp : Facet_List := f; - - begin - while not Is_Null(tmp) loop - declare - ft : Link_to_Facet := Head_Of(tmp); - begin - Clear(ft); - end; - tmp := Tail_Of(tmp); - end loop; - Lists_of_Facets.Clear(Lists_of_Facets.List(f)); - end Clear; - -end Multprec_Lattice_Facets; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets.ads phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets.ads --- phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,458 +0,0 @@ -with Standard_Integer_Vectors; -with Multprec_Integer_Numbers; use Multprec_Integer_Numbers; -with Multprec_Integer_Vectors; -with Multprec_Integer_Matrices; use Multprec_Integer_Matrices; -with Multprec_Integer_Vectors; -with Multprec_Integer_Matrices; use Multprec_Integer_Matrices; -with Lists_of_Integer_Vectors; -with Lists_of_Integer64_Vectors; -with Generic_Lists; - -package Multprec_Lattice_Facets is - --- DESCRIPTION : --- A lattice polytope is spanned by points with integer coordinates. --- The operations in this package compute the entire face lattice for --- a three dimensional lattice polytope, using multprecision integers. - --- DATA STRUCTURES : - - type Facet; - type Link_to_Facet is access Facet; - type Array_of_Facets is array ( integer range <> ) of Link_to_Facet; - - type Facet ( d,n : natural ) is record - label : natural; -- identification number - normal : Multprec_Integer_Vectors.Vector(1..d); - -- inner normal to the facet is a vector of multiprecision integers - points : Standard_Integer_Vectors.Vector(1..n); - -- indices to vertices of facet is a vector of standard integers - neighbors : Array_of_Facets(1..n); -- neighbors share an edge - end record; - - package Lists_of_Facets is new Generic_Lists(Link_to_Facet); - type Facet_List is new Lists_of_Facets.List; - - type Array_of_Facet_Lists is array ( integer range <> ) of Facet_List; - - type Boolean_Array is array ( integer range <> ) of boolean; - type Boolean_Matrix is - array ( integer range <> , integer range <> ) of boolean; - --- INITIAL FACET : compute the first facet - - function Lower ( A : Matrix; i,j : integer ) return boolean; - - -- DESCRIPTION : - -- Returns true if the i-th column of A has coordinates that are - -- lexicographically lower than those in the j-th column. - - function Lowest ( A : Matrix ) return integer; - - -- DESCRIPTION : - -- Returns the index of the column in A that has lexicographically - -- the lowest coordinates. - - function Second_Lowest ( A : Matrix; k : integer ) return integer; - - -- DESCRIPTION : - -- Returns the index of the column different from k with the - -- smallest first coordinate. - - function Largest_Angle ( A : Matrix; k : integer ) return integer; - - -- DESCRIPTION : - -- Returns the index j of the column in A, j /= k, for which the - -- vector A(:,j) - A(:,k) makes the largest angle with (1,0,0). - - function Initial_Edge ( A : Matrix; k : integer ) return integer; - - -- DESCRIPTION : - -- Returns the index of the point in A which will jointly with k - -- span the initial edge of the polytope spanned by the columns of A. - - function Edge_Normal ( A : Matrix; i,j : integer ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns an inner normal for points that span the initial edge, - -- with coordinates in i-th and j-th column of A. - - function Independent ( A : Matrix; i,j,k : integer ) return boolean; - - -- DESCRIPTION : - -- Returns true if the columns i, j and k contain points that are - -- not collinear and are linearly independent. - - function Third_Point - ( A : Matrix; i,j : integer; m : Integer_Number; - v : Multprec_Integer_Vectors.Vector ) return integer; - - -- DESCRIPTION : - -- Checks whether there is a facet with inner normal v. - - -- ON ENTRY : - -- A coordinates for points in space; - -- i index to lexicographically lowest point of A; - -- j index to second point in A that spans an edge; - -- m equals Inner_Product(A,i,v) = Inner_Product(A,j,v); - -- v inner normal of edge spanned by points i and j. - - -- ON RETURN : - -- 0 or an index k of a column in A, k /= i, k /= j for which - -- Inner_Product(A,k,v) = m and Independent(A,i,j,k). - - procedure Normalize ( v : in out Multprec_Integer_Vectors.Vector ); - - -- DESCRIPTION : - -- Divides the components of the vector v by the greatest common divisor. - - function Normal ( A : Matrix; i,j : integer; - v : Multprec_Integer_Vectors.Vector ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the normal vector perpendicular to the vector along the - -- edge spanned by points with coordinates in columns i and j of A, - -- and perpendicular to the vector v. - - -- REQUIRED : v(v'last) = 0. - - function Shift ( A : Matrix; i,j : integer ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : returns A(:,j) - A(:,i). - - function Largest_Angle - ( A : Matrix; i,j : integer; - v,w : Multprec_Integer_Vectors.Vector ) return integer; - - -- DESCRIPTION : - -- Returns the index to the point with coordinates in A which makes - -- the largest angle with the vector v. - - -- ON ENTRY : - -- A coordinates for a set of points in 3-space; - -- i index to lexicographically lowest point of A; - -- j index to the second point of the initial edge; - -- v normal to the initial edge, spanned by columns i and j; - -- w vector perpendicular to v and the initial edge. - - function Extreme_Angle - ( A : Matrix; i,j : integer; - f : Standard_Integer_Vectors.Vector; - v,w : Multprec_Integer_Vectors.Vector ) return integer; - - -- DESCRIPTION : - -- Returns the index to the point with coordinates in A which makes - -- the largest angle in absolute value with the vector v. - - -- REQUIRED : v is perpendicular to w and moreover, v is inner normal - -- relative to the other points that span the facet. - - -- ON ENTRY : - -- A coordinates for a set of points in 3-space; - -- i index to the first vertex points of an edge; - -- j index to end point of an edge; - -- f index of points that span the facet; - -- v normal to an facet edge, with a vertex in column i; - -- w normal to the face spanned by the points in f. - - function Normal ( u,v : Multprec_Integer_Vectors.Vector ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns a vector perpendicular to u and v. - - function Normal ( A : Matrix; i,j,k : integer ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the vector perpendicular to the points with coordinates - -- in columns i, j, and k. - - function Inner_Normal ( A : Matrix; i,j,k : integer ) - return Multprec_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the inner normal to the facet spanned by the points with - -- coordinates in columns i, j, and k of A. - - procedure Initial_Facet_Normal - ( A : in Matrix; i,j,k : out integer; - v : out Multprec_Integer_Vectors.Vector ); - - -- DESCRIPTION : - -- Returns three points of A which span the initial facet of A, - -- with coordinaetes in columns i, j, and k of A, where v is the - -- inner normal of the facet. - - function Drop ( A : Matrix; p : integer ) return Matrix; - - -- DESCRIPTION : - -- The matrix on return has the same columns as A, - -- but with the p-th coordinate dropped. - - function Match ( A,B : Matrix; p,i,j : integer ) return boolean; - - -- DESCRIPTION : - -- Returns true if column i of A matches column j of B, - -- where the p-th coordinate was dropped from B. - - function Match_Vertices - ( A,V : Matrix; p : integer ) - return Standard_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- The vector on return has range V'range(2) and contains the - -- column indices of A for the corresponding vertex. - - -- REQUIRED : - -- A is the transformed matrix of 3d points - -- and p is the dropped coordinate from V. - - function Edges_of_Facet - ( A : Matrix; v : Multprec_Integer_Vectors.Vector ) - return Facet; - - -- DESCRIPTION : - -- Computes the edges of the facet with inner normal v. - - function Initial_Facet ( A : Matrix ) return Facet; - - -- DESCRIPTION : - -- Computes the initial facet of the 3d lattice polygon - -- spanned by the points with coordinates in A. - --- ROTATE facet normal : - - procedure Invert ( p : in out Standard_Integer_Vectors.Vector; - k : in integer ); - - -- DESCRIPTION : - -- Inverts the contents of p, reading p backwards starting at k. - - procedure Connect ( f : in Link_to_Facet; p,i,j : in integer ); - - -- DESCRIPTION : - -- The p-th neighbor of f shares the edge starting at i and ending - -- at the vertex j. Before connecting the p-th neighbor to f, - -- the orientation of the vertices may be reversed. - - -- CONNECTIVITY RULE : - -- Facet f has neighbor g at p, if the edge starting at i = f.points(p) - -- and ending at j occurs in g as an edge starting at j and ending at i. - -- Likewise, the q-th neighbor of g will be f, where j = g.points(q). - - procedure Previous_and_Next_Edge - ( f : in Link_to_Facet; i : in integer; p,q : out integer ); - - -- DESCRIPTION : - -- Sets p and q to the index of previous and next edge of f, - -- both sharing i respectively as end and begin point of an edge. - - procedure Connect ( f,g : in Link_to_Facet; i,j : in integer; - connected : out boolean ); - - -- DESCRIPTION : - -- For facets f and g sharing a common vertex respectively - -- as their i-th and j-th vertex, connected on return is true - -- if they share an edge. If connected is true on return, - -- then they are connected as neighbors. - - procedure Connect ( f,g : in Link_to_Facet ); - - -- DESCRIPTION : - -- Checks whether the facets f and g share an edge. - -- If f and g share an edge, then they are connected. - - function Is_Connected ( f : Link_to_Facet ) return boolean; - - -- DESCRIPTION : - -- Returns true if all neighbors of f are defined, - -- returns false otherwise. - - procedure Neighbors ( A : in Matrix; f : in Link_to_Facet; - idcnt : in out natural ); - - -- DESCRIPTION : - -- Computes the neighbors to the facet f of the polytope spanned by A. - - -- ON ENTRY : - -- A coordinates of points spanning the polytope; - -- f a facet of the polytope; - -- idcnt current highest identification number. - - -- ON RETURN : - -- f new neighbors of f have label > idcnt on entry; - -- idcnt updated highest identification number. - --- MAIN ALGORITHM : - - function Pop ( f : Facet_List ) return Link_to_Facet; - - -- DESCRIPTION : - -- Returns the link to the first facet in f that is not connected. - - procedure Connect ( f : in Facet_List; lft : in Link_to_Facet ); - - -- DESCRIPTION : - -- Connects the facet lft to the facets in the list f. - - function Convex_Hull_3D ( A : Matrix ) return Facet_List; - - -- DESCRIPTION : - -- Returns a list of facets supporting the convex hull of A. - --- SELECTORS : - - function Facet_Normals - ( f : Facet_List ) return Lists_of_Integer64_Vectors.List; - - -- DESCRIPTION : - -- Returns the list of inner normals to the facets in f. - - function Is_Facet_Normal - ( f : Facet_List; v : Multprec_Integer_Vectors.Vector ) - return boolean; - - -- DESCRIPTION : - -- Returns true if the vector v occurs among the facet normals in f. - - function Select_Facet_Normals - ( f : Facet_List; v : Lists_of_Integer64_Vectors.List ) - return Lists_of_Integer64_Vectors.List; - - -- DESCRIPTION : - -- Returns the list of vectors in v that occur as facet normals in f. - - function Get_Facet - ( f : Facet_List; v : Multprec_Integer_Vectors.Vector ) - return Link_to_Facet; - - -- DESCRIPTION : - -- Returns the facet in the list f with inner normal equal to v. - - function Edges ( f : Facet_List ) return Lists_of_Integer_Vectors.List; - - -- DESCRIPTION : - -- Returns a list of all edges in the list of facets f. - - function Vertices ( n : natural; f : Facet_List ) - return Standard_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the vector of indices to vertex points of facets in f. - - -- REQUIRED : n = total number of points in the support set. - - function First_Incident_Vertex ( f : Facet_List ) return integer; - - -- DESCRIPTION : - -- Returns the first vertex incident to the first facet of f, - -- as a default vertex to start the walk in the enumerators below. - - procedure Check_Euler_Characteristic ( m : in natural; f : in Facet_List ); - - -- DESCRIPTION : - -- The Euler characteristic of a 3D polytope equals - -- #facets - #edges + #vertices = 2. - - -- ON ENTRY : - -- m total number of points in the support; - -- f list of facets spanned by the polytope. - --- ENUMERATORS : walk to enumerate vertices, craw for edges - - generic - - with procedure Report ( w : in integer; continue : out boolean ); - - -- DESCRIPTION : - -- For every vertex w connected by an edge path to the original v, - -- Report is called. No neighbors to w are visited is continue - -- is set to false by Report. Every vertex is visited only once. - - procedure Walk ( f : in Facet_List; v : in integer; - b : in out Boolean_Array ); - - -- DESCRIPTION : - -- Starting at the vertex v, walks to neighboring vertices, - -- calling Report at every newly visited vertex. - - -- REQUIRED : b'range = A'range(2) and v in A'range(2), - -- where A is the support set of the polytope with facets in f. - - -- ON ENTRY : - -- f list of facets of a polytope; - -- v index to a column in v; - -- b if b(i) then the i-th column of A is a visited vertex, - -- otherwise i is not yet visited or not a vertex; - -- initially all entries in b should be false. - - -- ON RETURN : - -- b if b(i), then the i-th point is a vertex, else not. - - generic - - with procedure Report ( v,w : in integer; continue : out boolean ); - - -- DESCRIPTION : - -- The pair (v,w) spans an edge connected by a path from the original - -- vertex v given on entry of the Crawl procedure. Report is called - -- with every new edge. No neighbors to w are visited is continue - -- is set to false by Report. Every edge is visited only once. - - procedure Crawl ( f : in Facet_List; v : in integer; - b : in out Boolean_Matrix ); - - -- DESCRIPTION : - -- Starting at the vertex v, walks to neighboring vertices, - -- calling Report at every newly visited edge. - - -- REQUIRED : b'range = A'range(2) and v in A'range(2), - -- where A is the support set of the polytope with facets in f. - - -- ON ENTRY : - -- f list of facets of a polytope; - -- v index to a column in v; - -- b if b(i,j) then vertices i and j span a visited edge, - -- otherwise the edge spanned by i and j is not yet visited - -- or there is no edge spanned by i and j; - -- initially all entries in b should be false. - - -- ON RETURN : - -- b if b(i,j), then there is an edge spanned by i and j, - -- else there is no edge spanned by i and j. - --- RANK : compute the linear span of a set of points. - - function Shift ( A : Matrix; k : integer ) return Matrix; - - -- DESCRIPTION : - -- The matrix on return has the k-th column removed, and the coordinates - -- all other columns have been subtracted by the k-th column. - - function Rank_of_Upper ( A : Matrix ) return natural; - - -- DESCRIPTION : - -- Returns the rank of an upper triangular matrix. - - function Rank ( A : Matrix ) return natural; - - -- DESCRIPTION : - -- Returns the rank of the matrix A. The columns of A contain - -- the coordinates of the points that span the polytope. - -- If the rank r is strictly less than A'last(1), then the polytope - -- is entirely contained in a linear space of dimension r. - --- DESTRUCTORS : - - procedure Clear ( f : in out Link_to_Facet ); - procedure Clear ( f : in out Array_of_Facets ); - procedure Clear ( f : in out Facet_List ); - - -- DESCRIPTION : - -- Deallocation of all memory occupied by the facets. - -end Multprec_Lattice_Facets; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets_io.adb phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets_io.adb --- phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets_io.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -with text_io; use text_io; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; ---with Multprec_Integer64_Numbers; use Multprec_Integer64_Numbers; ---with Multprec_Integer64_Numbers_io; use Multprec_Integer64_Numbers_io; -with Multprec_Integer_Numbers; use Multprec_Integer_Numbers; -with Multprec_Integer_Numbers_io; use Multprec_Integer_Numbers_io; -with Multprec_Lattice_Supports; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; ---with Multprec_Integer64_Vectors_io; use Multprec_Integer64_Vectors_io; -with Multprec_Integer_Vectors_io; use Multprec_Integer_Vectors_io; - -package body Multprec_Lattice_Facets_io is - - procedure Write_Coordinates ( A : in Matrix; k : in integer ) is - begin - for i in A'range(1) loop - put(" "); put(A(i,k)); - end loop; - end Write_Coordinates; - - procedure Write_Facet ( A : in Matrix; f : in Facet ) is - - m : Integer_Number := Multprec_Lattice_Supports.Minimum(A,f.normal); - - begin - put("facet "); put(f.label,1); - put(" spanned by"); put(f.points); - put(" has normal"); put(f.normal); - put(" and value "); put(m); new_line; - Clear(m); - put(" IP :"); - put(Multprec_Lattice_Supports.Inner_Products(A,f.normal)); - put(" support :"); - put(Multprec_Lattice_Supports.Support(A,f.normal)); new_line; - put(" neighboring facets :"); - for i in f.neighbors'range loop - if f.neighbors(i) /= null - then put(" "); put(f.neighbors(i).label,1); - end if; - end loop; - new_line; - end Write_Facet; - - procedure Write_Facets ( A : in Matrix; f : in Facet_List ) is - - tmp : Facet_List := f; - lft : Link_to_Facet; - - begin - while not Is_Null(tmp) loop - lft := Head_Of(tmp); - Write_Facet(A,lft.all); - tmp := Tail_Of(tmp); - end loop; - end Write_Facets; - -end Multprec_Lattice_Facets_io; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets_io.ads phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets_io.ads --- phcpack-2.4.84/src/Ada/Components/Tropical/multprec_lattice_facets_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/multprec_lattice_facets_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ ---with Multprec_Integer64_Matrices; use Multprec_Integer64_Matrices; -with Multprec_Integer_Matrices; use Multprec_Integer_Matrices; -with Multprec_Lattice_Facets; use Multprec_Lattice_Facets; - -package Multprec_Lattice_Facets_io is - --- DESCRIPTION : --- Provides basic output routines for facets. - - procedure Write_Coordinates ( A : in Matrix; k : in integer ); - - -- DESCRIPTION : - -- Writes the coordinates of the point stored in the k-th column of A. - - procedure Write_Facet ( A : in Matrix; f : in Facet ); - - -- DESCRIPTION : - -- Writes a facet of conv(A) to multprec output. - - procedure Write_Facets ( A : in Matrix; f : in Facet_List ); - - -- DESCRIPTION : - -- Writes the list of facets of conv(A) to multprec output. - -end Multprec_Lattice_Facets_io; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/READ_ME phcpack-2.4.85/src/Ada/Components/Tropical/READ_ME --- phcpack-2.4.84/src/Ada/Components/Tropical/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Tropicalization of witness sets with PHCv2.4.64 +Tropicalization of witness sets with PHCv2.4.85 This directory is new since release 2.3.48. The asymptotics of witness sets have tropical interpretations. Via the computation of tropisms we develop @@ -8,6 +8,11 @@ A first step is to compute certificates for a regular common factor of two Laurent polynomials with complex coefficients. +Run "gprbuild tropical.gpr" to make all test programs. +On windows, type "gprbuild tropical.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean tropical.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/tropical.gpr phcpack-2.4.85/src/Ada/Components/Tropical/tropical.gpr --- phcpack-2.4.84/src/Ada/Components/Tropical/tropical.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/tropical.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,50 @@ +project tropical is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", + "../../Deformations/Curves", + "../../Root_Counts/Implift", "../../Root_Counts/Binomials", + "../../Root_Counts/Stalift"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", + "../../Deformations/Curves", + "../../Root_Counts/Implift", "../../Root_Counts/Binomials", + "../../Root_Counts/Stalift"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_comfac.adb", -- tests regular common factor + "ts_intorto.adb", -- tests orthogonalization + "ts_convhull.adb", -- tests convex hull operations + "ts_pretrop.adb", -- tests standard lattice facets + "ts_ptlstr.adb" -- tests conversions + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end tropical; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/ts_sumtope.adb phcpack-2.4.85/src/Ada/Components/Tropical/ts_sumtope.adb --- phcpack-2.4.84/src/Ada/Components/Tropical/ts_sumtope.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/ts_sumtope.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -with text_io; use text_io; -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; - -procedure ts_sumtope is - --- DESCRIPTION : --- Writes the matrix that contains the points that span the --- Minkowski sum of the Newton polytopes in a given system. - - function Product ( p : Poly_Sys ) return Poly is - - -- DESCRIPTION : - -- Returns the product of the polynomials in p. - - res : Poly; - - begin - Copy(p(p'first),res); - for i in p'first+1..p'last loop - Mul(res,p(i)); - end loop; - return res; - end Product; - - procedure Main is - - p : Link_to_Poly_Sys; - q : Poly; - - begin - new_line; - put_line("Reading a polynomial system ..."); - get(p); - q := Product(p.all); - put_line("The product of the polynomials in the system :"); - put(q); - end Main; - -begin - Main; -end ts_sumtope; diff -Nru phcpack-2.4.84/src/Ada/Components/Tropical/UPDATES phcpack-2.4.85/src/Ada/Components/Tropical/UPDATES --- phcpack-2.4.84/src/Ada/Components/Tropical/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/Tropical/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Sun 27 Jun 2021 : deleted multprec_lattice_facets and its io package. + +Sat 12 Jun 2021 : defined tropical.gpr to build the test procedures. + Wed 2 Jan 2019 : fixed compiler error in ts_tropawit.adb because of changed specification in standard_blackbox_continuations. diff -Nru phcpack-2.4.84/src/Ada/Components/UPDATES phcpack-2.4.85/src/Ada/Components/UPDATES --- phcpack-2.4.84/src/Ada/Components/UPDATES 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Components/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,5 @@ +Tue 15 Jun 2021 : defined components.gpr to build all test procedures. + +Wed 10 Sep 2008 : created the directory Tropical + +Thu 16 Mar 2006 : moved the directory Sparse to Root_Counts/Fewnomials. diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -package body C_Double_Arrays is - - function Concat ( a,b : C_Double_Array ) return C_Double_Array is - - res : C_Double_Array(0..Interfaces.C.size_T(a'length+b'length-1)); - ind : Interfaces.C.size_T := 0; - - use Interfaces.C; - - begin - for i in a'range loop - res(ind) := a(i); - ind := ind+1; - end loop; - for i in b'range loop - res(ind) := b(i); - ind := ind+1; - end loop; - return res; - end Concat; - -end C_Double_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -with Interfaces.C; -with Interfaces.C.Pointers; - -package C_Double_Arrays is - --- DESCRIPTION : --- This package defines the type "C_Double_Array" to work with arrays --- of C doubles and instantiates the C pointers packages. --- The "Pointer_to_C_Double_Array" is needed to make matrices as --- arrays of arrays of doubles. - - type C_Double_Array is - array ( Interfaces.C.size_t range <> ) of aliased Interfaces.C.double; - - type Pointer_to_C_Double_Array is access C_Double_Array; - - package C_DblArrs is - new Interfaces.C.Pointers(Interfaces.C.size_t, - Interfaces.C.double, - C_Double_Array,0.0); - - function Concat ( a,b : C_Double_Array ) return C_Double_Array; - - -- DESCRIPTION : - -- Concatenates the array b after the array a. - -end C_Double_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays_io.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays_io.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays_io.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -with Interfaces.C; -with C_Double_io; use C_Double_io; - -package body C_Double_Arrays_io is - - procedure put ( n : in natural; v : in C_Double_Array ) is - begin - put(Standard_Output,n,v); - end put; - - procedure put ( file : in file_type; - n : in natural; v : in C_Double_Array ) is - begin - for i in 0..Interfaces.C.size_T(n-1) loop - put(file,v(i)); new_line(file); - end loop; - end put; - -end C_Double_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_arrays_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_arrays_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -with text_io; use text_io; -with C_Double_Arrays; use C_Double_Arrays; - -package C_Double_Arrays_io is - --- DESCRIPTION : --- This package provides output routines for arrays of C doubles. - - procedure put ( n : in natural; v : in C_Double_Array ); - procedure put ( file : in file_type; - n : in natural; v : in C_Double_Array ); - - -- DESCRIPTION : - -- Writes the entries of v from 0 to n-1 to standard output or to file. - -end C_Double_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_double_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_double_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -with text_io; use text_io; -with Interfaces.C; - -package C_Double_io is new text_io.float_io(Interfaces.C.double); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -with Interfaces.C; -with Interfaces.C.Pointers; - -package C_Integer_Arrays is - --- DESCRIPTION : --- This package defines the type "C_Integer_Array" to work with arrays --- of C integers and instantiates the C pointers packages. - - type C_Integer_Array is - array ( Interfaces.C.size_T range <> ) of aliased Interfaces.C.int; - - package C_intarrs is - new Interfaces.C.Pointers(Interfaces.C.size_T, - Interfaces.C.int, - C_Integer_Array,0); - -end C_Integer_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays_io.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays_io.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays_io.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -with Interfaces.C; -with C_Integer_io; use C_Integer_io; - -package body C_Integer_Arrays_io is - - procedure put ( n : in natural; v : in C_Integer_Array ) is - begin - put(Standard_Output,n,v); - end put; - - procedure put ( file : in file_type; - n : in natural; v : in C_Integer_Array ) is - begin - for i in 0..Interfaces.C.size_T(n-1) loop - put(file," "); put(file,v(i),1); - end loop; - end put; - -end C_Integer_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_arrays_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_arrays_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -with text_io; use text_io; -with C_Integer_Arrays; use C_Integer_Arrays; - -package C_Integer_Arrays_io is - --- DESCRIPTION : --- This package provides output routines for arrays of C integers. - - procedure put ( n : in natural; v : in C_Integer_Array ); - procedure put ( file : in file_type; - n : in natural; v : in C_Integer_Array ); - - -- DESCRIPTION : - -- Writes the entries of v from 0 to n-1 to standard output or to file. - -end C_Integer_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_integer_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_integer_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -with text_io; use text_io; -with Interfaces.C; - -package C_Integer_io is new text_io.integer_io(Interfaces.C.int); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.adb 2021-06-30 23:22:40.000000000 +0000 @@ -4,14 +4,14 @@ package body Coefficient_Solution_Vectors is - function Multiplicity ( s : Solution ) return integer is + function Multiplicity ( s : Solution ) return integer32 is begin return s.m; end Multiplicity; function Multiplicities ( s : Solution_List ) return C_Integer_Array is - len : Interfaces.C.size_T := Interfaces.C.size_T(Length_Of(s)); + len : constant Interfaces.C.size_T := Interfaces.C.size_T(Length_Of(s)); res : C_Integer_Array(1..len); tmp : Solution_List := s; ls : Link_to_Solution; @@ -27,7 +27,7 @@ function Coefficients ( s : Solution ) return C_Double_Array is - len : constant natural := 2*s.n + 5; + len : constant natural32 := 2*natural32(s.n) + 5; res : C_Double_Array(1..Interfaces.C.size_T(len)); ind : Interfaces.C.size_T := 2; @@ -51,8 +51,8 @@ function Coefficients ( s : Solution_List ) return C_Double_Array is - n : constant natural := Head_Of(s).n; - len : constant natural := Length_Of(s)*(2*n+5); + n : constant natural32 := natural32(Head_Of(s).n); + len : constant natural32 := Length_Of(s)*(2*n+5); res : C_Double_Array(1..Interfaces.C.size_T(len)); tmp : Solution_List := s; ls : Link_to_Solution; @@ -74,7 +74,7 @@ return res; end Coefficients; - function Concat ( n : natural; m : C_Integer_Array; c : C_Double_Array ) + function Concat ( n : natural32; m : C_Integer_Array; c : C_Double_Array ) return C_Double_Array is d : constant size_T := 8 + m'last-m'first+1 + c'last-c'first+1; @@ -102,9 +102,9 @@ return res; end Concat; - function Dimension ( x : C_Double_Array ) return natural is + function Dimension ( x : C_Double_Array ) return natural32 is begin - return natural(x(1)); + return natural32(x(1)); end Dimension; function Multiplicities ( x : C_Double_Array ) return C_Integer_Array is @@ -131,21 +131,21 @@ begin for i in res'range loop - res(i) := Interfaces.C.double(x(ind)); + res(i) := x(ind); ind := ind + 1; end loop; return res; end Coefficients; - function Create ( n,m : natural; c : C_Double_Array ) return Solution is + function Create ( n,m : natural32; c : C_Double_Array ) return Solution is - res : Solution(n); + res : Solution(integer32(n)); ind : Interfaces.C.size_T := c'first; begin res.t := Create(double_float(c(ind)),double_float(c(ind+1))); - res.m := m; - for i in 1..n loop + res.m := integer32(m); + for i in 1..integer32(n) loop ind := ind + 2; res.v(i) := Create(double_float(c(ind)),double_float(c(ind+1))); end loop; @@ -156,7 +156,7 @@ return res; end Create; - function Create ( n : natural; m : C_Integer_Array; c : C_Double_Array ) + function Create ( n : natural32; m : C_Integer_Array; c : C_Double_Array ) return Solution_List is res,res_last : Solution_List; @@ -165,11 +165,11 @@ begin for i in m'range loop declare - s : Solution(n); + s : Solution(integer32(n)); begin - s.m := integer(m(i)); + s.m := integer32(m(i)); s.t := Create(double_float(c(ind)),double_float(c(ind+1))); - for i in 1..n loop + for i in 1..integer32(n) loop ind := ind + 2; s.v(i) := Create(double_float(c(ind)),double_float(c(ind+1))); end loop; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_solution_vectors.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Solutions; use Standard_Complex_Solutions; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; @@ -10,7 +12,7 @@ -- PART I : converting to the coefficient vector representation - function Multiplicity ( s : Solution ) return integer; + function Multiplicity ( s : Solution ) return integer32; -- DESCRIPTION : -- Returns the multiplicity information of the solution. @@ -37,14 +39,14 @@ -- PART I bis : concatenating the coefficients representation - function Concat ( n : natural; m : C_Integer_Array; c : C_Double_Array ) + function Concat ( n : natural32; m : C_Integer_Array; c : C_Double_Array ) return C_Double_Array; -- DESCRIPTION : -- Concatenates the dimension n, multiplicies m, and coefficients c -- into one long C double array. - function Dimension ( x : C_Double_Array ) return natural; + function Dimension ( x : C_Double_Array ) return natural32; -- DESCRIPTION : -- Returns the dimension of the solution vectors. @@ -61,13 +63,13 @@ -- PART II : creating solutions from the coefficient vector representation - function Create ( n,m : natural; c : C_Double_Array ) return Solution; + function Create ( n,m : natural32; c : C_Double_Array ) return Solution; -- DESCRIPTION : -- Returns an n-dimensional solution of multiplicity m from the -- coefficient vector representation in c. - function Create ( n : natural; m : C_Integer_Array; c : C_Double_Array ) + function Create ( n : natural32; m : C_Integer_Array; c : C_Double_Array ) return Solution_List; -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,4 @@ -with text_io,integer_io; use text_io,integer_io; with Interfaces.C; use Interfaces.C; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Complex_Numbers; use Standard_Complex_Numbers; @@ -10,8 +8,8 @@ function Support ( p : Poly ) return C_Integer_Array is - m : constant natural := natural(Number_of_Terms(p)); - n : constant natural := natural(Number_of_Unknowns(p)); + m : constant natural32 := Number_of_Terms(p); + n : constant natural32 := Number_of_Unknowns(p); numexp : constant size_T := size_T(n*m-1); res : C_Integer_Array(0..numexp); ind : Size_T := 0; @@ -33,7 +31,7 @@ function Coefficients ( p : Poly ) return C_Double_Array is - m : constant natural := natural(Number_of_Terms(p)); + m : constant natural32 := Number_of_Terms(p); numcff : constant size_T := size_T(2*m-1); res : C_Double_Array(0..numcff); ind : Size_T := 0; @@ -53,7 +51,7 @@ return res; end Coefficients; - function Create ( n : natural; c : C_Double_Array; s : C_Integer_Array ) + function Create ( n : natural32; c : C_Double_Array; s : C_Integer_Array ) return Poly is res : Poly := Null_Poly; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_polynomials.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,4 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; @@ -30,7 +31,7 @@ -- number of terms in p. The doubles in the array on return represent -- consecutively the real and imaginary parts of each coefficient. - function Create ( n : natural; c : C_Double_Array; s : C_Integer_Array ) + function Create ( n : natural32; c : C_Double_Array; s : C_Integer_Array ) return Poly; -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,4 @@ -with text_io,integer_io; use text_io,integer_io; with Interfaces.C; use Interfaces.C; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Coefficient_Support_Polynomials; use Coefficient_Support_Polynomials; @@ -19,19 +17,19 @@ return res; end Monomial_Count; - function Sum ( a : C_Integer_Array ) return integer is + function Sum ( a : C_Integer_Array ) return integer32 is - res : integer := 0; + res : integer32 := 0; begin for i in a'range loop - res := res + integer(a(i)); + res := res + integer32(a(i)); end loop; return res; end Sum; - function Support ( n,m : natural; moncnt : C_Integer_Array; p : Poly_Sys ) - return C_Integer_Array is + function Support ( n,m : natural32; moncnt : C_Integer_Array; + p : Poly_Sys ) return C_Integer_Array is res : C_Integer_Array(0..Interfaces.C.size_T(n*m-1)); indmon : Interfaces.C.size_T := 0; @@ -40,8 +38,8 @@ begin for i in p'range loop declare - dimsup : constant natural := natural(moncnt(indmon))*n; - sup : C_Integer_Array(0..Interfaces.C.size_T(dimsup-1)) + dimsup : constant natural32 := natural32(moncnt(indmon))*n; + sup : constant C_Integer_Array(0..Interfaces.C.size_T(dimsup-1)) := Support(p(i)); begin for j in sup'range loop @@ -54,8 +52,8 @@ return res; end Support; - function Coefficients ( m : natural; moncnt : C_Integer_Array; p : Poly_Sys ) - return C_Double_Array is + function Coefficients ( m : natural32; moncnt : C_Integer_Array; + p : Poly_Sys ) return C_Double_Array is res : C_Double_Array(0..Interfaces.C.size_T(2*m-1)); indmon : Interfaces.C.size_T := 0; @@ -64,8 +62,8 @@ begin for i in p'range loop declare - dimcff : constant natural := 2*natural(moncnt(indmon)); - cff : C_Double_Array(0..Interfaces.C.size_T(dimcff-1)) + dimcff : constant natural32 := 2*natural32(moncnt(indmon)); + cff : constant C_Double_Array(0..Interfaces.C.size_T(dimcff-1)) := Coefficients(p(i)); begin for j in cff'range loop @@ -78,7 +76,7 @@ return res; end Coefficients; - function Create ( n : natural; m : C_Integer_Array; + function Create ( n : natural32; m : C_Integer_Array; c : C_Double_Array; s : C_Integer_Array ) return Poly_Sys is @@ -90,9 +88,9 @@ begin for i in res'range loop declare - dimsup : constant natural := n*natural(m(indmon)); + dimsup : constant natural32 := n*natural32(m(indmon)); sup : C_Integer_Array(0..Interfaces.C.size_T(dimsup-1)); - dimcff : constant natural := 2*natural(m(indmon)); + dimcff : constant natural32 := 2*natural32(m(indmon)); cff : C_Double_Array(0..Interfaces.C.size_T(dimcff-1)); begin for j in cff'range loop @@ -110,7 +108,7 @@ return res; end Create; - function Concat ( n : natural; m : C_Integer_Array; + function Concat ( n : natural32; m : C_Integer_Array; c : C_Double_Array; s : C_Integer_Array ) return C_Double_Array is @@ -147,9 +145,9 @@ return res; end Concat; - function Dimension ( x : C_Double_Array ) return natural is + function Dimension ( x : C_Double_Array ) return natural32 is begin - return natural(x(1)); + return natural32(x(1)); end Dimension; function Monomial_Count ( x : C_Double_Array ) return C_Integer_Array is diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/coefficient_support_poly_systems.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ -with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; @@ -19,13 +20,13 @@ -- Returns a C integer array of range 0..p'length with the number of -- monomials in every polynomial of p. - function Sum ( a : C_Integer_Array ) return integer; + function Sum ( a : C_Integer_Array ) return integer32; -- DESCRIPTION : -- Returns the sum of the integers in the array a. - function Support ( n,m : natural; moncnt : C_Integer_Array; p : Poly_Sys ) - return C_Integer_Array; + function Support ( n,m : natural32; moncnt : C_Integer_Array; + p : Poly_Sys ) return C_Integer_Array; -- DESCRIPTION : -- Returns the support of the polynomial p as a one dimensional array @@ -35,8 +36,8 @@ -- The array on return is a sequence of blocks of n numbers, -- where each block encodes an exponent vector of a monomial of p. - function Coefficients ( m : natural; moncnt : C_Integer_Array; p : Poly_Sys ) - return C_Double_Array; + function Coefficients ( m : natural32; moncnt : C_Integer_Array; + p : Poly_Sys ) return C_Double_Array; -- DESCRIPTION : -- Returns the coefficients of the system p as a one dimensional @@ -44,7 +45,7 @@ -- number of terms in p. The doubles in the array on return represent -- consecutively the real and imaginary parts of each coefficient. - function Create ( n : natural; m : C_Integer_Array; + function Create ( n : natural32; m : C_Integer_Array; c : C_Double_Array; s : C_Integer_Array ) return Poly_Sys; -- DESCRIPTION : @@ -55,7 +56,7 @@ -- If m(i) is the number of monomials of the i-th polynomial on return, -- then c'length is 2*m(i) and s'length is a multiple of n*m(i). - function Concat ( n : natural; m : C_Integer_Array; + function Concat ( n : natural32; m : C_Integer_Array; c : C_Double_Array; s : C_Integer_Array ) return C_Double_Array; @@ -65,7 +66,7 @@ -- Applying the next four function to the result of Concat allows -- to reconstruct the polynomial system. - function Dimension ( x : C_Double_Array ) return natural; + function Dimension ( x : C_Double_Array ) return natural32; -- DESCRIPTION : -- Returns the dimension from the concatenated coefficient diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/cosupoly.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/cosupoly.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/cosupoly.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/cosupoly.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with C_Integer_io,C_Double_io; use C_Integer_io,C_Double_io; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; @@ -7,8 +11,8 @@ with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; with Coefficient_Support_Polynomials; use Coefficient_Support_Polynomials; -procedure cosupoly ( n : in integer; s : in C_intarrs.Pointer; - m : in integer; c : in C_dblarrs.Pointer ) is +procedure cosupoly ( n : in integer32; s : in C_intarrs.Pointer; + m : in integer32; c : in C_dblarrs.Pointer ) is -- DESCRIPTION : -- The support vector s has range 0..n-1 and the coefficient @@ -18,7 +22,7 @@ := C_intarrs.Value(s,Interfaces.C.ptrdiff_T(n)); cva : C_Double_Array(0..Interfaces.C.size_T(m-1)) := C_dblarrs.Value(c,Interfaces.C.ptrdiff_T(m)); - numvars : constant natural := n/(m/2); + numvars : constant natural32 := natural32(n)/(natural32(m)/2); p : Poly := Create(numvars,cva,sva); begin diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/cosupsys.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/cosupsys.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/cosupsys.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/cosupsys.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,8 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with C_Integer_io,C_Double_io; use C_Integer_io,C_Double_io; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; @@ -7,9 +10,9 @@ with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; with Coefficient_Support_Poly_Systems; use Coefficient_Support_Poly_Systems; -procedure cosupsys ( n,m : in integer; mc : in C_intarrs.Pointer; - ns : in integer; s : in C_intarrs.Pointer; - nc : in integer; c : in C_dblarrs.Pointer ) is +procedure cosupsys ( n,m : in integer32; mc : in C_intarrs.Pointer; + ns : in integer32; s : in C_intarrs.Pointer; + nc : in integer32; c : in C_dblarrs.Pointer ) is -- DESCRIPTION : -- The number of monomials in the i-th equation is mc[i], where @@ -54,7 +57,7 @@ put(" "); put(cva(Interfaces.C.size_T(i))); new_line; end loop; - p := Create(n,mva,cva,sva); + p := Create(natural32(n),mva,cva,sva); put_line("The polynomial system defined by coefficients and support : "); put_line(p); end cosupsys; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_to_ada_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_to_ada_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_to_ada_arrays.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_to_ada_arrays.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ -with Interfaces.C; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Numbers; -with Double_Double_Numbers; use Double_Double_Numbers; -with DoblDobl_Complex_Numbers; -with Quad_Double_Numbers; use Quad_Double_Numbers; -with QuadDobl_Complex_Numbers; - -package body C_to_Ada_Arrays is - - function Convert ( v : C_Integer_Array ) - return Standard_Integer_Vectors.Vector is - - res : Standard_Integer_Vectors.Vector(0..integer32(v'length)-1); - - begin - for i in v'range loop - res(integer32(i)) := integer32(v(i)); - end loop; - return res; - end Convert; - - function Convert ( v : Standard_Integer_Vectors.Vector ) - return C_Integer_Array is - - res : C_Integer_Array(0..Interfaces.C.size_T(v'length-1)); - ind : Interfaces.C.size_T := 0; - - use Interfaces.C; - - begin - for i in v'range loop - res(ind) := Interfaces.C.int(v(i)); - ind := ind + 1; - end loop; - return res; - end Convert; - - function Convert ( v : C_Double_Array ) - return Standard_Floating_Vectors.Vector is - - res : Standard_Floating_Vectors.Vector(0..integer32(v'length)-1); - - begin - for i in v'range loop - res(integer32(i)) := double_float(v(i)); - end loop; - return res; - end Convert; - - function Convert ( v : Standard_Floating_Vectors.Vector ) - return C_Double_Array is - - res : C_Double_Array(0..Interfaces.C.size_T(v'length-1)); - ind : Interfaces.C.size_T := 0; - - use Interfaces.C; - - begin - for i in v'range loop - res(ind) := Interfaces.C.double(v(i)); - ind := ind + 1; - end loop; - return res; - end Convert; - - function Convert ( v : C_Double_Array ) - return Standard_Complex_Vectors.Vector is - - vlen : constant integer32 := integer32(v'length); - res : Standard_Complex_Vectors.Vector(1..vlen/2); - ind : Interfaces.C.size_T := 0; - - use Interfaces.C,Standard_Complex_Numbers; - - begin - for i in res'range loop - res(i) := Create(double_float(v(ind)),double_float(v(ind+1))); - ind := ind + 2; - end loop; - return res; - end Convert; - - function Convert ( v : Standard_Complex_Vectors.Vector ) - return C_Double_Array is - - res : C_Double_Array(0..Interfaces.C.size_T(2*v'length-1)); - ind : Interfaces.C.size_T := 0; - re,im : double_float; - use Interfaces.C; - - begin - for i in v'range loop - re := Standard_Complex_Numbers.REAL_PART(v(i)); - res(ind) := Interfaces.C.double(re); - ind := ind + 1; - im := Standard_Complex_Numbers.IMAG_PART(v(i)); - res(ind) := Interfaces.C.double(im); - ind := ind + 1; - end loop; - return res; - end Convert; - - function Convert ( v : DoblDobl_Complex_Vectors.Vector ) - return C_Double_Array is - - dim : constant integer32 := v'last; - res : C_Double_Array(0..Interfaces.C.size_T(4*dim)); - ind : Interfaces.C.size_T := 0; - re,im : double_double; - use Interfaces.C; - - begin - for i in v'range loop - re := DoblDobl_Complex_Numbers.REAL_PART(v(i)); - res(ind) := Interfaces.C.double(hi_part(re)); ind := ind + 1; - res(ind) := Interfaces.C.double(lo_part(re)); ind := ind + 1; - im := DoblDobl_Complex_Numbers.IMAG_PART(v(i)); - res(ind) := Interfaces.C.double(hi_part(im)); ind := ind + 1; - res(ind) := Interfaces.C.double(lo_part(im)); ind := ind + 1; - end loop; - return res; - end Convert; - - function Convert ( v : QuadDobl_Complex_Vectors.Vector ) - return C_Double_Array is - - dim : constant integer32 := v'last; - res : C_Double_Array(0..Interfaces.C.size_T(8*dim)); - ind : Interfaces.C.size_T := 0; - re,im : quad_double; - use Interfaces.C; - - begin - for i in v'range loop - re := QuadDobl_Complex_Numbers.REAL_PART(v(i)); - res(ind) := Interfaces.C.double(hihi_part(re)); ind := ind + 1; - res(ind) := Interfaces.C.double(lohi_part(re)); ind := ind + 1; - res(ind) := Interfaces.C.double(hilo_part(re)); ind := ind + 1; - res(ind) := Interfaces.C.double(lolo_part(re)); ind := ind + 1; - im := QuadDobl_Complex_Numbers.IMAG_PART(v(i)); - res(ind) := Interfaces.C.double(hihi_part(im)); ind := ind + 1; - res(ind) := Interfaces.C.double(lohi_part(im)); ind := ind + 1; - res(ind) := Interfaces.C.double(hilo_part(im)); ind := ind + 1; - res(ind) := Interfaces.C.double(lolo_part(im)); ind := ind + 1; - end loop; - return res; - end Convert; - - function Convert ( m : Standard_Complex_Matrices.Matrix ) - return C_Double_Array is - - len : constant integer32 := 2*m'length(1)*m'length(2); - res : C_Double_Array(0..Interfaces.C.size_T(len-1)); - ind : Interfaces.C.size_T := 0; - re,im : double_float; - use Interfaces.C; - - begin - for i in m'range(1) loop - for j in m'range(2) loop - re := Standard_Complex_Numbers.REAL_PART(m(i,j)); - res(ind) := Interfaces.C.double(re); - ind := ind + 1; - im := Standard_Complex_Numbers.IMAG_PART(m(i,j)); - res(ind) := Interfaces.C.double(im); - ind := ind + 1; - end loop; - end loop; - return res; - end Convert; - -end C_to_Ada_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_to_ada_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_to_ada_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/c_to_ada_arrays.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/c_to_ada_arrays.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -with C_Integer_Arrays; use C_Integer_Arrays; -with C_Double_Arrays; use C_Double_Arrays; -with Standard_Integer_Vectors; -with Standard_Floating_Vectors; -with Standard_Complex_Vectors; -with DoblDobl_Complex_Vectors; -with QuadDobl_Complex_Vectors; -with Standard_Complex_Matrices; - -package C_to_Ada_Arrays is - --- DESCRIPTION : --- This package offers conversion operators between arrays of --- integers and doubles, to interface with C, and the vector types --- defined in PHCpack. Note that C arrays always start at 0. - - function Convert ( v : C_Integer_Array ) - return Standard_Integer_Vectors.Vector; - function Convert ( v : Standard_Integer_Vectors.Vector ) - return C_Integer_Array; - - -- DESCRIPTION : - -- Conversion between arrays of C integers and Ada integers. - - function Convert ( v : C_Double_Array ) - return Standard_Floating_Vectors.Vector; - function Convert ( v : Standard_Floating_Vectors.Vector ) - return C_Double_Array; - - -- DESCRIPTION : - -- Conversion between arrays of C doubles and Ada doubles. - - function Convert ( v : C_Double_Array ) - return Standard_Complex_Vectors.Vector; - - -- DESCRIPTION : - -- Converts a double array into an array of complex numbers, - -- the array on return starts at index 1. - - -- REQUIRED : v'length mod 2 = 0. - - function Convert ( v : Standard_Complex_Vectors.Vector ) - return C_Double_Array; - function Convert ( v : DoblDobl_Complex_Vectors.Vector ) - return C_Double_Array; - function Convert ( v : QuadDobl_Complex_Vectors.Vector ) - return C_Double_Array; - - -- DESCRIPTION : - -- Creates an array of doubles with real and imaginary parts of - -- the complex numbers in v. - - function Convert ( m : Standard_Complex_Matrices.Matrix ) - return C_Double_Array; - - -- DESCRIPTION : - -- Creates an array of doubles with real and imaginary parts of - -- the complex numbers in the matrix m, stored consecutively - -- row after row. - -end C_to_Ada_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/funky.gpr phcpack-2.4.85/src/Ada/CtoPHC/Funky/funky.gpr --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/funky.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/funky.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,86 @@ +project funky is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Circuits", "../../Math_Lib/Supports", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../Types"); + for Languages use ("Ada", "C"); + for Excluded_Source_Files use + ( + "ts_ctimer.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "pieri_count.ads", "pieri_count.adb", + "pieri_solver.ads", "pieri_solver.adb", + "phc_solver.ads", "phc_solver.adb", "pieri_solver_trf.adb", + "verify_solution_maps.ads", "verify_solution_maps.adb" + ); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../Types"); + for Excluded_Source_Files use + ( + "ts_ctimer.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "pieri_count.ads", "pieri_count.adb", + "pieri_solver.ads", "pieri_solver.adb", + "phc_solver.ads", "phc_solver.adb", "pieri_solver_trf.adb", + "verify_solution_maps.ads", "verify_solution_maps.adb" + ); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_cosup.adb", -- tests support polynomials + "ts_cosuptoc.adb", -- tests passin polynomials to C + "ts_cosupoly.c", -- C program calling the conversions + "ts_cosupsys.c", -- C program to pass system from C to Ada + "ts_cosuptoc.adb", -- tests passing from Ada to C + "ts_getsys.c", -- tests reading/writing systems + "ts_phc_sys_rw.c", -- tests read/write of systems in C + "ts_csols.adb", -- tests conversion operations + "ts_phc_sol_rw.c", -- tests read/write of solutions in C + "ts_cpm.adb" -- tests complex polynomial matrices + -- "ts_pieri_count.c", -- C function calls Ada Pieri_Count + -- "ts_pieri_solver.c", -- C function calls Ada Pieri_Solver + -- "ts_phc_solver.c" -- C function calls Ada phc_solver + -- "ts_path_tracker.adb" -- Ada program calls path_tracker.c + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + + package Linker is + + for Switches ("ts_cosupoly.c") use ("-lm"); + for Switches ("ts_cosupsys.c") use ("-lm"); + for Switches ("ts_getsys.c") use ("-lm"); + for Switches ("ts_phc_sys_rw.c") use ("-lm"); + for Switches ("ts_phc_sol_rw.c") use ("-lm"); + + end Linker; + +end funky; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/getsys1.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/getsys1.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/getsys1.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/getsys1.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,8 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; @@ -13,20 +17,20 @@ -- DESCRIPTION : -- Calls the PHCpack routines to read a polynomial system. - function getsys2 ( n,m : integer; moncnt : C_Integer_Array; - ns : integer; s : C_Integer_Array; - nc : integer; c : C_Double_Array ) return integer; + function getsys2 ( n,m : integer32; moncnt : C_Integer_Array; + ns : integer32; s : C_Integer_Array; + nc : integer32; c : C_Double_Array ) return integer32; pragma Import(C,getsys2,"getsys2"); procedure Export_to_C ( p : in Poly_Sys ) is - n : constant natural := p'length; - m : constant natural := natural(Number_of_Unknowns(p(p'first))); + n : constant natural32 := natural32(p'length); + m : constant natural32 := Number_of_Unknowns(p(p'first)); moncnt : constant C_Integer_Array := Monomial_Count(p); - monsum : constant natural := Sum(moncnt); + monsum : constant natural32 := natural32(Sum(moncnt)); sup : constant C_Integer_Array := Support(n,monsum,moncnt,p); cff : constant C_Double_Array := Coefficients(monsum,moncnt,p); - return_of_call : integer; + return_of_call : integer32; begin put("The number of equations : "); put(n,1); put_line("."); @@ -35,11 +39,13 @@ put(monsum,1); new_line; put("The support :"); put(sup'length,sup); new_line; put_line("The coefficients "); put(cff'length,cff); - return_of_call := getsys2(n,m,moncnt,sup'length,sup,cff'length,cff); - if return_of_call = 0 - then put_line("Call to C terminated normally."); - else put("Call to C terminated abnormally with exit code "); - put(return_of_call,1); new_line; + return_of_call := getsys2(integer32(n),integer32(m),moncnt, + sup'length,sup,cff'length,cff); + if return_of_call = 0 then + put_line("Call to C terminated normally."); + else + put("Call to C terminated abnormally with exit code "); + put(return_of_call,1); new_line; end if; end Export_to_C; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/getsys3.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/getsys3.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/getsys3.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/getsys3.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with C_Integer_io,C_Double_io; use C_Integer_io,C_Double_io; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_Arrays; use C_Double_Arrays; @@ -8,9 +12,9 @@ with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; with Coefficient_Support_Poly_Systems; use Coefficient_Support_Poly_Systems; -procedure getsys3 ( n,m : in integer; mc : in C_intarrs.Pointer; - ns : in integer; s : in C_intarrs.Pointer; - nc : in integer; c : in C_dblarrs.Pointer ) is +procedure getsys3 ( n,m : in integer32; mc : in C_intarrs.Pointer; + ns : in integer32; s : in C_intarrs.Pointer; + nc : in integer32; c : in C_dblarrs.Pointer ) is -- DESCRIPTION : -- The number of monomials in the i-th equation is mc[i], where @@ -33,7 +37,7 @@ := C_intarrs.Value(s,Interfaces.C.ptrdiff_T(ns)); cva : C_Double_Array(0..Interfaces.C.size_T(nc-1)) := C_dblarrs.Value(c,Interfaces.C.ptrdiff_T(nc)); - p : Poly_Sys(1..integer32(m)); + p : Poly_Sys(1..m); begin put("Number of variables : "); put(n,1); new_line; @@ -55,7 +59,7 @@ put(" "); put(cva(Interfaces.C.size_T(i))); new_line; end loop; - p := Create(n,mva,cva,sva); + p := Create(natural32(n),mva,cva,sva); put_line("The polynomial system defined by coefficients and support : "); put_line(p); end getsys3; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sol_rw.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sol_rw.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sol_rw.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sol_rw.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,27 +1,28 @@ -with system; -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_Solutions; use Standard_Complex_Solutions; with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; with C_Integer_Arrays; use C_Integer_Arrays; with C_Integer_Arrays_io; use C_Integer_Arrays_io; with Coefficient_Solution_Vectors; use Coefficient_Solution_Vectors; -function phc_sol_rw ( rw,size_p : integer; p : C_DblArrs.Pointer ) +function phc_sol_rw ( rw,size_p : integer32; p : C_DblArrs.Pointer ) return C_DblArrs.Pointer is res : C_DblArrs.Pointer; procedure Coefficient_Vector_Representation ( s : in Solution_List ) is - n : constant natural := Head_Of(s).n; + n : constant integer32 := Head_Of(s).n; m : constant C_Integer_Array := Multiplicities(s); c : constant C_Double_Array := Coefficients(s); cct : C_Double_Array(0..Interfaces.C.size_T(size_p-1)) := C_DblArrs.Value(p,Interfaces.C.ptrdiff_T(size_p)); begin - cct := Concat(n,m,c); + cct := Concat(natural32(n),m,c); res := cct(0)'unchecked_access; end Coefficient_Vector_Representation; @@ -29,37 +30,38 @@ cct : constant C_Double_Array := C_DblArrs.Value(p,Interfaces.C.ptrdiff_T(size_p)); - size : constant natural := integer(cct(cct'first)); + size : constant integer32 := integer32(cct(cct'first)); x : C_Double_Array(0..Interfaces.C.size_t(size)) := cct(0..Interfaces.C.size_t(size)); begin - if size > size_p - then put_line("DANGER: MORE ELEMENTS THAN SIZE OF BUFFER !!!"); - put(size,1); put(" > "); put(size_p,1); new_line; + if size > size_p then + put_line("WARNING: MORE ELEMENTS THAN SIZE OF BUFFER !!!"); + put(size,1); put(" > "); put(size_p,1); new_line; end if; declare - n : constant natural := Dimension(x); + n : constant natural32 := Dimension(x); m : constant C_Integer_Array := Multiplicities(cct); c : constant C_Double_Array := Coefficients(x); s : Solution_List := Create(n,m,c); begin if not Is_Null(s) - then put(standard_output,Length_Of(s),Head_Of(s).n,s); + then put(standard_output,Length_Of(s),natural32(Head_Of(s).n),s); end if; end; end Write_Solution_List; begin - if rw = 0 - then new_line; - declare - sols : Solution_List; - begin - Read(sols); - Coefficient_Vector_Representation(sols); - end; - else Write_Solution_List; + if rw = 0 then + new_line; + declare + sols : Solution_List; + begin + Read(sols); + Coefficient_Vector_Representation(sols); + end; + else + Write_Solution_List; end if; return res; end phc_sol_rw; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sol_rw.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sol_rw.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sol_rw.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sol_rw.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,7 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with C_Double_Arrays; use C_Double_Arrays; -function phc_sol_rw ( rw,size_p : integer; p : C_DblArrs.Pointer ) +function phc_sol_rw ( rw,size_p : integer32; p : C_DblArrs.Pointer ) return C_DblArrs.Pointer; -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sys_rw.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sys_rw.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sys_rw.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sys_rw.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,23 +1,24 @@ -with system; -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; with C_Integer_Arrays; use C_Integer_Arrays; -with C_Integer_Arrays_io; use C_Integer_Arrays_io; with Coefficient_Support_Poly_Systems; use Coefficient_Support_Poly_Systems; -function phc_sys_rw ( rw,size_p : integer; p : C_DblArrs.Pointer ) +function phc_sys_rw ( rw,size_p : integer32; p : C_DblArrs.Pointer ) return C_DblArrs.Pointer is res : C_DblArrs.Pointer; procedure Coefficient_Support_Representation ( s : in Poly_Sys ) is - n : constant natural := Number_of_Unknowns(s(s'first)); + n : constant natural32 := Number_of_Unknowns(s(s'first)); mon : constant C_Integer_Array := Monomial_Count(s); - moncnt : constant natural := Sum(mon); + moncnt : constant natural32 := natural32(Sum(mon)); sup : constant C_Integer_Array := Support(n,moncnt,mon,s); cff : constant C_Double_Array := Coefficients(moncnt,mon,s); cct : C_Double_Array(0..Interfaces.C.size_T(size_p-1)) @@ -32,37 +33,37 @@ cct : constant C_Double_Array := C_DblArrs.Value(p,Interfaces.C.ptrdiff_T(size_p)); - size : constant natural := integer(cct(cct'first)); - x : C_Double_Array(0..Interfaces.C.size_t(size)) + size : constant natural32 := natural32(cct(cct'first)); + x : constant C_Double_Array(0..Interfaces.C.size_t(size)) := cct(0..Interfaces.C.size_t(size)); begin - if size > size_p - then put_line("DANGER: MORE ELEMENTS THAN SIZE OF BUFFER !!!"); - put(size,1); put(" > "); put(size_p,1); new_line; + if integer32(size) > size_p then + put_line("WARNING: MORE ELEMENTS THAN SIZE OF BUFFER !!!"); + put(size,1); put(" > "); put(size_p,1); new_line; end if; declare - n : constant natural := Dimension(x); + n : constant natural32 := Dimension(x); m : constant C_Integer_Array := Monomial_Count(cct); s : constant C_Integer_Array := Support(x); c : constant C_Double_Array := Coefficients(x); ps : constant Poly_Sys := Create(n,m,c,s); - k : natural := integer(m'last)-1; begin put(ps); end; end Write_Polynomial_System; begin - if rw = 0 - then new_line; - declare - lp : Link_to_Poly_Sys; - begin - get(lp); - Coefficient_Support_Representation(lp.all); - end; - else Write_Polynomial_System; + if rw = 0 then + new_line; + declare + lp : Link_to_Poly_Sys; + begin + get(lp); + Coefficient_Support_Representation(lp.all); + end; + else + Write_Polynomial_System; end if; return res; end phc_sys_rw; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sys_rw.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sys_rw.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/phc_sys_rw.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/phc_sys_rw.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,7 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with C_Double_Arrays; use C_Double_Arrays; -function phc_sys_rw ( rw,size_p : integer; p : C_DblArrs.Pointer ) +function phc_sys_rw ( rw,size_p : integer32; p : C_DblArrs.Pointer ) return C_DblArrs.Pointer; -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/pieri_count.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/pieri_count.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/pieri_count.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/pieri_count.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -with Localization_Posets; use Localization_Posets; - -function Pieri_Count ( m,p,q : integer ) return integer is - - root : Node(p) := Trivial_Root(m,p,q); - lnkroot : Link_to_Node := new Node'(root); - nq : constant natural := m*p + q*(m+p); - level_poset : Array_of_Nodes(0..nq); - -begin - Q_Top_Bottom_Create(lnkroot,root.bottom(p),m+p); - level_poset := Create_Leveled_Poset(lnkroot); - Count_Roots(level_poset); - return level_poset(level_poset'last).roco; -end Pieri_Count; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/pieri_count.ads phcpack-2.4.85/src/Ada/CtoPHC/Funky/pieri_count.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/pieri_count.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/pieri_count.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -function Pieri_Count ( m,p,q : integer ) return integer; - --- DESCRIPTION : --- Returns the number of maps of degree q that produce p-planes --- meeting n given generic m-planes at n specified interpolation points, --- where n equals m*p + q*(m+p). diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/READ_ME phcpack-2.4.85/src/Ada/CtoPHC/Funky/READ_ME --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Calling PHCpack from C functions in PHCv2.4.82 +Calling PHCpack from C functions in PHCv2.4.85 This directory was originally created in release 2.1, to use the Pieri homotopies in linear systems control. @@ -40,21 +40,19 @@ In mixing C with Ada we give the extension, because sometimes we give the same name (but different suffix) to related C and Ada routines. +In v2.4.85, moved the C type definitions to the ../Types folder. + +Run "gprbuild funky.gpr" to make all test procedures. +On windows, type "gprbuild funky.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean funky.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ pass_poly.c : passing polynomial as a string print_poly.adb : routine called by pass_poly ------------------------------------------------------------------------------ -c_integer_io : input/output of C integers -c_integer_arrays : defines arrays of C integers -c_integer_arrays_io : output of arrays of C integers -c_double_io : input/output of C doubles -c_double_arrays : defines arrays of C doubles -c_double_arrays_io : output of arrays of C doubles -c_to_ada_arrays : converting arrays between C and Ada -ts_arrays : interactive test of array conversions ------------------------------------------------------------------------------- coefficient_support_polynomials : convert between polynomials and vectors coefficient_support_poly_systems : convert between systems and vectors ts_cosup : interactive testing facility @@ -79,8 +77,7 @@ phc_sol_rw.adb : read/write of solution lists ts_phc_sol_rw.c : test on read/write of solutions in C ------------------------------------------------------------------------------ -pieri_count.adb : returns Pieri root count, given (m,p,q) -ts_pieri_count.c : C function calls Ada Pieri_Count +ts_pieri_count.c : C function calls Ada Pieri_Root_Count pieri_sols.c : C function takes output of Pieri_Solver complex_polynomial_matrices : matrices of univariate complex polynomials complex_polynomial_matrices_io : i/o of complex polynomial matrices diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_arrays.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_arrays.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,154 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Communications_with_User; use Communications_with_User; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; -with Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with Standard_Complex_Vectors; -with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; -with Interfaces.C; -with C_integer_io; use C_Integer_io; -with C_Integer_Arrays; use C_Integer_Arrays; -with C_Integer_Arrays_io; use C_Integer_Arrays_io; -with C_Double_io; use C_Double_io; -with C_Double_Arrays; use C_Double_Arrays; -with C_Double_Arrays_io; use C_Double_Arrays_io; -with C_to_Ada_Arrays; use C_to_Ada_Arrays; - -procedure ts_arrays is - --- DESCRIPTION : --- This package allows interactive testing of the conversions --- between the various array types in C and Ada. - - procedure Test_C_to_Ada_Integer_Array is - - -- DESCRIPTION : - -- Reads in an array of C integers and writes the converted Ada array. - - n : natural; - - begin - put("Give the number of elements in the array : "); get(n); - declare - ca : C_Integer_Array(0..Interfaces.C.size_T(n-1)); - begin - put("Give "); put(n,1); put(" integers : "); - for i in ca'range loop - get(ca(i)); - end loop; - put("Your integer array : "); put(n,ca); new_line; - declare - aa : constant Standard_Integer_Vectors.Vector := Convert(ca); - begin - put("The Ada array : "); put(aa); new_line; - end; - end; - end Test_C_to_Ada_Integer_Array; - - procedure Test_C_Double_to_Ada_Complex_Array is - - -- DESCRIPTION : - -- Reads in an array of C doubles and writes the converted Ada - -- array of complex numbers. - - n : natural; - - begin - loop - put("Give the number of elements in the array : "); get(n); - exit when n mod 2 = 0; - put(" "); put(n,1); - put_line(" is not a multiple of 2. Please try again..."); - end loop; - declare - ca : C_Double_Array(0..Interfaces.C.size_T(n-1)); - begin - put("Give "); put(n,1); put(" doubles : "); - for i in ca'range loop - get(ca(i)); - end loop; - put_line("Your double array : "); put(n,ca); - declare - aa : constant Standard_Complex_Vectors.Vector := Convert(ca); - begin - put_line("The Ada complex array : "); - put_line(aa); - end; - end; - end Test_C_Double_to_Ada_Complex_Array; - - procedure Test_Ada_to_C_Integer_Array is - - a,b : integer32 := 0; - - begin - put("Give lower index : "); get(a); - put("Give upper index : "); get(b); - declare - aa : Standard_Integer_Vectors.Vector(a..b); - begin - put("Give "); put(b-a+1,1); put(" integers : "); - for i in aa'range loop - aa(i) := 0; get(aa(i)); - end loop; - put("Your integer array : "); put(aa); new_line; - declare - ca : constant C_Integer_Array := Convert(aa); - begin - put("The C integer array : "); put(ca'length,ca); new_line; - end; - end; - end Test_Ada_to_C_Integer_Array; - - procedure Test_Ada_Complex_to_C_Double_Array is - - a,b : integer32 := 0; - - begin - put("Give lower index : "); get(a); - put("Give upper index : "); get(b); - declare - aa : Standard_Complex_Vectors.Vector(a..b); - begin - put("Give "); put(b-a+1,1); put(" complex numbers : "); - for i in aa'range loop - get(aa(i)); - end loop; - put_line("Your complex array : "); put_line(aa); - declare - ca : constant C_Double_Array := Convert(aa); - begin - put_line("The C double array : "); put(ca'length,ca); - end; - end; - end Test_Ada_Complex_to_C_Double_Array; - - procedure Main is - - ans : character; - - begin - new_line; - put_line("Conversion between C and Ada arrays."); - new_line; - put_line("MENU to convert arrays from C to Ada and from Ada to C :"); - put_line(" 1. convert C integer array into Ada integer array;"); - put_line(" 2. convert Ada integer array into C integer array;"); - put_line(" 3. convert C double array into Ada complex array;"); - put_line(" 4. convert Ada complex array into C double array;"); - put("Type 1, 2, 3 or 4 to choose : "); Ask_Alternative(ans,"1234"); - new_line; - case ans is - when '1' => Test_C_to_Ada_Integer_Array; - when '2' => Test_Ada_to_C_Integer_Array; - when '3' => Test_C_Double_to_Ada_Complex_Array; - when '4' => Test_Ada_Complex_to_C_Double_Array; - when others => null; - end case; - end Main; - -begin - Main; -end ts_arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_cosup.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_cosup.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_cosup.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_cosup.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,13 +1,12 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Interfaces.C; use Interfaces.C; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; with C_Integer_io; with C_Integer_Arrays; use C_Integer_Arrays; with C_Double_io; with C_Double_Arrays; use C_Double_Arrays; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Natural_Vectors; with Symbol_Table; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; @@ -46,7 +45,7 @@ end loop; end put; - procedure Test_Poly_Creation ( n,m : in natural ) is + procedure Test_Poly_Creation ( n,m : in natural32 ) is numexp : constant size_T := size_T(n*m-1); numcff : constant size_T := size_T(2*m-1); @@ -88,7 +87,7 @@ procedure Test_Cosup_to_Poly is - n,m : natural; + n,m : natural32 := 0; begin new_line; @@ -101,7 +100,7 @@ procedure Test_Cosup_to_Poly_Sys is - n,m : natural; + n,m : natural32 := 0; begin new_line; @@ -114,7 +113,7 @@ procedure Test_Poly_to_Cosup is p,q : Poly; - n : natural; + n : natural32 := 0; begin new_line; @@ -147,9 +146,9 @@ new_line; get(lp); declare - n : constant natural := Number_of_Unknowns(lp(lp'first)); + n : constant natural32 := Number_of_Unknowns(lp(lp'first)); mon : constant C_Integer_Array := Monomial_Count(lp.all); - moncnt : constant natural := Sum(mon); + moncnt : constant natural32 := natural32(Sum(mon)); sup : constant C_Integer_Array := Support(n,moncnt,mon,lp.all); begin put("The number of monomials : "); put(mon); @@ -164,7 +163,7 @@ -- Writes the polynomial system from its concatenated -- coefficient support representation. - n : constant natural := Dimension(x); + n : constant natural32 := Dimension(x); m : constant C_Integer_Array := Monomial_Count(x); s : constant C_Integer_Array := Support(x); c : constant C_Double_Array := Coefficients(x); @@ -184,9 +183,9 @@ new_line; get(lp); declare - n : constant natural := Number_of_Unknowns(lp(lp'first)); + n : constant natural32 := Number_of_Unknowns(lp(lp'first)); mon : constant C_Integer_Array := Monomial_Count(lp.all); - moncnt : constant natural := Sum(mon); + moncnt : constant natural32 := natural32(Sum(mon)); sup : constant C_Integer_Array := Support(n,moncnt,mon,lp.all); cff : constant C_Double_Array := Coefficients(moncnt,mon,lp.all); cct : constant C_Double_Array := Concat(n,mon,cff,sup); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_cosuptoc.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_cosuptoc.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_cosuptoc.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_cosuptoc.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Symbol_Table; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; @@ -14,52 +18,56 @@ procedure ts_cosuptoc is - function cosupoly_to_c ( n,ns : integer; s : C_Integer_Array; - nc : integer; c : C_Double_Array ) return integer; + function cosupoly_to_c ( n,ns : integer32; s : C_Integer_Array; + nc : integer32; c : C_Double_Array ) + return integer32; pragma Import(C,cosupoly_to_c,"cosupoly_to_c"); -- DESCRIPTION : -- The function passes the coefficient-support representation of a -- polynomial in n variables from Ada to C. - function cosupsys_to_c ( n,m : integer; moncnt : C_Integer_Array; - ns : integer; s : C_Integer_Array; - nc : integer; c : C_Double_Array ) return integer; + function cosupsys_to_c ( n,m : integer32; moncnt : C_Integer_Array; + ns : integer32; s : C_Integer_Array; + nc : integer32; c : C_Double_Array ) + return integer32; pragma Import(C,cosupsys_to_c,"cosupsys_to_c"); -- DESCRIPTION : -- The function passes the coefficient-support representation of a -- system of n equations in m variables from Ada to C. - procedure Export_to_C ( n : in natural; p : in Poly ) is + procedure Export_to_C ( n : in natural32; p : in Poly ) is -- DESCRIPTION : -- Converts the polynomial to a representation for export to C. sup : constant C_Integer_Array := Support(p); cff : constant C_Double_Array := Coefficients(p); - return_of_call : integer; + return_of_call : integer32; begin put("The support :"); put(sup'length,sup); new_line; put_line("The coefficients : "); put(cff'length,cff); - return_of_call := cosupoly_to_c(n,sup'length,sup,cff'length,cff); - if return_of_call = 0 - then put_line("Call to C terminated normally."); - else put("Call to C terminated abnormally with exit code "); - put(return_of_call,1); new_line; + return_of_call + := cosupoly_to_c(integer32(n),sup'length,sup,cff'length,cff); + if return_of_call = 0 then + put_line("Call to C terminated normally."); + else + put("Call to C terminated abnormally with exit code "); + put(return_of_call,1); new_line; end if; end Export_to_C; procedure Export_to_C ( p : in Poly_Sys ) is - n : constant natural := p'length; - m : constant natural := Number_of_Unknowns(p(p'first)); + n : constant natural32 := natural32(p'length); + m : constant natural32 := Number_of_Unknowns(p(p'first)); moncnt : constant C_Integer_Array := Monomial_Count(p); - monsum : constant natural := Sum(moncnt); + monsum : constant natural32 := natural32(Sum(moncnt)); sup : constant C_Integer_Array := Support(n,monsum,moncnt,p); cff : constant C_Double_Array := Coefficients(monsum,moncnt,p); - return_of_call : integer; + return_of_call : integer32; begin put("The number of equations : "); put(n,1); put_line("."); @@ -68,17 +76,20 @@ put(monsum,1); new_line; put("The support :"); put(sup'length,sup); new_line; put_line("The coefficients "); put(cff'length,cff); - return_of_call := cosupsys_to_c(n,m,moncnt,sup'length,sup,cff'length,cff); - if return_of_call = 0 - then put_line("Call to C terminated normally."); - else put("Call to C terminated abnormally with exit code "); - put(return_of_call,1); new_line; + return_of_call + := cosupsys_to_c(integer32(n),integer32(m),moncnt, + sup'length,sup,cff'length,cff); + if return_of_call = 0 then + put_line("Call to C terminated normally."); + else + put("Call to C terminated abnormally with exit code "); + put(return_of_call,1); new_line; end if; end Export_to_C; procedure Main is - n : natural; + n : natural32 := 0; p : Poly; ans : character; lp : Link_to_Poly_Sys; @@ -89,15 +100,16 @@ put_line(" 2. export a polynomial system from Ada to C."); put("Type 1 or 2 to make your choice : "); Ask_Alternative(ans,"12"); - if ans = '1' - then put("Give the number of variables : "); get(n); - Symbol_Table.Init(n); - put("Give a polynomial terminate with semicolon : "); get(p); - put("Your polynomial is "); put(p); new_line; - Export_to_C(n,p); - else new_line; - get(lp); - Export_to_C(lp.all); + if ans = '1' then + put("Give the number of variables : "); get(n); + Symbol_Table.Init(n); + put("Give a polynomial terminate with semicolon : "); get(p); + put("Your polynomial is "); put(p); new_line; + Export_to_C(n,p); + else + new_line; + get(lp); + Export_to_C(lp.all); end if; end Main; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_csols.adb phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_csols.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_csols.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_csols.adb 2021-06-30 23:22:40.000000000 +0000 @@ -24,7 +24,7 @@ begin -- put(file,"The Multiplicities : "); put(file,m); new_line(file); -- put_line(file,"The Coefficients : "); put_line(file,c); - s := Create(natural(n),m,c); + s := Create(natural32(n),m,c); put_line(file,"The created solution list :"); put(file,Length_Of(s),natural32(Head_Of(s).n),s); end Test_Conversions; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_pieri_count.c phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_pieri_count.c --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/ts_pieri_count.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/ts_pieri_count.c 2021-06-30 23:22:40.000000000 +0000 @@ -2,7 +2,7 @@ #include -extern int _ada_pieri_count(int m, int p, int q); +extern int _ada_pieri_root_count(int m, int p, int q); extern void adainit(); extern void adafinal(); @@ -16,7 +16,7 @@ printf("Give the degree of the maps : "); scanf("%d",&q); adainit(); - root_number = _ada_pieri_count(m,p,q); + root_number = _ada_pieri_root_count(m,p,q); adafinal(); printf("The number of the roots : %d\n", root_number); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Funky/UPDATES phcpack-2.4.85/src/Ada/CtoPHC/Funky/UPDATES --- phcpack-2.4.84/src/Ada/CtoPHC/Funky/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Funky/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,16 @@ +Sun 27 Jun 2021 : removed the obsolete pieri_count, updated ts_pieri_count.c + to call the pieri_root_count of the Pieri folder. + +Wed 16 Jun 2021 : added ts_cpm.adb to the Main list of funky.gpr. + +Tue 15 Jun 2021 : fixed coefficient_support_{polynomials, poly_systems}, + coefficient_solution_vectors, cosupoly.adb, cosupsys.adb, ts_cosup.adb, + ts_cosuptoc.adb, getsys1.adb, getsys3.adb, phc_sys_rw, phc_sol_rw, + ts_csols.adb, with an initial version of funky.gpr. + +Mon 14 Jun 2021 : moved c_double_arrays*, c_integer_arrays*, ts_arrays.adb + c_double_io.ads, c_integer_io.ads, c_to_ada_arrays* to ../Types. + Sun 29 Nov 2020 : updated pieri_solver.adb for the renaming of the package drivers_for_input_planes into make_input_planes. diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/READ_ME phcpack-2.4.85/src/Ada/CtoPHC/READ_ME --- phcpack-2.4.84/src/Ada/CtoPHC/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -An interface to call PHCpack from C functions in PHCv2.4.13 +An interface to call PHCpack from C functions in PHCv2.4.85 This directory was created in release 2.1 to call the Pieri homotopies from C programs and for parallel implementations of the path trackers. @@ -6,6 +6,16 @@ (1) Funky, a functional interface: C -> Ada -> C; and (2) State, a state machine usage: C <-> Ada. +In version 2.4.85, the folder Types was added with the definitions +of C types equivalent to the basic types in Ada. +The folder Structures defines packages to wrap systems and solutions. + + CtoPHC : 6. interface from C to phc + |-- Types : 6.1. C types equivalent to Ada + |-- Structures : 6.2. system and solution wrappers + |-- Funky : 6.3. functional interface, C -> Ada -> C + |-- State : 6.4. state machine gateway, C <-> Ada + While in both cases, the main program is written in C and calls an Ada procedure, the two subdirectories implement two fundamentally different types of interfaces. diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/assignments_in_ada_and_c.adb phcpack-2.4.85/src/Ada/CtoPHC/State/assignments_in_ada_and_c.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/assignments_in_ada_and_c.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/assignments_in_ada_and_c.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,547 +0,0 @@ -with Interfaces.C; use Interfaces.C; -with Characters_and_Numbers; use Characters_and_Numbers; - -package body Assignments_in_Ada_and_C is - - procedure Assign ( this : in integer32; to_that : in C_intarrs.Pointer ) is - - val : C_Integer_Array(0..0); -- := C_intarrs.Value(to_that); - - begin - val(0) := Interfaces.C.int(this); - C_intarrs.Copy_Array(val(0)'unchecked_access,to_that,1); - end Assign; - - procedure Assign ( this : in C_intarrs.Pointer; to_that : out integer32 ) is - - val : constant C_Integer_Array := C_intarrs.Value(this); - - begin - to_that := integer32(val(val'first)); - end Assign; - - procedure Assign ( this : in double_float; - to_that : in C_dblarrs.Pointer ) is - - val : C_Double_Array(0..0); -- := C_dblarrs.Value(to_that); - - begin - val(0) := Interfaces.C.double(this); - C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,1); - end Assign; - - procedure Assign ( this : in C_dblarrs.Pointer; - to_that : out double_float ) is - - val : constant C_Double_Array := C_dblarrs.Value(this); - - begin - to_that := double_float(val(val'first)); - end Assign; - - procedure Assign ( this : in double_double; - to_that : in C_dblarrs.Pointer ) is - - val : C_Double_Array(0..1); - - begin - val(0) := Interfaces.C.double(hi_part(this)); - val(1) := Interfaces.C.double(lo_part(this)); - C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,2); - end Assign; - - procedure Assign ( this : in C_dblarrs.Pointer; - to_that : out double_double ) is - - val : constant C_Double_Array := C_dblarrs.Value(this,2); - - begin - to_that := Create(double_float(val(0)),double_float(val(1))); - end Assign; - - procedure Assign ( this : in quad_double; - to_that : in C_dblarrs.Pointer ) is - - val : C_Double_Array(0..3); - - begin - val(0) := Interfaces.C.double(hihi_part(this)); - val(1) := Interfaces.C.double(lohi_part(this)); - val(2) := Interfaces.C.double(hilo_part(this)); - val(3) := Interfaces.C.double(lolo_part(this)); - C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,4); - end Assign; - - procedure Assign ( this : in C_dblarrs.Pointer; - to_that : out quad_double ) is - - val : constant C_Double_Array := C_dblarrs.Value(this,4); - hihi : constant double_float := double_float(val(0)); - lohi : constant double_float := double_float(val(1)); - hilo : constant double_float := double_float(val(2)); - lolo : constant double_float := double_float(val(3)); - - begin - to_that := create(hihi,lohi,hilo,lolo); - end Assign; - - procedure Assign ( ada_cf : in Standard_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ) is - - use Standard_Complex_Numbers; - - val : C_Double_Array(0..1); - - begin - val(0) := Interfaces.C.double(REAL_PART(ada_cf)); - val(1) := Interfaces.C.double(IMAG_PART(ada_cf)); - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,2); - end Assign; - - procedure Assign ( ada_cf : in DoblDobl_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ) is - - use DoblDobl_Complex_Numbers; - - r : constant double_double := REAL_PART(ada_cf); - i : constant double_double := IMAG_PART(ada_cf); - - val : C_Double_Array(0..3); - - begin - val(0) := Interfaces.C.double(hi_part(r)); - val(1) := Interfaces.C.double(lo_part(r)); - val(2) := Interfaces.C.double(hi_part(i)); - val(3) := Interfaces.C.double(lo_part(i)); - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,4); - end Assign; - - procedure Assign ( ada_cf : in QuadDobl_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ) is - - use QuadDobl_Complex_Numbers; - - r : constant quad_double := REAL_PART(ada_cf); - i : constant quad_double := IMAG_PART(ada_cf); - - val : C_Double_Array(0..7); - - begin - val(0) := Interfaces.C.double(hihi_part(r)); - val(1) := Interfaces.C.double(lohi_part(r)); - val(2) := Interfaces.C.double(hilo_part(r)); - val(3) := Interfaces.C.double(lolo_part(r)); - val(4) := Interfaces.C.double(hihi_part(i)); - val(5) := Interfaces.C.double(lohi_part(i)); - val(6) := Interfaces.C.double(hilo_part(i)); - val(7) := Interfaces.C.double(lolo_part(i)); - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,8); - end Assign; - - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out Standard_Complex_Numbers.Complex_Number ) is - - use Standard_Complex_Numbers; - - val : constant C_Double_Array := C_dblarrs.Value(c_cf,2); - - begin - ada_cf := Create(double_float(val(0)),double_float(val(1))); - end Assign; - - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out DoblDobl_Complex_Numbers.Complex_Number ) is - - val : constant C_Double_Array := C_dblarrs.Value(c_cf,4); - - r : constant double_double - := create(double_float(val(0)),double_float(val(1))); - i : constant double_double - := create(double_float(val(0)),double_float(val(1))); - - begin - ada_cf := DoblDobl_Complex_Numbers.Create(r,i); - end Assign; - - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out QuadDobl_Complex_Numbers.Complex_Number ) is - - val : constant C_Double_Array := C_dblarrs.Value(c_cf,8); - - r : constant quad_double - := create(double_float(val(0)),double_float(val(1)), - double_float(val(2)),double_float(val(3))); - i : constant quad_double - := create(double_float(val(4)),double_float(val(5)), - double_float(val(6)),double_float(val(7))); - - begin - ada_cf := QuadDobl_Complex_Numbers.Create(r,i); - end Assign; - - procedure Assign ( ada_d : in Standard_Natural_Vectors.Vector; - c_d : in C_intarrs.Pointer ) is - - nd : constant natural32 := natural32(ada_d'last); - val : C_Integer_Array(0..Interfaces.C.size_t(nd-1)); - ind : Interfaces.C.size_t := 0; - - begin - for i in ada_d'range loop - val(ind) := Interfaces.C.int(ada_d(i)); - ind := ind + 1; - end loop; - C_intarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(nd)); - end Assign; - - procedure Assign ( ada_d : in Standard_Integer_Vectors.Vector; - c_d : in C_intarrs.Pointer ) is - - nd : constant natural32 := natural32(ada_d'last); - val : C_Integer_Array(0..Interfaces.C.size_t(nd-1)); - ind : Interfaces.C.size_t := 0; - - begin - for i in ada_d'range loop - val(ind) := Interfaces.C.int(ada_d(i)); - ind := ind + 1; - end loop; - C_intarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(nd)); - end Assign; - - procedure Assign ( ada_d : in Standard_Floating_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - nd : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(nd-1)); - ind : Interfaces.C.size_t := 0; - - begin - for i in ada_d'range loop - val(ind) := Interfaces.C.double(ada_d(i)); - ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(nd)); - end Assign; - - procedure Assign ( ada_d : in Double_Double_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - nd : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(2*nd-1)); - ind : Interfaces.C.size_t := 0; - nbr : double_double; - - begin - for i in ada_d'range loop - nbr := ada_d(i); - val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(2*nd)); - end Assign; - - procedure Assign ( ada_d : in Quad_Double_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - nd : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(4*nd-1)); - ind : Interfaces.C.size_t := 0; - nbr : quad_double; - - begin - for i in ada_d'range loop - nbr := ada_d(i); - val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(4*nd)); - end Assign; - - procedure Assign ( ada_d : in Standard_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - use Standard_Complex_Numbers; - - v_n : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(2*v_n-1)) - := C_dblarrs.Value(c_d); - ind : Interfaces.C.size_t := 0; - - begin - for i in 1..integer32(v_n) loop - val(ind) := Interfaces.C.double(REAL_PART(ada_d(i))); - ind := ind + 1; - val(ind) := Interfaces.C.double(IMAG_PART(ada_d(i))); - ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(2*v_n)); - end Assign; - - procedure Assign ( ada_d : in DoblDobl_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - use DoblDobl_Complex_Numbers; - - v_n : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(4*v_n-1)) - := C_dblarrs.Value(c_d); - ind : Interfaces.C.size_t := 0; - nbr : double_double; - - begin - for i in 1..integer32(v_n) loop - nbr := REAL_PART(ada_d(i)); - val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; - nbr := IMAG_PART(ada_d(i)); - val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(4*v_n)); - end Assign; - - procedure Assign ( ada_d : in QuadDobl_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ) is - - use QuadDobl_Complex_Numbers; - - v_n : constant natural32 := natural32(ada_d'last); - val : C_Double_Array(0..Interfaces.C.size_t(8*v_n-1)) - := C_dblarrs.Value(c_d); - ind : Interfaces.C.size_t := 0; - nbr : quad_double; - - begin - for i in 1..integer32(v_n) loop - nbr := REAL_PART(ada_d(i)); - val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; - nbr := IMAG_PART(ada_d(i)); - val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; - val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; - end loop; - C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, - Interfaces.C.ptrdiff_t(8*v_n)); - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; - ada_d : out Standard_Natural_Vectors.Vector ) is - - val : constant C_Integer_Array(0..Interfaces.C.size_t(v_n-1)) - := C_intarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - - begin - for i in 1..integer32(v_n) loop - ada_d(i) := natural32(val(ind)); - ind := ind + 1; - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; - ada_d : out Standard_Integer_Vectors.Vector ) is - - val : constant C_Integer_Array(0..Interfaces.C.size_t(v_n-1)) - := C_intarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - - begin - for i in 1..integer32(v_n) loop - ada_d(i) := integer32(val(ind)); - ind := ind + 1; - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Standard_Floating_Vectors.Vector ) is - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - - begin - for i in 1..integer32(v_n) loop - ada_d(i) := double_float(val(ind)); - ind := ind + 1; - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Double_Double_Vectors.Vector ) is - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - lo,hi : double_float; - dim : constant integer32 := integer32(v_n)/2; - - begin - for i in 1..dim loop - hi := double_float(val(ind)); ind := ind + 1; - lo := double_float(val(ind)); ind := ind + 1; - ada_d(i) := Double_Double_Numbers.Create(hi,lo); - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Quad_Double_Vectors.Vector ) is - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - hihi,lohi,hilo,lolo : double_float; - dim : constant integer32 := integer32(v_n)/4; - - begin - for i in 1..dim loop - hihi := double_float(val(ind)); ind := ind + 1; - lohi := double_float(val(ind)); ind := ind + 1; - hilo := double_float(val(ind)); ind := ind + 1; - lolo := double_float(val(ind)); ind := ind + 1; - ada_d(i) := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Standard_Complex_Vectors.Vector ) is - - use Standard_Complex_Numbers; - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - - begin - for i in 1..integer32(v_n)/2 loop - ada_d(i) := Create(double_float(val(ind)),double_float(val(ind+1))); - ind := ind + 2; - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out DoblDobl_Complex_Vectors.Vector ) is - - use DoblDobl_Complex_Numbers; - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - lo,hi : double_float; - re,im : double_double; - dim : constant integer32 := integer32(v_n)/4; - - begin - for i in 1..dim loop - hi := double_float(val(ind)); ind := ind + 1; - lo := double_float(val(ind)); ind := ind + 1; - re := Double_Double_Numbers.Create(hi,lo); - hi := double_float(val(ind)); ind := ind + 1; - lo := double_float(val(ind)); ind := ind + 1; - im := Double_Double_Numbers.Create(hi,lo); - ada_d(i) := Create(re,im); - end loop; - end Assign; - - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out QuadDobl_Complex_Vectors.Vector ) is - - use QuadDobl_Complex_Numbers; - - val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) - := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); - ind : Interfaces.C.size_t := 0; - lolo,hilo,lohi,hihi : double_float; - re,im : quad_double; - dim : constant integer32 := integer32(v_n)/8; - - begin - for i in 1..dim loop - hihi := double_float(val(ind)); ind := ind + 1; - lohi := double_float(val(ind)); ind := ind + 1; - hilo := double_float(val(ind)); ind := ind + 1; - lolo := double_float(val(ind)); ind := ind + 1; - re := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); - hihi := double_float(val(ind)); ind := ind + 1; - lohi := double_float(val(ind)); ind := ind + 1; - hilo := double_float(val(ind)); ind := ind + 1; - lolo := double_float(val(ind)); ind := ind + 1; - im := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); - ada_d(i) := Create(re,im); - end loop; - end Assign; - - function C_Integer_Array_to_String - ( n : natural32; v : C_Integer_Array ) return String is - - res : String(1..integer(n)); - ch : character; - - begin - for i in v'range loop - exit when (integer(i)+1 > res'last); - ch := Integer_to_Character(integer32(v(i))); - res(integer(i)+1) := ch; - end loop; - return res; - end C_Integer_Array_to_String; - - function Pad_with_Spaces ( n : natural32; s : string ) return string is - begin - if s'last >= integer(n) then - return s; - else - declare - res : string(1..integer(n)); - begin - res(s'range) := s; - for i in s'last+1..integer(n) loop - res(i) := ' '; - end loop; - return res; - end; - end if; - end Pad_with_Spaces; - - function String_to_C_Integer_Array - ( n : natural32; s : string ) return C_Integer_Array is - - - res : C_Integer_Array(0..Interfaces.C.size_t(n-1)); - ind : Interfaces.C.size_t := 0; - - begin - for i in s'range loop - res(ind) := Interfaces.C.int(Character_to_Integer(s(i))); - ind := ind + 1; - end loop; - return res; - end String_to_C_Integer_Array; - - function String_to_Integer_Vector - ( s : string ) return Standard_Integer_Vectors.Vector is - - res : Standard_Integer_Vectors.Vector - (integer32(s'first)..integer32(s'last)); - - begin - for i in s'range loop - res(integer32(i)) := Character_to_Integer(s(i)); - end loop; - return res; - end String_to_Integer_Vector; - -end Assignments_in_Ada_and_C; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/assignments_in_ada_and_c.ads phcpack-2.4.85/src/Ada/CtoPHC/State/assignments_in_ada_and_c.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/assignments_in_ada_and_c.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/assignments_in_ada_and_c.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Double_Double_Numbers; use Double_Double_Numbers; -with Quad_Double_Numbers; use Quad_Double_Numbers; -with Standard_Complex_Numbers; -with DoblDobl_Complex_Numbers; -with QuadDobl_Complex_Numbers; -with Standard_Natural_Vectors; -with Standard_Integer_Vectors; -with Standard_Floating_Vectors; -with Double_Double_Vectors; -with Quad_Double_Vectors; -with Standard_Complex_Vectors; -with DoblDobl_Complex_Vectors; -with QuadDobl_Complex_Vectors; -with C_Integer_Arrays; use C_Integer_Arrays; -with C_Double_Arrays; use C_Double_Arrays; - -package Assignments_in_Ada_and_C is - --- DESCRIPTION : --- This package provides assignment operators between Ada and C data. - - procedure Assign ( this : in integer32; to_that : in C_intarrs.Pointer ); - procedure Assign ( this : in C_intarrs.Pointer; to_that : out integer32 ); - procedure Assign ( this : in double_float; to_that : in C_dblarrs.Pointer ); - procedure Assign ( this : in C_dblarrs.Pointer; to_that : out double_float ); - - -- DESCRIPTION : - -- Assigns what is in this to the location pointed by to_that. - - procedure Assign ( this : in double_double; - to_that : in C_dblarrs.Pointer ); - procedure Assign ( this : in C_dblarrs.Pointer; - to_that : out double_double ); - procedure Assign ( this : in quad_double; - to_that : in C_dblarrs.Pointer ); - procedure Assign ( this : in C_dblarrs.Pointer; - to_that : out quad_double ); - - -- DESCRIPTION : - -- Assigns the consecutive locations for double doubles and quad doubles - -- of what is in this to the location pointed by to_that. - - procedure Assign ( ada_cf : in Standard_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ); - procedure Assign ( ada_cf : in DoblDobl_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ); - procedure Assign ( ada_cf : in QuadDobl_Complex_Numbers.Complex_Number; - c_cf : in C_dblarrs.Pointer ); - - -- DESCRIPTION : - -- Assigns the complex number in ada_cf to the array in c_cf, - -- copying real and imaginary part of ada_cf to c_cf - -- in consecutive locations. - - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out Standard_Complex_Numbers.Complex_Number ); - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out DoblDobl_Complex_Numbers.Complex_Number ); - procedure Assign ( c_cf : in C_dblarrs.Pointer; - ada_cf : out QuadDobl_Complex_Numbers.Complex_Number ); - - -- DESCRIPTION : - -- Assigns to ada_cf the values of real and imaginary parts in c_cf. - -- The values for double double and quad doubles are assumed to be - -- in consecutive locations in memory. - - procedure Assign ( ada_d : in Standard_Natural_Vectors.Vector; - c_d : in C_intarrs.Pointer ); - procedure Assign ( ada_d : in Standard_Integer_Vectors.Vector; - c_d : in C_intarrs.Pointer ); - procedure Assign ( ada_d : in Standard_Floating_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - procedure Assign ( ada_d : in Double_Double_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - procedure Assign ( ada_d : in Quad_Double_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - procedure Assign ( ada_d : in Standard_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - procedure Assign ( ada_d : in DoblDobl_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - procedure Assign ( ada_d : in QuadDobl_Complex_Vectors.Vector; - c_d : in C_dblarrs.Pointer ); - - -- DESCRIPTION : - -- Assigns the content of the Ada vector to the C vector. - -- The complex numbers in ada_d are written to c_d as a sequence - -- of real and imaginary double floats. - -- Double double and quad double numbers are written as sequences - -- of respectively two and four doubles, in order of significance. - - -- REQUIRED : ada_d'range = 1..n, for some n. - - procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; - ada_d : out Standard_Natural_Vectors.Vector ); - procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; - ada_d : out Standard_Integer_Vectors.Vector ); - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Standard_Floating_Vectors.Vector ); - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out Standard_Complex_Vectors.Vector ); - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out DoblDobl_Complex_Vectors.Vector ); - procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; - ada_d : out QuadDobl_Complex_Vectors.Vector ); - - -- DESCRIPTION : - -- Assigns the content of the C vector to the Ada vector. - -- For complex vectors, it copies the consecutive real and - -- and imaginary parts in c_d to ada_d. - -- When writing to a vector of double double or quad double - -- complex numbers, the doubles are interpreted as parts of - -- a double double or quad doubles, with their most significant - -- parts first. - - -- REQUIRED : ada_d'range = 1..N, for some N; - -- for complex vectors: ada_d'range = 1..v_n/2, for some v_n; - -- for double double vectors: ada_d'range = 1..v_n/2; and - -- for quad double vectors: ada_d'range = 1..v_n/4; and - -- for double double complex vectors: ada_d'range = 1..v_n/4; and - -- for quad double complex vectors: ada_d'range = 1..v_n/8. - - function C_Integer_Array_to_String - ( n : natural32; v : C_Integer_Array ) return String; - - -- DESCRIPTION : - -- Converts an array of n integers into a string of n characters. - - function Pad_with_Spaces ( n : natural32; s : string ) return string; - - -- DESCRIPTION : - -- If s'last >= n, then the string s is returned, otherwise, - -- if s'last < n, then the string on return will be of length n, - -- contain s padded with spaces. - - function String_to_C_Integer_Array - ( n : natural32; s : string ) return C_Integer_Array; - function String_to_Integer_Vector - ( s : string ) return Standard_Integer_Vectors.Vector; - - -- DESCRIPTION : - -- Converts a string into an array of integer C type numbers. - -end Assignments_in_Ada_and_C; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_laursys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -with Double_Double_Numbers; use Double_Double_Numbers; -with DoblDobl_Complex_Numbers; use DoblDobl_Complex_Numbers; -with Standard_Integer_Vectors; use Standard_Integer_Vectors; - -package body DoblDobl_LaurSys_Container is - --- INTERNAL DATA : - - lp : Link_to_Laur_Sys; - ep : Link_to_Eval_Laur_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ) is - begin - lp := new Laur_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Laur_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Laur_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - zero : constant double_double := create(0.0); - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(zero); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Laur_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Laur_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - - -- NOTE : - -- The "if .. /= null then .." test is a patch - -- because a Clear should never lead to a crash! - - begin - if lp /= null then Clear(lp); end if; - if ep /= null then Clear(ep); end if; - if jm /= null then Clear(jm); end if; - if ej /= null then Clear(ej); end if; - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end DoblDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_laursys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with DoblDobl_Complex_Laurentials; use DoblDobl_Complex_Laurentials; -with DoblDobl_Complex_Laur_Systems; use DoblDobl_Complex_Laur_Systems; -with DoblDobl_Complex_Laur_SysFun; use DoblDobl_Complex_Laur_SysFun; -with DoblDobl_Complex_Laur_JacoMats; use DoblDobl_Complex_Laur_JacoMats; - -package DoblDobl_LaurSys_Container is - --- DESCRIPTION : --- This package provides a container for a Laurent polynomial system, --- with complex double double coefficients, designed for the C interface. - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Laur_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Laur_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end DoblDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_polysys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -with DoblDobl_Complex_Numbers; use DoblDobl_Complex_Numbers; -with Standard_Natural_Vectors; - -package body DoblDobl_PolySys_Container is - --- INTERNAL DATA : - - lp : Link_to_Poly_Sys; - ep : Link_to_Eval_Poly_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ) is - begin - lp := new Poly_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Poly_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Poly_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Degree ( k : integer32 ) return integer32 is - begin - if lp = null then - return -1; - elsif lp(k) = Null_Poly then - return -1; - else - return Degree(lp(k)); - end if; - end Degree; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(integer(0)); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Poly_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Poly_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - begin - Clear(lp); - Clear(ep); - Clear(jm); - Clear(ej); - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end DoblDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_polysys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with DoblDobl_Complex_Polynomials; use DoblDobl_Complex_Polynomials; -with DoblDobl_Complex_Poly_Systems; use DoblDobl_Complex_Poly_Systems; -with DoblDobl_Complex_Poly_SysFun; use DoblDobl_Complex_Poly_SysFun; -with DoblDobl_Complex_Jaco_Matrices; use DoblDobl_Complex_Jaco_Matrices; - -package DoblDobl_PolySys_Container is - --- DESCRIPTION : --- This package provides a container for a polynomial system --- with double double complex coefficients, for the interface with C. - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Degree ( k : integer32 ) return integer32; - - -- DESCRIPTION : - -- Returns -1 if there is no k-th polynomial, - -- otherwise returns the degree of the k-th polynomial - -- stored in the system container. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Poly_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Poly_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end DoblDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_solutions_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -package body DoblDobl_Solutions_Container is - --- INTERNAL DATA : - - first,last,current : Solution_List; - cursor : natural32 := 0; -- index to the current solution - --- OPERATIONS : - - procedure Initialize ( sols : in Solution_List ) is - - tmp : Solution_List := sols; - - begin - for i in 1..Length_Of(sols) loop - Append(first,last,Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - current := first; - cursor := 1; - end Initialize; - - function Length return natural32 is - begin - return Length_Of(first); - end Length; - - function Dimension return natural32 is - begin - if Is_Null(first) - then return 0; - else return natural32(Head_Of(first).n); - end if; - end Dimension; - - function Retrieve return Solution_List is - begin - return first; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ) is - - ls : Link_to_Solution; - - begin - Retrieve(k,ls,fail); - if not fail - then s := ls.all; - end if; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - s := Head_Of(tmp); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Retrieve; - - procedure Retrieve_Next_Initialize is - begin - current := first; - if Is_Null(current) - then cursor := 0; -- empty solution list - else cursor := 1; -- index to the first solution - end if; - end Retrieve_Next_Initialize; - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - current := Tail_Of(current); - cursor := cursor + 1; - end if; - end Retrieve_Next; - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - end if; - end Retrieve_Current; - - procedure Move_Current ( k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - current := Tail_Of(current); - if Is_Null(current) - then cursor := 0; - else cursor := cursor + 1; - end if; - k := cursor; - end if; - end Move_Current; - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - ls : Link_to_Solution; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - ls := Head_Of(tmp); - ls.t := s.t; - ls.m := s.m; - ls.v := s.v; - ls.err := s.err; - ls.rco := s.rco; - ls.res := s.res; - Set_Head(tmp,ls); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - Set_Head(tmp,s); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Append ( s : in Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Append ( s : in Link_to_Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Clear is - begin - Clear(first); - last := first; - current := first; - cursor := 0; - end Clear; - -end DoblDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/dobldobl_solutions_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/dobldobl_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with DoblDobl_Complex_Solutions; use DoblDobl_Complex_Solutions; - -package DoblDobl_Solutions_Container is - --- DESCRIPTION : --- This package provides a container for a solution list --- with double double complex coefficients for the interface with C. - - procedure Initialize ( sols : in Solution_List ); - - -- DESCRIPTION : - -- Initializes the container with a solution list. - - function Length return natural32; - - -- DESCRIPTION : - -- Returns the number of solutions in the container. - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- dimension of the solution vectors is returned. - - function Retrieve return Solution_List; - - -- DESCRIPTION : - -- Returns the lists of solutions stored in the container. - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ); - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to retrieve the k-th solution in s. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Retrieve_Next_Initialize; - - -- DESCRIPTION : - -- Resets the current pointer to the first solution in the container. - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the next solution, where the current pointer is, - -- and returns in k the index of the solution in the list. - -- If k > 0, then s contains the pointer to the current solutioni - -- and the current pointer is moved to the next solution. - -- Otherwise, if the current pointer is null, then k on return is 0. - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the current solution without advancing the pointer to - -- the current solution. If the pointer refers to a valid solution, - -- then k is the solution number on return, otherwise, k = 0. - - procedure Move_Current ( k : out natural32 ); - - -- DESCRIPTION : - -- Moves the pointer to the current solution to the next solution. - -- If the pointer is currently null or if there is no next solution, - -- then k will be zero on return. Otherwise, k will equal the - -- value of the cursor, the number of the current solution. - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ); - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to replace the k-th solution with the given one. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Append ( s : in Solution ); - procedure Append ( s : in Link_to_Solution ); - - -- DESCRIPTION : - -- Appends the solution to the container. - - procedure Clear; - - -- DESCRIPTION : - -- Clears the solutions in the container. - -end DoblDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/file_management.adb phcpack-2.4.85/src/Ada/CtoPHC/State/file_management.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/file_management.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/file_management.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ -with Communications_with_User; use Communications_with_User; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; - -package body File_Management is - --- INTERNAL DATA : - - link_to_infile,link_to_outfile : link_to_file_type; - link_to_wfile1,link_to_wfile2 : link_to_file_type; - --- OPERATIONS : - - procedure Silent_Open_Input_File ( filename : in string ) is - begin - link_to_infile := new file_type; - Open(link_to_infile.all,in_file,filename); - end Silent_Open_Input_File; - - procedure Silent_Open_Input_File - ( k : in natural32; filename : in string ) is - begin - if k = 1 then - link_to_wfile1 := new file_type; - Open(link_to_wfile1.all,in_file,filename); - elsif k = 2 then - link_to_wfile2 := new file_type; - Open(link_to_wfile2.all,in_file,filename); - end if; - end Silent_Open_Input_File; - - procedure Silent_Open_Input_File is - begin - link_to_infile := new file_type; - Read_Name_and_Open_File(link_to_infile.all); - end Silent_Open_Input_File; - - procedure Silent_Open_Input_File ( k : in natural32 ) is - begin - if k = 1 then - link_to_wfile1 := new file_type; - Read_Name_and_Open_File(link_to_wfile1.all); - elsif k = 2 then - link_to_wfile2 := new file_type; - Read_Name_and_Open_File(link_to_wfile2.all); - end if; - end Silent_Open_Input_File; - - procedure Open_Input_File is - begin - link_to_infile := new file_type; - put_line("Reading the name of the input file..."); - Read_Name_and_Open_File(link_to_infile.all); - end Open_Input_File; - - procedure Open_Input_File ( k : in natural32 ) is - begin - put("Reading the name of the input file for witness set "); - put(k,1); put_line("."); - if k = 1 then - link_to_wfile1 := new file_type; - Read_Name_and_Open_File(link_to_wfile1.all); - elsif k = 2 then - link_to_wfile2 := new file_type; - Read_Name_and_Open_File(link_to_wfile2.all); - end if; - end Open_Input_File; - - procedure Create_Output_File is - begin - link_to_outfile := new file_type; - put_line("Reading the name of the output file..."); - Read_Name_and_Create_File(link_to_outfile.all); - end Create_Output_File; - - function Link_to_Input return link_to_file_type is - begin - return link_to_infile; - end Link_to_Input; - - function Link_to_Input ( k : natural32 ) return link_to_file_type is - begin - if k = 1 then - return link_to_wfile1; - elsif k = 2 then - return link_to_wfile2; - else - return link_to_infile; - end if; - end Link_to_Input; - - function Link_to_Output return link_to_file_type is - begin - return link_to_outfile; - end Link_to_Output; - - procedure Reset_Input_File ( k : in natural32 ) is - begin - if k = 1 then - Reset(link_to_wfile1.all); - elsif k = 2 then - Reset(link_to_wfile2.all); - end if; - end Reset_Input_File; - - procedure Close_Input_File is - begin - close(link_to_infile.all); - end Close_Input_File; - - procedure Close_Input_File ( k : in natural32 ) is - begin - if k = 0 then - close(link_to_infile.all); - elsif k = 1 then - close(link_to_wfile1.all); - elsif k = 2 then - close(link_to_wfile2.all); - end if; - end Close_Input_File; - - procedure Close_Output_File is - begin - close(link_to_outfile.all); - end Close_Output_File; - -end File_Management; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/file_management.ads phcpack-2.4.85/src/Ada/CtoPHC/State/file_management.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/file_management.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/file_management.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -with text_io; use text_io; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; - -package File_Management is - --- DESCRIPTION : --- This package provides produces and functions to manage files, --- for use in incremental read and write operations. --- The benefit of this package is that one function may open or create --- a file, while another function may then use the file, without having --- to explicitly use a variable that refers to that file. - - type link_to_file_type is access file_type; - - procedure Silent_Open_Input_File; - procedure Silent_Open_Input_File ( k : in natural32 ); - procedure Silent_Open_Input_File ( filename : in string ); - procedure Silent_Open_Input_File ( k : in natural32; filename : in string ); - procedure Open_Input_File; - procedure Open_Input_File ( k : in natural32 ); - - -- DESCRIPTION : - -- Reads the name of a file for input of solutions. - -- The "Silent_" one just asks for a string of characters, - -- while the other one prints first a message before prompting. - -- When the filename is provided, no messages are written. - -- If k is provided, then it is for reading witness set k. - - procedure Create_Output_File; - - -- DESCRIPTION : - -- Reads the name of a file for output of solutions. - - function Link_to_Input return link_to_file_type; - function Link_to_Input ( k : natural32 ) return link_to_file_type; - - -- DESCRIPTION : - -- Returns the reference to the input file. - - function Link_to_Output return link_to_file_type; - - -- DESCRIPTION : - -- Returns the reference to the output file. - - procedure Reset_Input_File ( k : in natural32 ); - - -- DESCRIPTION : - -- Resets the file for the k-th witness set for reading. - -- The number k must be 1 or 2 to have an effect. - - procedure Close_Input_File; - procedure Close_Input_File ( k : in natural32 ); - procedure Close_Output_File; - - -- DESCRIPTION : - -- Closes file used for input or output. - -end File_Management; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_laursys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; -with Standard_Integer_Vectors; use Standard_Integer_Vectors; - -package body Multprec_LaurSys_Container is - --- INTERNAL DATA : - - lp : Link_to_Laur_Sys; - ep : Link_to_Eval_Laur_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ) is - begin - lp := new Laur_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Laur_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Laur_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Degree ( k : integer32 ) return integer32 is - begin - if lp = null then - return -1; - elsif lp(k) = Null_Poly then - return -1; - else - return Degree(lp(k)); - end if; - end Degree; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - Copy(t.cf,res.cf); - res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Multprec_Complex_Numbers.Create(natural32(0)); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Laur_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Laur_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - begin - Clear(lp); - Clear(ep); - Clear(jm); - Clear(ej); - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end Multprec_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_laursys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Multprec_Complex_Laurentials; use Multprec_Complex_Laurentials; -with Multprec_Complex_Laur_Systems; use Multprec_Complex_Laur_Systems; -with Multprec_Complex_Laur_SysFun; use Multprec_Complex_Laur_SysFun; -with Multprec_Complex_Laur_JacoMats; use Multprec_Complex_Laur_JacoMats; - -package Multprec_LaurSys_Container is - --- DESCRIPTION : --- This package provides a container for a Laurent polynomial system, --- with multiprecision complex coefficients, for the C interface. - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Degree ( k : integer32 ) return integer32; - - -- DESCRIPTION : - -- Returns -1 if there is no k-th polynomial, - -- otherwise returns the degree of the k-th polynomial - -- stored in the system container. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Laur_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Laur_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end Multprec_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_polysys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; -with Standard_Natural_Vectors; use Standard_Natural_Vectors; - -package body Multprec_PolySys_Container is - --- INTERNAL DATA : - - lp : Link_to_Poly_Sys; - ep : Link_to_Eval_Poly_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ) is - begin - lp := new Poly_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Poly_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Poly_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Degree ( k : integer32 ) return integer32 is - begin - if lp = null then - return -1; - elsif lp(k) = Null_Poly then - return -1; - else - return Degree(lp(k)); - end if; - end Degree; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - Copy(t.cf,res.cf); - res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Multprec_Complex_Numbers.Create(natural32(0)); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Poly_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Poly_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - begin - Clear(lp); - Clear(ep); - Clear(jm); - Clear(ej); - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end Multprec_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_polysys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Multprec_Complex_Polynomials; use Multprec_Complex_Polynomials; -with Multprec_Complex_Poly_Systems; use Multprec_Complex_Poly_Systems; -with Multprec_Complex_Poly_SysFun; use Multprec_Complex_Poly_SysFun; -with Multprec_Complex_Jaco_Matrices; use Multprec_Complex_Jaco_Matrices; - -package Multprec_PolySys_Container is - --- DESCRIPTION : --- This package provides a container for a polynomial system, --- with coefficients of arbitrary precision, --- designed for the interface with C. - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Degree ( k : integer32 ) return integer32; - - -- DESCRIPTION : - -- Returns -1 if there is no k-th polynomial, - -- otherwise returns the degree of the k-th polynomial - -- stored in the system container. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Poly_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Poly_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end Multprec_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_solutions_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,200 +0,0 @@ -with Multprec_Floating_Numbers; -with Multprec_Complex_Numbers; -with Multprec_Complex_Vectors; - -package body Multprec_Solutions_Container is - --- INTERNAL DATA : - - first,last,current : Solution_List; - cursor : natural32 := 0; -- index to the current solution - --- OPERATIONS : - - procedure Initialize ( sols : in Solution_List ) is - - tmp : Solution_List := sols; - - begin - for i in 1..Length_Of(sols) loop - Append(first,last,Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - current := first; - cursor := 1; - end Initialize; - - function Length return natural32 is - begin - return Length_Of(first); - end Length; - - function Dimension return natural32 is - begin - if Is_Null(first) - then return 0; - else return natural32(Head_Of(first).n); - end if; - end Dimension; - - function Retrieve return Solution_List is - begin - return first; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ) is - - ls : Link_to_Solution; - - begin - Retrieve(k,ls,fail); - if not fail - then s := ls.all; - end if; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - s := Head_Of(tmp); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Retrieve; - - procedure Retrieve_Next_Initialize is - begin - current := first; - if Is_Null(current) - then cursor := 0; -- empty solution list - else cursor := 1; -- index to the first solution - end if; - end Retrieve_Next_Initialize; - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - current := Tail_Of(current); - cursor := cursor + 1; - end if; - end Retrieve_Next; - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - end if; - end Retrieve_Current; - - procedure Move_Current ( k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - current := Tail_Of(current); - if Is_Null(current) - then cursor := 0; - else cursor := cursor + 1; - end if; - k := cursor; - end if; - end Move_Current; - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - ls : Link_to_Solution; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - ls := Head_Of(tmp); - Multprec_Complex_Numbers.Copy(s.t,ls.t); - ls.m := s.m; - Multprec_Complex_Vectors.Copy(s.v,ls.v); - Multprec_Floating_Numbers.Copy(s.err,ls.err); - Multprec_Floating_Numbers.Copy(s.rco,ls.rco); - Multprec_Floating_Numbers.Copy(s.res,ls.res); - Set_Head(tmp,ls); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - Set_Head(tmp,s); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Append ( s : in Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Append ( s : in Link_to_Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Clear is - begin - Clear(first); - last := first; - current := first; - cursor := 0; - end Clear; - -end Multprec_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/multprec_solutions_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/multprec_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Multprec_Complex_Solutions; use Multprec_Complex_Solutions; - -package Multprec_Solutions_Container is - --- DESCRIPTION : --- This package provides a container for a solution list --- with multiprecision complex coefficients for the interface with C. - - procedure Initialize ( sols : in Solution_List ); - - -- DESCRIPTION : - -- Initializes the container with a solution list. - - function Length return natural32; - - -- DESCRIPTION : - -- Returns the number of solutions in the container. - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- dimension of the solution vectors is returned. - - function Retrieve return Solution_List; - - -- DESCRIPTION : - -- Returns the lists of solutions stored in the container. - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ); - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to retrieve the k-th solution in s. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Retrieve_Next_Initialize; - - -- DESCRIPTION : - -- Resets the current pointer to the first solution in the container. - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the next solution, where the current pointer is, - -- and returns in k the index of the solution in the list. - -- If k > 0, then s contains the pointer to the current solutioni - -- and the current pointer is moved to the next solution. - -- Otherwise, if the current pointer is null, then k on return is 0. - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the current solution without advancing the pointer to - -- the current solution. If the pointer refers to a valid solution, - -- then k is the solution number on return, otherwise, k = 0. - - procedure Move_Current ( k : out natural32 ); - - -- DESCRIPTION : - -- Moves the pointer to the current solution to the next solution. - -- If the pointer is currently null or if there is no next solution, - -- then k will be zero on return. Otherwise, k will equal the - -- value of the cursor, the number of the current solution. - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ); - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to replace the k-th solution with the given one. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Append ( s : in Solution ); - procedure Append ( s : in Link_to_Solution ); - - -- DESCRIPTION : - -- Appends the solution to the container. - - procedure Clear; - - -- DESCRIPTION : - -- Clears the solutions in the container. - -end Multprec_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/polynomial_systems_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/polynomial_systems_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/polynomial_systems_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/polynomial_systems_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,158 +0,0 @@ -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Natural_Vectors; use Standard_Natural_Vectors; - -package body Polynomial_Systems_Container is - --- INTERNAL DATA : - - lp : Link_to_Poly_Sys; - ep : Link_to_Eval_Poly_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ) is - begin - lp := new Poly_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in natural ) is - begin - lp := new Poly_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Poly_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in natural; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in natural; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural is - begin - if lp = null - then return 0; - else return lp'last; - end if; - end Dimension; - - function Number_of_Terms ( k : natural ) return natural is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k,i : natural ) return Term is - - res : Term; - cnt : natural := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(0.0); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : natural ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Poly_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Poly_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - begin - Clear(lp); - Clear(ep); - Clear(jm); - Clear(ej); - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end Polynomial_Systems_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/polynomial_systems_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/polynomial_systems_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/polynomial_systems_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/polynomial_systems_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; -with Standard_Complex_Jaco_Matrices; use Standard_Complex_Jaco_Matrices; - -package Polynomial_Systems_Container is - --- DESCRIPTION : --- This package provides a container for a polynomial system, --- designed for the interface with C. - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in natural ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in natural; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in natural; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Number_of_Terms ( k : natural ) return natural; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k,i : natural ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : natural ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Poly_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Poly_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end Polynomial_Systems_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_laursys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -with Quad_Double_Numbers; use Quad_Double_Numbers; -with QuadDobl_Complex_Numbers; use QuadDobl_Complex_Numbers; -with Standard_Integer_Vectors; use Standard_Integer_Vectors; - -package body QuadDobl_LaurSys_Container is - --- INTERNAL DATA : - - lp : Link_to_Laur_Sys; - ep : Link_to_Eval_Laur_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ) is - begin - lp := new Laur_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Laur_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Laur_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - zero : constant quad_double := create(0.0); - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(zero); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Laur_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Laur_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - - -- NOTE : - -- The "if .. /= null then .." test is a patch - -- because a Clear should never lead to a crash! - - begin - if lp /= null then Clear(lp); end if; - if ep /= null then Clear(ep); end if; - if jm /= null then Clear(jm); end if; - if ej /= null then Clear(ej); end if; - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end QuadDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_laursys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with QuadDobl_Complex_Laurentials; use QuadDobl_Complex_Laurentials; -with QuadDobl_Complex_Laur_Systems; use QuadDobl_Complex_Laur_Systems; -with QuadDobl_Complex_Laur_SysFun; use QuadDobl_Complex_Laur_SysFun; -with QuadDobl_Complex_Laur_JacoMats; use QuadDobl_Complex_Laur_JacoMats; - -package QuadDobl_LaurSys_Container is - --- DESCRIPTION : --- This package provides a container for a Laurent polynomial system, --- with complex double double coefficients, designed for the C interface. - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Laur_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Laur_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end QuadDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_solutions_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -package body QuadDobl_Solutions_Container is - --- INTERNAL DATA : - - first,last,current : Solution_List; - cursor : natural32 := 0; -- index to the current solution - --- OPERATIONS : - - procedure Initialize ( sols : in Solution_List ) is - - tmp : Solution_List := sols; - - begin - for i in 1..Length_Of(sols) loop - Append(first,last,Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - current := first; - cursor := 1; - end Initialize; - - function Length return natural32 is - begin - return Length_Of(first); - end Length; - - function Dimension return natural32 is - begin - if Is_Null(first) - then return 0; - else return natural32(Head_Of(first).n); - end if; - end Dimension; - - function Retrieve return Solution_List is - begin - return first; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ) is - - ls : Link_to_Solution; - - begin - Retrieve(k,ls,fail); - if not fail - then s := ls.all; - end if; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - s := Head_Of(tmp); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Retrieve; - - procedure Retrieve_Next_Initialize is - begin - current := first; - if Is_Null(current) - then cursor := 0; -- empty solution list - else cursor := 1; -- index to the first solution - end if; - end Retrieve_Next_Initialize; - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - current := Tail_Of(current); - cursor := cursor + 1; - end if; - end Retrieve_Next; - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - end if; - end Retrieve_Current; - - procedure Move_Current ( k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - current := Tail_Of(current); - if Is_Null(current) - then cursor := 0; - else cursor := cursor + 1; - end if; - k := cursor; - end if; - end Move_Current; - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - ls : Link_to_Solution; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - ls := Head_Of(tmp); - ls.t := s.t; - ls.m := s.m; - ls.v := s.v; - ls.err := s.err; - ls.rco := s.rco; - ls.res := s.res; - Set_Head(tmp,ls); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - Set_Head(tmp,s); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Append ( s : in Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Append ( s : in Link_to_Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Clear is - begin - Clear(first); - last := first; - current := first; - cursor := 0; - end Clear; - -end QuadDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/quaddobl_solutions_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/quaddobl_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with QuadDobl_Complex_Solutions; use QuadDobl_Complex_Solutions; - -package QuadDobl_Solutions_Container is - --- DESCRIPTION : --- This package provides a container for a solution list --- with quad double complex coefficients for the interface with C. - - procedure Initialize ( sols : in Solution_List ); - - -- DESCRIPTION : - -- Initializes the container with a solution list. - - function Length return natural32; - - -- DESCRIPTION : - -- Returns the number of solutions in the container. - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- dimension of the solution vectors is returned. - - function Retrieve return Solution_List; - - -- DESCRIPTION : - -- Returns the lists of solutions stored in the container. - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ); - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to retrieve the k-th solution in s. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Retrieve_Next_Initialize; - - -- DESCRIPTION : - -- Resets the current pointer to the first solution in the container. - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the next solution, where the current pointer is, - -- and returns in k the index of the solution in the list. - -- If k > 0, then s contains the pointer to the current solutioni - -- and the current pointer is moved to the next solution. - -- Otherwise, if the current pointer is null, then k on return is 0. - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the current solution without advancing the pointer to - -- the current solution. If the pointer refers to a valid solution, - -- then k is the solution number on return, otherwise, k = 0. - - procedure Move_Current ( k : out natural32 ); - - -- DESCRIPTION : - -- Moves the pointer to the current solution to the next solution. - -- If the pointer is currently null or if there is no next solution, - -- then k will be zero on return. Otherwise, k will equal the - -- value of the cursor, the number of the current solution. - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ); - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to replace the k-th solution with the given one. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Append ( s : in Solution ); - procedure Append ( s : in Link_to_Solution ); - - -- DESCRIPTION : - -- Appends the solution to the container. - - procedure Clear; - - -- DESCRIPTION : - -- Clears the solutions in the container. - -end QuadDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/READ_ME phcpack-2.4.85/src/Ada/CtoPHC/State/READ_ME --- phcpack-2.4.84/src/Ada/CtoPHC/State/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,22 +1,149 @@ -An interface to call PHCpack from C functions in PHCv2.4.13 +Calling PHCpack from C as a state machine in PHCv2.4.85 -This directory was created in release 2.1 to call the Pieri homotopies -from C programs and for parallel implementations of the path trackers. -In release 2.3, the code was splitted among two subdirectories: -(1) Funky, a functional interface: C -> Ada -> C; and -(2) State, a state machine usage: C <-> Ada. +This directory was created in release 2.3 as subdirectory to CtoPHC. +The idea for using PHCpack as a state machine originated from the need +to create a parallel path tracker with MPI, first used in release 2.2, +to be used in the implementation of a parallel Pieri homotopy. +New in release 2.3 are additions to this state machine to implement +a parallel monodromy breakup algorithm. -While in both cases, the main program is written in C and calls an -Ada procedure, the two subdirectories implement two fundamentally -different types of interfaces. +The default extension is .ads (specification of Ada package). +In mixing C with Ada we give the extension, because sometimes we give +the same name (but different suffix) to related C and Ada routines. -In (1), actual data is passed from the C function to the Ada procedure. -To process the results, the Ada procedure calls another C function. -The interface programmer thus provides the main program and functions -to process the output provided by the Ada software. This type of -interface is efficient, but requires either a programmer knowledgable -of both C and Ada, or two programmers collaborating with each other. +In version 2.4.79, many new interface packages were added to organize +and document the definitions of the interface functions better. +In version 2.4.85, systems and solution containers were moved +to the new folder ../Structures. -In (2), the data passed from the C function to the Ada procedure is -more generic in nature. The Ada procedure operates as a gateway -interface to PHCpack. +------------------------------------------------------------------------------ +file name : short description +------------------------------------------------------------------------------ +file_management_interface : interface to file management methods +standard_polysys_interface : interface to double precision polynomials +dobldobl_polysys_interface : interface to double double polynomials +quaddobl_polysys_interface : interface to quad double polynomials +multprec_polysys_interface : interface to multiprecision polynomials +multprec_laursys_interface : interface to multiprecision Laurent systems +use_syscon : Ada gateway to the systems container +tableau_form_interface : tableau form of systems +use_tabform : pass tableau forms of systems +ts_use_syscon.c : C routine calls the Ada gateway use_syscon +standard_syspool_interface : interface to the pool of double systems +dobldobl_syspool_interface : interface to the pool of dobldobl systems +quaddobl_syspool_interface : interface to the pool of quaddobl systems +use_syspool : Ada gateway to the systems pool +ts_use_syspool.c : C routine calls the Ada gateway +------------------------------------------------------------------------------ +standard_solutions_container : management of Ada solution lists +standard_solutions_interface : interface to double precision solutions +dobldobl_solutions_container : solutions with double doubles +dobldobl_solutions_interface : interface to double double solutions +quaddobl_solutions_container : solutions with quad doubles +quaddobl_solutions_interface : interface to quad double solutions +multprec_solutions_container : multiprecision solutions +multprec_solutions_interface : interface to multiprecision solutions +assignments_of_solutions : converts between PHCpack and (b,c) format +ts_solcon : tests the solutions container +use_solcon : Ada gateway to the solutions container +ts_use_solcon.c : C routine calls the Ada gateway use_solcon +solutions_pool : pool of solution lists +ts_solpool : test on the solutions pool +standard_solspool_interface : interface to functions on the pool of sols +use_solpool : Ada gateway to the solutions pool +ts_use_solpool.c : C routine calls the Ada gateway use_solpool +newton_interface : interface to Newton's method +------------------------------------------------------------------------------ +phcpack_operations : PHCpack as a state machine +phcpack_operations_io : input/output of main data of PHCpack +c_to_phcpack : Ada routine as gateway to the machine +ts_c2str.c : test on having phc write C strings +------------------------------------------------------------------------------ +scaling_interface : interface to equation & coefficient scaling +use_scaling : access to scaling systems and solutions +reduction_interface : interface to degree reduction methods +use_reduction : reduction of system to lower total degree +linear_products_interface : linear product bounds and start systems +use_roco : job handlers for linear products +------------------------------------------------------------------------------ +continuation_parameters_interface : tune continuation parameters +path_trackers_interface : interface to path trackers +cascade_homotopy_interface : interface to cascade homotopies +diagonal_homotopy_interface : interface to diagonal homotopy +use_track : access to jumpstarting path trackers +------------------------------------------------------------------------------ +pieri_homotopy : Pieri homotopies as a state machine +ts_pirhom : interactive test on pieri_homotopy +pieri_interface : interface to Pieri homotopy functions +use_c2pieri : Ada routine as gateway to Pieri machine +ts_use_c2pieri : C test on the interactive operations +schubert_interface : interface to LR homotopies +use_c2lrhom : calls Littlewood-Richardson homotopies +------------------------------------------------------------------------------ +standard_sampling_operations : provides access to the sampling machine +dobldobl_sampling_operations : supports monodromy with double doubles +quaddobl_sampling_operations : supports monodromy with quad doubles +standard_monodromy_permutations : computes permutations by monodromy +dobldobl_monodromy_permutations : permutations on double double data +quaddobl_monodromy_permutations : permutations on quad double data +witness_interface : interface to witness sets +monodromy_interface : interface to monodromy loops +use_c2fac : Ada gateway to factorization in PHCpack +ts_use_c2fac : C testing operations in use_c2fac +member_interface : interface functions for membership test +use_c2mbt : homotopy membership test jobs for in C +------------------------------------------------------------------------------ +cells_container : manages mixed-cell configurations +integer_cells_container : integer lifting valued cells container +cells_interface : interface to the cells containers +ts_celcon : tests the cells container +use_celcon : Ada gateway to the cells container +ts_use_celcon.c : C routine to test the cells container +------------------------------------------------------------------------------ +monomial_maps_container : monomial maps as solution to binomials +monomial_maps_interface : interface function to monomial maps +use_mapcon : Ada gateway to monomial maps container +------------------------------------------------------------------------------ +univariate_solvers_interface : interface functions to the root finders +unisolve : roots of univariate polynomials +ts_unisolve : test on unisolve +------------------------------------------------------------------------------ +multprec_giftwrap_container : hold results of giftwrapping method +giftwrap_interface : interface to giftwrapping functions +use_giftwrap : giftwrapping for convex hulls +ts_use_giftwrap : test on use_giftwrap +ts_giftwcon : test on giftwrapping container +----------------------------------------------------------------------------- +numerical_tropisms_container : manages numerically computed tropisms +numerical_tropisms_interface : to define the C interface to the tropisms +use_numbtrop : interface to the tropisms container +------------------------------------------------------------------------------ +parameter_homotopy_state : definition of parameter indices +sweep_interface : interface to the sweep operations +use_sweep : C interface for sweep homotopy +ts_use_sweep : test on use_sweep +------------------------------------------------------------------------------ +step_trackers_interface : interface to step-by-step trackers +use_nxtsol : handles jobs to step-by-step trackers +crude_path_trackers : path trackers without postprocessing +ts_runtrack : calls the crude path trackers +------------------------------------------------------------------------------ +power_series_interface : interface to Newton's method on series +use_series : power series Newton method +pade_continuation_interface : interface to Pade continuation +use_padcon : handles Pade continuation +------------------------------------------------------------------------------ +deflation_interface : interface to deflation and multiplicities +use_multip : compute multiplicity structure +------------------------------------------------------------------------------ +ts_c2phc.c : C routine calls the Ada gateway to PHCpack +job_containers : jobs to move data from/into containers +job_handlers : functions to handle jobs in use_c2phc4c +symbol_table_interface : interface to manipulating symbol table +use_c2phc4c : exports PHCpack functionality to C +use_c2phc : includes use_c2phc4c and DEMiCs interface +ts_use_c2phc.c : C test on the interactive operations +----------------------------------------------------------------------------- +irreducible_components_interface : numerical irreducible decomposition +use_witsols : gateway to blackbox solver +----------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/solutions_pool.adb phcpack-2.4.85/src/Ada/CtoPHC/State/solutions_pool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/solutions_pool.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/solutions_pool.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,212 +0,0 @@ -package body Solutions_Pool is - --- INTERNAL DATA : - - size_pool : integer32; - pool_first,pool_last : Link_to_Array_of_Solution_Lists; - --- CREATORS : - - procedure Initialize ( n : in integer32 ) is - begin - size_pool := n; - pool_first := new Array_of_Solution_Lists(1..n); - pool_last := new Array_of_Solution_Lists(1..n); - end Initialize; - - procedure Initialize ( k : in integer32; sols : in Solution_List ) is - - tmp : Solution_List; - ls : Link_to_Solution; - - begin - if k > 0 and k <= size_pool then - tmp := sols; - while not Is_Null(tmp) loop - ls := Head_Of(tmp); - Append(pool_first(k),pool_last(k),ls.all); - tmp := Tail_Of(tmp); - end loop; - end if; - end Initialize; - --- SELECTORS : - - function Size return natural32 is - begin - return natural32(size_pool); - end Size; - - function Length ( k : in integer32 ) return natural32 is - begin - if k > size_pool or k < 1 - then return 0; - else return Length_Of(pool_first(k)); - end if; - end Length; - - function Dimension ( k : in integer32 ) return natural32 is - begin - if k > size_pool or k < 1 then - return 0; - elsif Is_Null(pool_first(k)) then - return 0; - else - return natural32(Head_Of(pool_first(k)).n); - end if; - end Dimension; - - function Retrieve ( k : in integer32 ) return Solution_List is - - res : Solution_List; - - begin - if k > 0 and k <= size_pool - then res := pool_first(k); - end if; - return res; - end Retrieve; - - procedure Retrieve ( k : in integer32; i : in natural32; - s : out Solution; fail : out boolean ) is - - tmp : Solution_List; - cnt : natural32 := 0; - ls : Link_to_Solution; - - begin - if k < 1 or k > size_pool then - fail := true; - elsif i > Length_Of(pool_first(k)) then - fail := true; - else - tmp := pool_first(k); - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = i then - fail := false; - ls := Head_Of(tmp); - s := ls.all; - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - end if; - fail := true; - end Retrieve; - - procedure Retrieve ( k : in integer32; i : in natural32; - s : out Link_to_Solution; fail : out boolean ) is - - tmp : Solution_List; - cnt : natural32 := 0; - - begin - if k < 1 or k > size_pool then - fail := true; - elsif i > Length_Of(pool_first(k)) then - fail := true; - else - tmp := pool_first(k); - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = i then - fail := false; - s := Head_Of(tmp); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - end if; - fail := true; - end Retrieve; - - procedure Replace ( k : in integer32; i : in natural32; - s : in Solution; fail : out boolean ) is - - tmp : Solution_List; - cnt : natural32 := 0; - ls : Link_to_Solution; - - begin - if k < 1 or k > size_pool then - fail := true; - elsif i > Length_Of(pool_first(k)) then - fail := true; - else - tmp := pool_first(k); - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = i then - fail := false; - ls := Head_Of(tmp); - ls.t := s.t; ls.m := s.m; ls.v := s.v; - ls.err := s.err; ls.rco := s.rco; ls.res := s.res; - Set_Head(tmp,ls); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - end if; - fail := true; - end Replace; - - procedure Replace ( k : in integer32; i : in natural32; - s : in Link_to_Solution; fail : out boolean ) is - - tmp : Solution_List; - cnt : natural32 := 0; - - begin - if k < 1 or k > size_pool then - fail := true; - elsif i > Length_Of(pool_first(k)) then - fail := true; - else - tmp := pool_first(k); - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = i - then fail := false; Set_Head(tmp,s); return; - else tmp := Tail_Of(tmp); - end if; - end loop; - end if; - fail := true; - end Replace; - - procedure Append ( k : in integer32; s : in Solution ) is - begin - if k > 0 and k <= size_pool - then Append(pool_first(k),pool_last(k),s); - end if; - end Append; - - procedure Append ( k : in integer32; s : in Link_to_Solution ) is - begin - if k > 0 and k <= size_pool - then Append(pool_first(k),pool_last(k),s); - end if; - end Append; - --- DESTRUCTORS : - - procedure Clear ( k : in integer32 ) is - begin - if k > 0 and k <= size_pool then - Clear(pool_first(k)); - pool_last(k) := pool_first(k); - end if; - end Clear; - - procedure Clear is - begin - size_pool := 0; - end Clear; - -begin - size_pool := 0; -end Solutions_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/solutions_pool.ads phcpack-2.4.85/src/Ada/CtoPHC/State/solutions_pool.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/solutions_pool.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/solutions_pool.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; - -package Solutions_Pool is - --- DESCRIPTION : --- The solutions pool manages several lists of solutions. --- The design of the pool was modeled after Solutions_Container. - --- CREATORS : - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the pool for n solution lists. - - procedure Initialize ( k : in integer32; sols : in Solution_List ); - - -- DESCRIPTION : - -- Initializes the k-th solution list with the solutions in sols. - --- SELECTORS : - - function Size return natural32; - - -- DESCRIPTION : - -- Returns the size of the solutions pool. - - function Length ( k : in integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns the length of the k-th solution list in the pool. - - function Dimension ( k : in integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns the dimension of the k-th solution list in the pool. - - function Retrieve ( k : in integer32 ) return Solution_List; - - -- DESCRIPTION : - -- Returns the k-th solution list in the pool. - - procedure Retrieve ( k : in integer32; i : in natural32; - s : out Solution; fail : out boolean ); - procedure Retrieve ( k : in integer32; i : in natural32; - s : out Link_to_Solution; fail : out boolean ); - - -- DESCRIPTION : - -- Returns in s the i-th solution of the k-th solution list of the pool, - -- fail on return is false if k > Size or i > Length(k). - - procedure Replace ( k : in integer32; i : in natural32; - s : in Solution; fail : out boolean ); - procedure Replace ( k : in integer32; i : in natural32; - s : in Link_to_Solution; fail : out boolean ); - - -- DESCRIPTION : - -- Replaces the i-th solution of the k-th solution list of the pool by s, - -- fail on return is false if k > Size or i > Length(k). - - procedure Append ( k : in integer32; s : in Solution ); - procedure Append ( k : in integer32; s : in Link_to_Solution ); - - -- DESCRIPTION : - -- Appends the solution to the k-th list in the container. - --- DESTRUCTORS : - - procedure Clear ( k : in integer32 ); - - -- DESCRIPTION : - -- Clears the k-th solution list in the pool. - - procedure Clear; - - -- DESCRIPTION : - -- Clears the entire pool of all solution lists. - -end Solutions_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/standard_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_laursys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,163 +0,0 @@ -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Integer_Vectors; use Standard_Integer_Vectors; - -package body Standard_LaurSys_Container is - --- INTERNAL DATA : - - lp : Link_to_Laur_Sys; - ep : Link_to_Eval_Laur_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ) is - begin - lp := new Laur_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Laur_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Laur_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(0.0); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Laur_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Laur_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - - -- NOTE : - -- The "if .. /= null then .." test is a patch - -- because a Clear should never lead to a crash! - - begin - if lp /= null then Clear(lp); end if; - if ep /= null then Clear(ep); end if; - if jm /= null then Clear(jm); end if; - if ej /= null then Clear(ej); end if; - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end Standard_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/standard_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_laursys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,113 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; -with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; -with Standard_Complex_Laur_SysFun; use Standard_Complex_Laur_SysFun; -with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; - -package Standard_LaurSys_Container is - --- DESCRIPTION : --- This package provides a container for a Laurent polynomial system, --- with coefficients in standard double precision, for the C interface. - --- CREATORS : - - procedure Initialize ( p : in Laur_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Laur_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Laur_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end Standard_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/standard_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_polysys_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Natural_Vectors; - -package body Standard_PolySys_Container is - --- INTERNAL DATA : - - lp : Link_to_Poly_Sys; - ep : Link_to_Eval_Poly_Sys; - jm : Link_to_Jaco_Mat; - ej : Link_to_Eval_Jaco_Mat; - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ) is - begin - lp := new Poly_Sys(p'range); - for i in p'range loop - Copy(p(i),lp(i)); - end loop; - end Initialize; - - procedure Initialize ( n : in integer32 ) is - begin - lp := new Poly_Sys'(1..n => Null_Poly); - end Initialize; - - procedure Create_Evaluator is - begin - if lp /= null - then ep := new Eval_Poly_Sys'(Create(lp.all)); - end if; - end Create_Evaluator; - - procedure Create_Jacobian_Matrix is - begin - if lp /= null - then jm := new Jaco_Mat'(Create(lp.all)); - end if; - end Create_Jacobian_Matrix; - - procedure Create_Jacobian_Evaluator is - begin - if jm = null - then Create_Jacobian_Matrix; - end if; - if jm /= null - then ej := new Eval_Jaco_Mat'(Create(jm.all)); - end if; - end Create_Jacobian_Evaluator; - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ) is - begin - Add(lp(k),t); - end Add_Term; - - procedure Add_Poly ( k : in integer32; p : in Poly ) is - begin - Add(lp(k),p); - end Add_Poly; - --- SELECTORS : - - function Dimension return natural32 is - begin - if lp = null - then return 0; - else return natural32(lp'last); - end if; - end Dimension; - - function Degree ( k : integer32 ) return integer32 is - begin - if lp = null then - return -1; - elsif lp(k) = Null_Poly then - return -1; - else - return Degree(lp(k)); - end if; - end Degree; - - function Number_of_Terms ( k : integer32 ) return natural32 is - begin - if lp = null - then return 0; - else return Number_of_Terms(lp(k)); - end if; - end Number_of_Terms; - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term is - - res : Term; - cnt : natural32 := 0; - - procedure Find_Term ( t : in Term; continue : out boolean ) is - begin - cnt := cnt + 1; - if cnt = i then - res.cf := t.cf; - res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); - continue := false; - else - continue := true; - end if; - end Find_Term; - procedure Scan_Terms is new Visiting_Iterator(Find_Term); - - begin - res.cf := Create(0.0); - if lp = null then - return res; - elsif i = 0 or i > Number_of_Terms(k) then - return res; - else - Scan_Terms(lp(k)); - end if; - return res; - end Retrieve_Term; - - function Retrieve_Poly ( k : integer32 ) return Poly is - begin - if lp = null then - return Null_Poly; - elsif k = 0 or k > lp'last then - return Null_Poly; - else - return lp(k); - end if; - end Retrieve_Poly; - - function Retrieve return Link_to_Poly_Sys is - begin - return lp; - end Retrieve; - - function Evaluator return Link_to_Eval_Poly_Sys is - begin - return ep; - end Evaluator; - - function Jacobian_Matrix return Link_to_Jaco_Mat is - begin - return jm; - end Jacobian_Matrix; - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is - begin - return ej; - end Jacobian_Evaluator; - --- DESTRUCTOR : - - procedure Clear is - begin - Clear(lp); - Clear(ep); - Clear(jm); - Clear(ej); - end Clear; - -begin - lp := null; - ep := null; - jm := null; - ej := null; -end Standard_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/standard_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_polysys_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; -with Standard_Complex_Jaco_Matrices; use Standard_Complex_Jaco_Matrices; - -package Standard_PolySys_Container is - --- DESCRIPTION : --- This package provides a container for a polynomial system, --- designed for the interface with C. - --- CREATORS : - - procedure Initialize ( p : in Poly_Sys ); - - -- DESCRIPTION : - -- Initializes the container with a polynomial system. - - procedure Initialize ( n : in integer32 ); - - -- DESCRIPTION : - -- Initializes the container with space to hold a system - -- of dimension n. - - procedure Create_Evaluator; - - -- DESCRIPTION : - -- An evaluator is created for the system in the container. - - procedure Create_Jacobian_Matrix; - - -- DESCRIPTION : - -- Creates the Jacobian matrix for the system in the container. - - procedure Create_Jacobian_Evaluator; - - -- DESCRIPTION : - -- Creates an evaluator for the Jacobian matrix in the container. - --- CONSTRUCTORS : - - procedure Add_Term ( k : in integer32; t : in Term ); - - -- DESCRIPTION : - -- Adds the term t to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - - procedure Add_Poly ( k : in integer32; p : in Poly ); - - -- DESCRIPTION : - -- Adds the polynomial p to the k-th polynomial in the system. - - -- REQUIRED : Dimension >= k > 0. - --- SELECTORS : - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns the number of polynomials in the system, - -- zero if the system is empty. - - function Degree ( k : integer32 ) return integer32; - - -- DESCRIPTION : - -- Returns -1 if there is no k-th polynomial, - -- otherwise returns the degree of the k-th polynomial - -- stored in the system container. - - function Number_of_Terms ( k : integer32 ) return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- number of terms in the k-th polynomial is returned. - - function Retrieve_Term ( k : integer32; i : natural32 ) return Term; - - -- DESCRIPTION : - -- Returns the i-th term of the k-th polynomial, - -- if i <= Number_of_Terms(k), otherwise the term - -- on return has a zero coefficient. - - function Retrieve_Poly ( k : integer32 ) return Poly; - - -- DESCRIPTION : - -- Returns the k-th polynomial in the system. - - function Retrieve return Link_to_Poly_Sys; - - -- DESCRIPTION : - -- Returns the polynomial system stored by the container. - - function Evaluator return Link_to_Eval_Poly_Sys; - - -- DESCRIPTION : - -- Returns the evaluator for the polynomial system - -- stored in the container. - - function Jacobian_Matrix return Link_to_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the Jacobian matrix for the polynomial system - -- stored in the container. - - function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; - - -- DESCRIPTION : - -- Returns the evaluator for the Jacobian matrix. - --- DESTRUCTOR : - - procedure Clear; - - -- DESCRIPTION : - -- Clears the container: its polynomial system and evaluator. - -end Standard_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/State/standard_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_solutions_container.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ -package body Standard_Solutions_Container is - --- INTERNAL DATA : - - first,last,current : Solution_List; - ls1,ls2,solsym : Symbol_Table.Link_to_Array_of_Symbols; - cursor : natural32 := 0; -- index to the current solution - --- OPERATIONS : - - procedure Initialize ( sols : in Solution_List ) is - - tmp : Solution_List := sols; - - begin - for i in 1..Length_Of(sols) loop - Append(first,last,Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - current := first; - cursor := 1; - end Initialize; - - function Length return natural32 is - begin - return Length_Of(first); - end Length; - - function Dimension return natural32 is - begin - if Is_Null(first) - then return 0; - else return natural32(Head_Of(first).n); - end if; - end Dimension; - - function Retrieve return Solution_List is - begin - return first; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ) is - - ls : Link_to_Solution; - - begin - Retrieve(k,ls,fail); - if not fail - then s := ls.all; - end if; - end Retrieve; - - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - s := Head_Of(tmp); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Retrieve; - - procedure Retrieve_Next_Initialize is - begin - current := first; - if Is_Null(current) - then cursor := 0; -- empty solution list - else cursor := 1; -- index to the first solution - end if; - end Retrieve_Next_Initialize; - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - current := Tail_Of(current); - cursor := cursor + 1; - end if; - end Retrieve_Next; - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - s := Head_Of(current); - k := cursor; - end if; - end Retrieve_Current; - - procedure Move_Current ( k : out natural32 ) is - begin - if Is_Null(current) then - k := 0; - else - current := Tail_Of(current); - if Is_Null(current) - then cursor := 0; - else cursor := cursor + 1; - end if; - k := cursor; - end if; - end Move_Current; - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - ls : Link_to_Solution; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - ls := Head_Of(tmp); - ls.t := s.t; - ls.m := s.m; - ls.v := s.v; - ls.err := s.err; - ls.rco := s.rco; - ls.res := s.res; - Set_Head(tmp,ls); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ) is - - tmp : Solution_List := first; - cnt : natural32 := 0; - - begin - while not Is_Null(tmp) loop - cnt := cnt + 1; - if cnt = k then - fail := false; - Set_Head(tmp,s); - return; - else - tmp := Tail_Of(tmp); - end if; - end loop; - fail := true; - end Replace; - - procedure Append ( s : in Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Append ( s : in Link_to_Solution ) is - begin - if Is_Null(first) then - Append(first,last,s); - current := first; - cursor := 1; - else - Append(first,last,s); - end if; - end Append; - - procedure Clear is - begin - Clear(first); - last := first; - current := first; - cursor := 0; - end Clear; - --- Management of two symbol tables for diagonal homotopies : - - procedure Store_Symbol_Table - ( k : in natural32; sbs : Symbol_Table.Array_of_Symbols ) is - begin - if k = 0 then - solsym := new Symbol_Table.Array_of_Symbols'(sbs); - elsif k = 1 then - ls1 := new Symbol_Table.Array_of_Symbols'(sbs); - elsif k = 2 then - ls2 := new Symbol_Table.Array_of_Symbols'(sbs); - end if; - end Store_Symbol_Table; - - function Retrieve_Symbol_Table - ( k : in natural32 ) - return Symbol_Table.Link_to_Array_of_Symbols is - - res : Symbol_Table.Link_to_Array_of_Symbols := null; - - begin - if k = 0 then - return solsym; - elsif k = 1 then - return ls1; - elsif k = 2 then - return ls2; - else - return res; - end if; - end Retrieve_Symbol_Table; - - procedure Clear_Symbol_Table ( k : in natural32 ) is - begin - if k = 0 then - Symbol_Table.Clear(solsym); - elsif k = 1 then - Symbol_Table.Clear(ls1); - elsif k = 2 then - Symbol_Table.Clear(ls2); - end if; - end Clear_Symbol_Table; - -end Standard_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/standard_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/State/standard_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/State/standard_solutions_container.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/standard_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -with text_io; use text_io; -with Symbol_Table; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; - -package Standard_Solutions_Container is - --- DESCRIPTION : --- This package provides a container for a solution list, --- designed for the interface with C. - - procedure Initialize ( sols : in Solution_List ); - - -- DESCRIPTION : - -- Initializes the container with a solution list. - - function Length return natural32; - - -- DESCRIPTION : - -- Returns the number of solutions in the container. - - function Dimension return natural32; - - -- DESCRIPTION : - -- Returns 0 if the container is empty, otherwise the - -- dimension of the solution vectors is returned. - - function Retrieve return Solution_List; - - -- DESCRIPTION : - -- Returns the lists of solutions stored in the container. - - procedure Retrieve ( k : in natural32; s : out Solution; - fail : out boolean ); - procedure Retrieve ( k : in natural32; s : out Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to retrieve the k-th solution in s. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Retrieve_Next_Initialize; - - -- DESCRIPTION : - -- Resets the current pointer to the first solution in the container. - - procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the next solution, where the current pointer is, - -- and returns in k the index of the solution in the list. - -- If k > 0, then s contains the pointer to the current solutioni - -- and the current pointer is moved to the next solution. - -- Otherwise, if the current pointer is null, then k on return is 0. - - procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); - - -- DESCRIPTION : - -- Retrieves the current solution without advancing the pointer to - -- the current solution. If the pointer refers to a valid solution, - -- then k is the solution number on return, otherwise, k = 0. - - procedure Move_Current ( k : out natural32 ); - - -- DESCRIPTION : - -- Moves the pointer to the current solution to the next solution. - -- If the pointer is currently null or if there is no next solution, - -- then k will be zero on return. Otherwise, k will equal the - -- value of the cursor, the number of the current solution. - - procedure Replace ( k : in natural32; s : in Solution; - fail : out boolean ); - procedure Replace ( k : in natural32; s : in Link_to_Solution; - fail : out boolean ); - -- DESCRIPTION : - -- Attemps to replace the k-th solution with the given one. - -- Reports failure (fail = true) if there are fewer than k - -- solutions in the container. - - procedure Append ( s : in Solution ); - procedure Append ( s : in Link_to_Solution ); - - -- DESCRIPTION : - -- Appends the solution to the container. - - procedure Clear; - - -- DESCRIPTION : - -- Clears the solutions in the container. - --- Management of two symbol tables for diagonal homotopies : - - procedure Store_Symbol_Table - ( k : in natural32; sbs : Symbol_Table.Array_of_Symbols ); - - -- DESCRIPTION : - -- Stores the symbol table for the k-th witness set, k must be 1 or 2. - -- The k = 0 can be used for a common symbol table for reading the - -- solutions in the witness sets from file. - - function Retrieve_Symbol_Table - ( k : in natural32 ) return Symbol_Table.Link_to_Array_of_Symbols; - - -- DESCRIPTION : - -- Returns the symbol table for the k-th witness set, k must be 1 or 2. - -- With k = 0, one obtains the common symbol table to read solutions. - - procedure Clear_Symbol_Table ( k : in natural32 ); - - -- DESCRIPTION : - -- Clears the symbol table for the k-th witness set, if k = 1 or 2; - -- or, in case k = 0, then the common solution symbol table is cleared. - -end Standard_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/ts_celcon.adb phcpack-2.4.85/src/Ada/CtoPHC/State/ts_celcon.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/ts_celcon.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/ts_celcon.adb 2021-06-30 23:22:40.000000000 +0000 @@ -21,7 +21,7 @@ with Integer_Mixed_Subdivisions; with Integer_Mixed_Subdivisions_io; use Integer_Mixed_Subdivisions_io; with Mixed_Volume_Computation; -with Drivers_for_Lifting_Functions; +with Main_Lifting_Functions; with Cells_Container; with Integer_Cells_Container; @@ -400,7 +400,7 @@ perms : Standard_Integer_Vectors.Link_to_Vector; r : integer32; - use Drivers_for_Lifting_Functions; + use Main_Lifting_Functions; begin Mixed_Volume_Computation.Compute_Mixture(sup,mix,perms); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/ts_filman.adb phcpack-2.4.85/src/Ada/CtoPHC/State/ts_filman.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/ts_filman.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/ts_filman.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -with text_io; use text_io; -with File_Management; - -procedure ts_filman is - --- DESCRIPTION : --- Test on management of file_type objects. - - c : character; - -begin - new_line; - File_Management.Create_Output_File; - put_line(File_Management.Link_to_Output.all,"hello world!"); - File_Management.Close_Output_File; - File_Management.Open_Input_File; - get(File_Management.Link_to_Input.all,c); - put_line("The first character on the file : " & c); -end ts_filman; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/ts_solcon.adb phcpack-2.4.85/src/Ada/CtoPHC/State/ts_solcon.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/ts_solcon.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/ts_solcon.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,293 +0,0 @@ -with text_io; use text_io; -with Communications_with_User; use Communications_with_User; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Complex_Solutions; -with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; -with DoblDobl_Complex_Solutions; -with DoblDobl_Complex_Solutions_io; use DoblDobl_Complex_Solutions_io; -with QuadDobl_Complex_Solutions; -with QuadDobl_Complex_Solutions_io; use QuadDobl_Complex_Solutions_io; -with Multprec_Complex_Solutions; -with Multprec_Complex_Solutions_io; use Multprec_Complex_Solutions_io; -with Standard_Solutions_Container; -with DoblDobl_Solutions_Container; -with QuadDobl_Solutions_Container; -with Multprec_Solutions_Container; - -procedure ts_solcon is - --- DESCRIPTION : --- This procedure is an interactive test on the operations --- in the solution container. - - procedure Standard_Test_Retrievals is - - -- DESRIPTION : - -- Test the retrieval of the solutions in the container. - - use Standard_Complex_Solutions; - - fail : boolean; - ind : natural32 := 0; - ls : Link_to_Solution; - - begin - new_line; - put_line("Testing the retrieval of solutions..."); - new_line; - put("Number of solutions in the container : "); - put(Standard_Solutions_Container.Length,1); new_line; - put("Dimension of solution vectors : "); - put(Standard_Solutions_Container.Dimension,1); new_line; - loop - ind := ind + 1; - Standard_Solutions_Container.Retrieve(ind,ls,fail); - exit when fail; - put("Solution "); put(ind,1); put_line(" :"); - put(ls.all); new_line; - end loop; - end Standard_Test_Retrievals; - - procedure DoblDobl_Test_Retrievals is - - -- DESRIPTION : - -- Test the retrieval of the solutions in the container. - - use DoblDobl_Complex_Solutions; - - fail : boolean; - ind : natural32 := 0; - ls : Link_to_Solution; - - begin - new_line; - put_line("Testing the retrieval of solutions..."); - new_line; - put("Number of solutions in the container : "); - put(DoblDobl_Solutions_Container.Length,1); new_line; - put("Dimension of solution vectors : "); - put(DoblDobl_Solutions_Container.Dimension,1); new_line; - loop - ind := ind + 1; - DoblDobl_Solutions_Container.Retrieve(ind,ls,fail); - exit when fail; - put("Solution "); put(ind,1); put_line(" :"); - put(ls.all); new_line; - end loop; - end DoblDobl_Test_Retrievals; - - procedure QuadDobl_Test_Retrievals is - - -- DESRIPTION : - -- Test the retrieval of the solutions in the container. - - use QuadDobl_Complex_Solutions; - - fail : boolean; - ind : natural32 := 0; - ls : Link_to_Solution; - - begin - new_line; - put_line("Testing the retrieval of solutions..."); - new_line; - put("Number of solutions in the container : "); - put(QuadDobl_Solutions_Container.Length,1); new_line; - put("Dimension of solution vectors : "); - put(QuadDobl_Solutions_Container.Dimension,1); new_line; - loop - ind := ind + 1; - QuadDobl_Solutions_Container.Retrieve(ind,ls,fail); - exit when fail; - put("Solution "); put(ind,1); put_line(" :"); - put(ls.all); new_line; - end loop; - end QuadDobl_Test_Retrievals; - - procedure Multprec_Test_Retrievals is - - -- DESRIPTION : - -- Test the retrieval of the solutions in the container. - - use Multprec_Complex_Solutions; - - fail : boolean; - ind : natural32 := 0; - ls : Link_to_Solution; - - begin - new_line; - put_line("Testing the retrieval of solutions..."); - new_line; - put("Number of solutions in the container : "); - put(Multprec_Solutions_Container.Length,1); new_line; - put("Dimension of solution vectors : "); - put(Multprec_Solutions_Container.Dimension,1); new_line; - loop - ind := ind + 1; - Multprec_Solutions_Container.Retrieve(ind,ls,fail); - exit when fail; - put("Solution "); put(ind,1); put_line(" :"); - put(ls.all); new_line; - end loop; - end Multprec_Test_Retrievals; - - procedure Standard_Test_Additions - ( sols : in Standard_Complex_Solutions.Solution_List ) is - - -- DESCRIPTION : - -- Tests the constructors of the container. - - use Standard_Complex_Solutions; - - tmp,retrieved : Solution_List; - - begin - new_line; - put_line("Testing the addition of solutions..."); - new_line; - tmp := sols; - while not Is_Null(tmp) loop - Standard_Solutions_Container.Append(Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - retrieved := Standard_Solutions_Container.Retrieve; - put_line("The retrieved solution list :"); - if not Is_Null(retrieved) - then put(Standard_Output, - Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); - end if; - end Standard_Test_Additions; - - procedure DoblDobl_Test_Additions - ( sols : in DoblDobl_Complex_Solutions.Solution_List ) is - - -- DESCRIPTION : - -- Tests the constructors of the container. - - use DoblDobl_Complex_Solutions; - - tmp,retrieved : Solution_List; - - begin - new_line; - put_line("Testing the addition of solutions..."); - new_line; - tmp := sols; - while not Is_Null(tmp) loop - DoblDobl_Solutions_Container.Append(Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - retrieved := DoblDobl_Solutions_Container.Retrieve; - put_line("The retrieved solution list :"); - if not Is_Null(retrieved) - then put(Standard_Output, - Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); - end if; - end DoblDobl_Test_Additions; - - procedure QuadDobl_Test_Additions - ( sols : in QuadDobl_Complex_Solutions.Solution_List ) is - - -- DESCRIPTION : - -- Tests the constructors of the container. - - use QuadDobl_Complex_Solutions; - - tmp,retrieved : Solution_List; - - begin - new_line; - put_line("Testing the addition of solutions..."); - new_line; - tmp := sols; - while not Is_Null(tmp) loop - QuadDobl_Solutions_Container.Append(Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - retrieved := QuadDobl_Solutions_Container.Retrieve; - put_line("The retrieved solution list :"); - if not Is_Null(retrieved) - then put(Standard_Output, - Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); - end if; - end QuadDobl_Test_Additions; - - procedure Multprec_Test_Additions - ( sols : in Multprec_Complex_Solutions.Solution_List ) is - - -- DESCRIPTION : - -- Tests the constructors of the container. - - use Multprec_Complex_Solutions; - - tmp,retrieved : Solution_List; - - begin - new_line; - put_line("Testing the addition of solutions..."); - new_line; - tmp := sols; - while not Is_Null(tmp) loop - Multprec_Solutions_Container.Append(Head_Of(tmp).all); - tmp := Tail_Of(tmp); - end loop; - retrieved := Multprec_Solutions_Container.Retrieve; - put_line("The retrieved solution list :"); - if not Is_Null(retrieved) - then put(Standard_Output, - Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); - end if; - end Multprec_Test_Additions; - - procedure Main is - - st_sols : Standard_Complex_Solutions.Solution_List; - dd_sols : DoblDobl_Complex_Solutions.Solution_List; - qd_sols : QuadDobl_Complex_Solutions.Solution_List; - mp_sols : Multprec_Complex_Solutions.Solution_List; - ans : character; - - begin - new_line; - put_line("MENU to test the operations in the solutions container :"); - put_line(" 1. test with standard double complex numbers;"); - put_line(" 2. test with double double complex numbers;"); - put_line(" 3. test with quad double complex numbers;"); - put_line(" 4. test with multiprecision complex numbers."); - put("Type 1, 2, 3, or 4 to select the precision : "); - Ask_Alternative(ans,"1234"); - new_line; - case ans is - when '1' => - Read(st_sols); - Standard_Solutions_Container.Initialize(st_sols); - Standard_Test_Retrievals; - Standard_Solutions_Container.Clear; - Standard_Test_Additions(st_sols); - when '2' => - Read(dd_sols); - DoblDobl_Solutions_Container.Initialize(dd_sols); - DoblDobl_Test_Retrievals; - DoblDobl_Solutions_Container.Clear; - DoblDobl_Test_Additions(dd_sols); - when '3' => - Read(qd_sols); - QuadDobl_Solutions_Container.Initialize(qd_sols); - QuadDobl_Test_Retrievals; - QuadDobl_Solutions_Container.Clear; - QuadDobl_Test_Additions(qd_sols); - when '4' => - Read(mp_sols); - Multprec_Solutions_Container.Initialize(mp_sols); - Multprec_Test_Retrievals; - Multprec_Solutions_Container.Clear; - Multprec_Test_Additions(mp_sols); - when others => null; - end case; - end Main; - -begin - Main; -end ts_solcon; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/ts_solpool.adb phcpack-2.4.85/src/Ada/CtoPHC/State/ts_solpool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/ts_solpool.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/ts_solpool.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -with text_io; use text_io; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; -with Solutions_Pool; - -procedure ts_solpool is - - n : integer32 := 0; - -begin - new_line; - put_line("Testing the operations in the solutions pool..."); - new_line; - put("-> The size of the solutions pool : "); - put(Solutions_Pool.Size,1); new_line; - put("Give the number of solution lists : "); get(n); - Solutions_Pool.Initialize(n); - put("-> The size of the solutions pool : "); - put(Solutions_Pool.Size,1); new_line; -end ts_solpool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/ts_syscon.adb phcpack-2.4.85/src/Ada/CtoPHC/State/ts_syscon.adb --- phcpack-2.4.84/src/Ada/CtoPHC/State/ts_syscon.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/ts_syscon.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,631 +0,0 @@ -with text_io; use text_io; -with Communications_with_User; use Communications_with_User; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with Standard_Complex_Polynomials; -with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; -with Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Standard_Complex_Laurentials; -with Standard_Complex_Laurentials_io; use Standard_Complex_Laurentials_io; -with Standard_Complex_Laur_Systems; -with Standard_Complex_Laur_Systems_io; use Standard_Complex_Laur_Systems_io; -with DoblDobl_Complex_Polynomials; -with DoblDobl_Complex_Polynomials_io; use DoblDobl_Complex_Polynomials_io; -with DoblDobl_Complex_Poly_Systems; -with DoblDobl_Complex_Poly_Systems_io; use DoblDobl_Complex_Poly_Systems_io; -with DoblDobl_Complex_Laurentials; -with DoblDobl_Complex_Laurentials_io; use DoblDobl_Complex_Laurentials_io; -with DoblDobl_Complex_Laur_Systems; -with DoblDobl_Complex_Laur_Systems_io; use DoblDobl_Complex_Laur_Systems_io; -with QuadDobl_Complex_Polynomials; -with QuadDobl_Complex_Polynomials_io; use QuadDobl_Complex_Polynomials_io; -with QuadDobl_Complex_Poly_Systems; -with QuadDobl_Complex_Poly_Systems_io; use QuadDobl_Complex_Poly_Systems_io; -with QuadDobl_Complex_Laurentials; -with QuadDobl_Complex_Laurentials_io; use QuadDobl_Complex_Laurentials_io; -with QuadDobl_Complex_Laur_Systems; -with QuadDobl_Complex_Laur_Systems_io; use QuadDobl_Complex_Laur_Systems_io; -with Multprec_Complex_Polynomials; -with Multprec_Complex_Polynomials_io; use Multprec_Complex_Polynomials_io; -with Multprec_Complex_Poly_Systems; -with Multprec_Complex_Poly_Systems_io; use Multprec_Complex_Poly_Systems_io; -with Multprec_Complex_Laurentials; -with Multprec_Complex_Laurentials_io; use Multprec_Complex_Laurentials_io; -with Multprec_Complex_Laur_Systems; -with Multprec_Complex_Laur_Systems_io; use Multprec_Complex_Laur_Systems_io; -with Standard_PolySys_Container; -with DoblDobl_PolySys_Container; -with QuadDobl_PolySys_Container; -with Multprec_PolySys_Container; -with Standard_LaurSys_Container; -with DoblDobl_LaurSys_Container; -with QuadDobl_LaurSys_Container; -with Multprec_LaurSys_Container; - -procedure ts_syscon is - --- DESCRIPTION : --- This procedure is an interactive testing facility on the --- operations in the package systems container. - - procedure Standard_Test_Retrievals is - - -- DESCRIPTION : - -- Tests the selectors in the package. - - use Standard_Complex_Polynomials; - - n : constant natural32 := Standard_PolySys_Container.Dimension; - m : natural32; - - begin - put("Dimension of the system : "); put(n,1); new_line; - for i in 1..integer32(n) loop - m := Standard_PolySys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := Standard_PolySys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(Standard_PolySys_Container.Retrieve(i)); new_line; - end; - end loop; - end Standard_Test_Retrievals; - - procedure DoblDobl_Test_Retrievals is - - -- DESCRIPTION : - -- Tests the selectors in the package. - - use DoblDobl_Complex_Polynomials; - - n : constant natural32 := DoblDobl_PolySys_Container.Dimension; - m : natural32; - - begin - put("Dimension of the system : "); put(n,1); new_line; - for i in 1..integer32(n) loop - m := DoblDobl_PolySys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := DoblDobl_PolySys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(DoblDobl_PolySys_Container.Retrieve(i)); new_line; - end; - end loop; - end DoblDobl_Test_Retrievals; - - procedure QuadDobl_Test_Retrievals is - - -- DESCRIPTION : - -- Tests the selectors in the package. - - use QuadDobl_Complex_Polynomials; - - n : constant natural32 := QuadDobl_PolySys_Container.Dimension; - m : natural32; - - begin - put("Dimension of the system : "); put(n,1); new_line; - for i in 1..integer32(n) loop - m := QuadDobl_PolySys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := QuadDobl_PolySys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(QuadDobl_PolySys_Container.Retrieve(i)); new_line; - end; - end loop; - end QuadDobl_Test_Retrievals; - - procedure Multprec_Test_Retrievals is - - -- DESCRIPTION : - -- Tests the selectors in the package. - - use Multprec_Complex_Polynomials; - - n : constant natural32 := Multprec_PolySys_Container.Dimension; - m : natural32; - - begin - put("Dimension of the system : "); put(n,1); new_line; - for i in 1..integer32(n) loop - m := Multprec_PolySys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := Multprec_PolySys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(Multprec_PolySys_Container.Retrieve(i)); new_line; - end; - end loop; - end Multprec_Test_Retrievals; - - procedure Standard_Test_Laurent_Retrievals is - - -- DESCRIPTION : - -- Test on retrieving data from the Laurent system container, - -- for coefficients in standard double precision. - - use Standard_Complex_Laurentials; - - n : constant natural32 := Standard_LaurSys_Container.Dimension; - m : natural32; - -- lp : Standard_Complex_Laur_Systems.Link_to_Laur_Sys; - - begin - put("Dimension of the system : "); put(n,1); new_line; - -- lp := Standard_LaurSys_Container.Retrieve; - -- put_line("The Laurent polynomial system : "); put(lp.all); - for i in 1..integer32(n) loop - m := Standard_LaurSys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := Standard_LaurSys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(Standard_LaurSys_Container.Retrieve(i)); new_line; - end; - end loop; - end Standard_Test_Laurent_Retrievals; - - procedure DoblDobl_Test_Laurent_Retrievals is - - -- DESCRIPTION : - -- Test on retrieving data from the Laurent system container, - -- for coefficients in double double precision. - - use DoblDobl_Complex_Laurentials; - - n : constant natural32 := DoblDobl_LaurSys_Container.Dimension; - m : natural32; - -- lp : DoblDobl_Complex_Laur_Systems.Link_to_Laur_Sys; - - begin - put("Dimension of the system : "); put(n,1); new_line; - -- lp := DoblDobl_LaurSys_Container.Retrieve; - -- put_line("The Laurent polynomial system : "); put(lp.all); - for i in 1..integer32(n) loop - m := DoblDobl_LaurSys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := DoblDobl_LaurSys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(DoblDobl_LaurSys_Container.Retrieve(i)); new_line; - end; - end loop; - end DoblDobl_Test_Laurent_Retrievals; - - procedure QuadDobl_Test_Laurent_Retrievals is - - -- DESCRIPTION : - -- Test on retrieving data from the Laurent system container, - -- for coefficients in double double precision. - - use QuadDobl_Complex_Laurentials; - - n : constant natural32 := QuadDobl_LaurSys_Container.Dimension; - m : natural32; - -- lp : QuadDobl_Complex_Laur_Systems.Link_to_Laur_Sys; - - begin - put("Dimension of the system : "); put(n,1); new_line; - -- lp := QuadDobl_LaurSys_Container.Retrieve; - -- put_line("The Laurent polynomial system : "); put(lp.all); - for i in 1..integer32(n) loop - m := QuadDobl_LaurSys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := QuadDobl_LaurSys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(QuadDobl_LaurSys_Container.Retrieve(i)); new_line; - end; - end loop; - end QuadDobl_Test_Laurent_Retrievals; - - procedure Multprec_Test_Laurent_Retrievals is - - -- DESCRIPTION : - -- Test on retrieving data from the Laurent system container, - -- for multiprecision complex coefficients. - - use Multprec_Complex_Laurentials; - - n : constant natural32 := Multprec_LaurSys_Container.Dimension; - m : natural32; - -- lp : Multprec_Complex_Laur_Systems.Link_to_Laur_Sys; - - begin - put("Dimension of the system : "); put(n,1); new_line; - -- lp := Multprec_LaurSys_Container.Retrieve; - -- put_line("The Laurent polynomial system : "); put(lp.all); - for i in 1..integer32(n) loop - m := Multprec_LaurSys_Container.Number_of_Terms(i); - put("Number of terms in polynomial "); put(i,1); - put(" : "); put(m,1); new_line; - declare - p : Poly := Null_Poly; - begin - for j in 1..m loop - declare - t : Term := Multprec_LaurSys_Container.Retrieve_Term(i,j); - begin - Add(p,t); - Clear(t); - end; - end loop; - put(p); new_line; - put(Multprec_LaurSys_Container.Retrieve(i)); new_line; - end; - end loop; - end Multprec_Test_Laurent_Retrievals; - - procedure Standard_Test_Additions - ( p : in Standard_Complex_Poly_Systems.Poly_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the standard double polynomial container. - - use Standard_Complex_Polynomials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - Standard_PolySys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - Standard_PolySys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The polynomial system : "); - put(Standard_PolySys_Container.Retrieve.all); - end Standard_Test_Additions; - - procedure DoblDobl_Test_Additions - ( p : in DoblDobl_Complex_Poly_Systems.Poly_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the double double polynomial container. - - use DoblDobl_Complex_Polynomials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - DoblDobl_PolySys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - DoblDobl_PolySys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The polynomial system : "); - put(DoblDobl_PolySys_Container.Retrieve.all); - end DoblDobl_Test_Additions; - - procedure QuadDobl_Test_Additions - ( p : in QuadDobl_Complex_Poly_Systems.Poly_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the quad double polynomial container. - - use QuadDobl_Complex_Polynomials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - QuadDobl_PolySys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - QuadDobl_PolySys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The polynomial system : "); - put(QuadDobl_PolySys_Container.Retrieve.all); - end QuadDobl_Test_Additions; - - procedure Multprec_Test_Additions - ( p : in Multprec_Complex_Poly_Systems.Poly_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the multiprecision polynomial container. - - use Multprec_Complex_Polynomials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - Multprec_PolySys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - Multprec_PolySys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The polynomial system : "); - put(Multprec_PolySys_Container.Retrieve.all); - end Multprec_Test_Additions; - - procedure Standard_Test_Laurent_Additions - ( p : in Standard_Complex_Laur_Systems.Laur_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the standard double Laurent container. - - use Standard_Complex_Laurentials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - Standard_LaurSys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - Standard_LaurSys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The Laurent polynomial system : "); - put(Standard_LaurSys_Container.Retrieve.all); - end Standard_Test_Laurent_Additions; - - procedure DoblDobl_Test_Laurent_Additions - ( p : in DoblDobl_Complex_Laur_Systems.Laur_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the double double Laurent container. - - use DoblDobl_Complex_Laurentials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - DoblDobl_LaurSys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - DoblDobl_LaurSys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The Laurent polynomial system : "); - put(DoblDobl_LaurSys_Container.Retrieve.all); - end DoblDobl_Test_Laurent_Additions; - - procedure QuadDobl_Test_Laurent_Additions - ( p : in QuadDobl_Complex_Laur_Systems.Laur_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the quad double Laurent container. - - use QuadDobl_Complex_Laurentials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - QuadDobl_LaurSys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - QuadDobl_LaurSys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The Laurent polynomial system : "); - put(QuadDobl_LaurSys_Container.Retrieve.all); - end QuadDobl_Test_Laurent_Additions; - - procedure Multprec_Test_Laurent_Additions - ( p : in Multprec_Complex_Laur_Systems.Laur_Sys ) is - - -- DESCRIPTION : - -- Tests the constructors of the multiprecision Laurent container. - - use Multprec_Complex_Laurentials; - - ind : integer32; - - procedure Add_Term ( t : in Term; continue : out boolean ) is - begin - Multprec_LaurSys_Container.Add_Term(ind,t); - continue := true; - end Add_Term; - procedure Add_Terms is new Visiting_Iterator(Add_Term); - - begin - Multprec_LaurSys_Container.Initialize(p'last); - for i in p'range loop - ind := i; - Add_Terms(p(i)); - end loop; - put_line("The Laurent polynomial system : "); - put(Multprec_LaurSys_Container.Retrieve.all); - end Multprec_Test_Laurent_Additions; - - procedure Main is - - st_lp : Standard_Complex_Poly_Systems.Link_to_Poly_Sys; - dd_lp : DoblDobl_Complex_Poly_Systems.Link_to_Poly_Sys; - qd_lp : QuadDobl_Complex_Poly_Systems.Link_to_Poly_Sys; - mp_lp : Multprec_Complex_Poly_Systems.Link_to_Poly_Sys; - st_lq : Standard_Complex_Laur_Systems.Link_to_Laur_Sys; - dd_lq : DoblDobl_Complex_Laur_Systems.Link_to_Laur_Sys; - qd_lq : QuadDobl_Complex_Laur_Systems.Link_to_Laur_Sys; - mp_lq : Multprec_Complex_Laur_Systems.Link_to_Laur_Sys; - ans : character; - - begin - new_line; - put_line("MENU to test the operations in the systems container :"); - put_line(" 1. test with standard double complex numbers;"); - put_line(" 2. test with double double complex numbers;"); - put_line(" 3. test with quad double complex numbers;"); - put_line(" 4. test with arbitrary precision complex numbers;"); - put_line(" 5. test Laurent systems in standard double precision;"); - put_line(" 6. test Laurent systems in double double precision;"); - put_line(" 7. test Laurent systems in quad double precision;"); - put_line(" 8. test Laurent systems in arbitrary multiprecision;"); - put("Type 1, 2, 3, 4, 5, 6, 7, or 8 to select the precision : "); - Ask_Alternative(ans,"12345678"); - new_line; - case ans is - when '1' => - get(st_lp); - Standard_PolySys_Container.Initialize(st_lp.all); - Standard_Test_Retrievals; - Standard_PolySys_Container.Clear; - Standard_Test_Additions(st_lp.all); - when '2' => - get(dd_lp); - DoblDobl_PolySys_Container.Initialize(dd_lp.all); - DoblDobl_Test_Retrievals; - DoblDobl_PolySys_Container.Clear; - DoblDobl_Test_Additions(dd_lp.all); - when '3' => - get(qd_lp); - QuadDobl_PolySys_Container.Initialize(qd_lp.all); - QuadDobl_Test_Retrievals; - QuadDobl_PolySys_Container.Clear; - QuadDobl_Test_Additions(qd_lp.all); - when '4' => - get(mp_lp); - Multprec_PolySys_Container.Initialize(mp_lp.all); - Multprec_Test_Retrievals; - Multprec_PolySys_Container.Clear; - Multprec_Test_Additions(mp_lp.all); - when '5' => - get(st_lq); - Standard_LaurSys_Container.Initialize(st_lq.all); - Standard_Test_Laurent_Retrievals; - Standard_LaurSys_Container.Clear; - Standard_Test_Laurent_Additions(st_lq.all); - when '6' => - get(dd_lq); - DoblDobl_LaurSys_Container.Initialize(dd_lq.all); - DoblDobl_Test_Laurent_Retrievals; - DoblDobl_LaurSys_Container.Clear; - DoblDobl_Test_Laurent_Additions(dd_lq.all); - when '7' => - get(qd_lq); - QuadDobl_LaurSys_Container.Initialize(qd_lq.all); - QuadDobl_Test_Laurent_Retrievals; - QuadDobl_LaurSys_Container.Clear; - QuadDobl_Test_Laurent_Additions(qd_lq.all); - when '8' => - get(mp_lq); - Multprec_LaurSys_Container.Initialize(mp_lq.all); - Multprec_Test_Laurent_Retrievals; - Multprec_LaurSys_Container.Clear; - Multprec_Test_Laurent_Additions(mp_lq.all); - when others => null; - end case; - end Main; - -begin - Main; -end ts_syscon; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/State/UPDATES phcpack-2.4.85/src/Ada/CtoPHC/State/UPDATES --- phcpack-2.4.84/src/Ada/CtoPHC/State/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/State/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,11 @@ +Wed 16 Jun 2021 : moved *fil* packages and test to ../Interface. + Moved all *sys* containers and pools to ../Interface. + +Mon 14 Jun 2021 : moved assignments_in_ada_and_c.a* to ../Types. + +Sun 13 Jun 2021 : fixed ts_celcon.adb for the renaming of the package + drivers_to_lifting_functions to main_lifting_functions. + Tue 15 Dec 2020 : updated integer_cells_container.adb for compiler warnings. Mon 14 Dec 2020 : extended job_handlers and use_c2phc4c with functions diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,165 @@ +with Double_Double_Numbers; use Double_Double_Numbers; +with DoblDobl_Complex_Numbers; use DoblDobl_Complex_Numbers; +with Standard_Integer_Vectors; use Standard_Integer_Vectors; + +package body DoblDobl_LaurSys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Laur_Sys; + ep : Link_to_Eval_Laur_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ) is + begin + lp := new Laur_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Laur_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Laur_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + zero : constant double_double := create(0.0); + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(zero); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Laur_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Laur_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + + -- NOTE : + -- The "if .. /= null then .." test is a patch + -- because a Clear should never lead to a crash! + + begin + if lp /= null then Clear(lp); end if; + if ep /= null then Clear(ep); end if; + if jm /= null then Clear(jm); end if; + if ej /= null then Clear(ej); end if; + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end DoblDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_laursys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,113 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with DoblDobl_Complex_Laurentials; use DoblDobl_Complex_Laurentials; +with DoblDobl_Complex_Laur_Systems; use DoblDobl_Complex_Laur_Systems; +with DoblDobl_Complex_Laur_SysFun; use DoblDobl_Complex_Laur_SysFun; +with DoblDobl_Complex_Laur_JacoMats; use DoblDobl_Complex_Laur_JacoMats; + +package DoblDobl_LaurSys_Container is + +-- DESCRIPTION : +-- This package provides a container for a Laurent polynomial system, +-- with complex double double coefficients, designed for the C interface. + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Laur_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Laur_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end DoblDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,169 @@ +with DoblDobl_Complex_Numbers; use DoblDobl_Complex_Numbers; +with Standard_Natural_Vectors; + +package body DoblDobl_PolySys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Poly_Sys; + ep : Link_to_Eval_Poly_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ) is + begin + lp := new Poly_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Poly_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Poly_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Degree ( k : integer32 ) return integer32 is + begin + if lp = null then + return -1; + elsif lp(k) = Null_Poly then + return -1; + else + return Degree(lp(k)); + end if; + end Degree; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(integer(0)); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Poly_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Poly_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + begin + Clear(lp); + Clear(ep); + Clear(jm); + Clear(ej); + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end DoblDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_polysys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,120 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with DoblDobl_Complex_Polynomials; use DoblDobl_Complex_Polynomials; +with DoblDobl_Complex_Poly_Systems; use DoblDobl_Complex_Poly_Systems; +with DoblDobl_Complex_Poly_SysFun; use DoblDobl_Complex_Poly_SysFun; +with DoblDobl_Complex_Jaco_Matrices; use DoblDobl_Complex_Jaco_Matrices; + +package DoblDobl_PolySys_Container is + +-- DESCRIPTION : +-- This package provides a container for a polynomial system +-- with double double complex coefficients, for the interface with C. + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Degree ( k : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns -1 if there is no k-th polynomial, + -- otherwise returns the degree of the k-th polynomial + -- stored in the system container. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end DoblDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,196 @@ +package body DoblDobl_Solutions_Container is + +-- INTERNAL DATA : + + first,last,current : Solution_List; + cursor : natural32 := 0; -- index to the current solution + +-- OPERATIONS : + + procedure Initialize ( sols : in Solution_List ) is + + tmp : Solution_List := sols; + + begin + for i in 1..Length_Of(sols) loop + Append(first,last,Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + current := first; + cursor := 1; + end Initialize; + + function Length return natural32 is + begin + return Length_Of(first); + end Length; + + function Dimension return natural32 is + begin + if Is_Null(first) + then return 0; + else return natural32(Head_Of(first).n); + end if; + end Dimension; + + function Retrieve return Solution_List is + begin + return first; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ) is + + ls : Link_to_Solution; + + begin + Retrieve(k,ls,fail); + if not fail + then s := ls.all; + end if; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + s := Head_Of(tmp); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Retrieve; + + procedure Retrieve_Next_Initialize is + begin + current := first; + if Is_Null(current) + then cursor := 0; -- empty solution list + else cursor := 1; -- index to the first solution + end if; + end Retrieve_Next_Initialize; + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + current := Tail_Of(current); + cursor := cursor + 1; + end if; + end Retrieve_Next; + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + end if; + end Retrieve_Current; + + procedure Move_Current ( k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + current := Tail_Of(current); + if Is_Null(current) + then cursor := 0; + else cursor := cursor + 1; + end if; + k := cursor; + end if; + end Move_Current; + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + ls : Link_to_Solution; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + ls := Head_Of(tmp); + ls.t := s.t; + ls.m := s.m; + ls.v := s.v; + ls.err := s.err; + ls.rco := s.rco; + ls.res := s.res; + Set_Head(tmp,ls); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + Set_Head(tmp,s); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Append ( s : in Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Append ( s : in Link_to_Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Clear is + begin + Clear(first); + last := first; + current := first; + cursor := 0; + end Clear; + +end DoblDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_solutions_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,89 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with DoblDobl_Complex_Solutions; use DoblDobl_Complex_Solutions; + +package DoblDobl_Solutions_Container is + +-- DESCRIPTION : +-- This package provides a container for a solution list +-- with double double complex coefficients for the interface with C. + + procedure Initialize ( sols : in Solution_List ); + + -- DESCRIPTION : + -- Initializes the container with a solution list. + + function Length return natural32; + + -- DESCRIPTION : + -- Returns the number of solutions in the container. + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- dimension of the solution vectors is returned. + + function Retrieve return Solution_List; + + -- DESCRIPTION : + -- Returns the lists of solutions stored in the container. + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ); + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to retrieve the k-th solution in s. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Retrieve_Next_Initialize; + + -- DESCRIPTION : + -- Resets the current pointer to the first solution in the container. + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the next solution, where the current pointer is, + -- and returns in k the index of the solution in the list. + -- If k > 0, then s contains the pointer to the current solutioni + -- and the current pointer is moved to the next solution. + -- Otherwise, if the current pointer is null, then k on return is 0. + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the current solution without advancing the pointer to + -- the current solution. If the pointer refers to a valid solution, + -- then k is the solution number on return, otherwise, k = 0. + + procedure Move_Current ( k : out natural32 ); + + -- DESCRIPTION : + -- Moves the pointer to the current solution to the next solution. + -- If the pointer is currently null or if there is no next solution, + -- then k will be zero on return. Otherwise, k will equal the + -- value of the cursor, the number of the current solution. + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ); + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to replace the k-th solution with the given one. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Append ( s : in Solution ); + procedure Append ( s : in Link_to_Solution ); + + -- DESCRIPTION : + -- Appends the solution to the container. + + procedure Clear; + + -- DESCRIPTION : + -- Clears the solutions in the container. + +end DoblDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,204 @@ +with unchecked_deallocation; +with DoblDobl_Complex_Polynomials; use DoblDobl_Complex_Polynomials; + +package body DoblDobl_Systems_Pool is + +-- DATA STRUCTURES : + + type Link_to_Array_of_Eval_Poly_Sys is access Array_of_Eval_Poly_Sys; + type Link_to_Array_of_Jaco_Mat is access Array_of_Jaco_Mat; + type Link_to_Array_of_Eval_Jaco_Mat is access Array_of_Eval_Jaco_Mat; + +-- INTERNAL DATA : + + size_pool : integer32; + sp : Link_to_Array_of_Poly_Sys; + ep : Link_to_Array_of_Eval_Poly_Sys; + jm : Link_to_Array_of_Jaco_Mat; + jf : Link_to_Array_of_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( n : in integer32 ) is + begin + size_pool := n; + sp := new Array_of_Poly_Sys(1..n); + ep := new Array_of_Eval_Poly_Sys(1..n); + jm := new Array_of_Jaco_Mat(1..n); + jf := new Array_of_Eval_Jaco_Mat(1..n); + end Initialize; + + procedure Initialize ( k : in integer32; p : in Poly_Sys ) is + begin + if k > 0 and k <= size_pool then + declare + q : Poly_Sys(p'range); + begin + Copy(p,q); + sp(k) := new Poly_Sys'(q); + end; + end if; + end Initialize; + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ) is + begin + Initialize(k,p); + Create_Evaluator(k); + Create_Jacobian_Matrix(k); + Create_Jacobian_Evaluator(k); + end Create; + + procedure Create_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + f : constant Eval_Poly_Sys(p'range) := Create(p.all); + begin + ep(k) := new Eval_Poly_Sys'(f); + end; + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + nv : constant integer32 := integer32(Number_of_Unknowns(p(p'first))); + m : constant Jaco_Mat(p'range,1..nv) := Create(p.all); + begin + jm(k) := new Jaco_Mat'(m); + end; + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + m : constant Link_to_Jaco_Mat := jm(k); + f : constant Eval_Jaco_Mat(m'range(1),m'range(2)) := Create(m.all); + begin + jf(k) := new Eval_Jaco_Mat'(f); + end; + end if; + end Create_Jacobian_Evaluator; + +-- SELECTORS : + + function Size return natural32 is + begin + return natural32(size_pool); + end Size; + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys is + + res : Link_to_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := sp(k); + end if; + return res; + end Retrieve; + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys is + + res : Link_to_Eval_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := ep(k); + end if; + return res; + end Evaluator; + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat is + + res : Link_to_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jm(k); + end if; + return res; + end Jacobian_Matrix; + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat is + + res : Link_to_Eval_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jf(k); + end if; + return res; + end Jacobian_Evaluator; + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then DoblDobl_Complex_Poly_Systems.Clear(sp(k)); + end if; + end Clear_System; + + procedure Clear_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then DoblDobl_Complex_Poly_SysFun.Clear(ep(k)); + end if; + end Clear_Evaluator; + + procedure Clear_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then DoblDobl_Complex_Jaco_Matrices.Clear(jm(k)); + end if; + end Clear_Jacobian_Matrix; + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then DoblDobl_Complex_Jaco_Matrices.Clear(jf(k)); + end if; + end Clear_Jacobian_Evaluator; + + procedure Clear ( k : in integer32 ) is + begin + Clear_System(k); + Clear_Evaluator(k); + Clear_Jacobian_Matrix(k); + Clear_Jacobian_Evaluator(k); + end Clear; + + procedure Clear is + + procedure free is + new unchecked_deallocation(Array_of_Poly_Sys,Link_to_Array_of_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Eval_Poly_Sys, + Link_to_Array_of_Eval_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Jaco_Mat,Link_to_Array_of_Jaco_Mat); + procedure free is + new unchecked_deallocation(Array_of_Eval_Jaco_Mat, + Link_to_Array_of_Eval_Jaco_Mat); + + begin + if size_pool > 0 then + for k in 1..size_pool loop + Clear(k); + end loop; + end if; + free(sp); free(ep); free(jm); free(jf); + size_pool := 0; + end Clear; + +begin + size_pool := 0; +end DoblDobl_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/dobldobl_systems_pool.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,116 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with DoblDobl_Complex_Poly_Systems; use DoblDobl_Complex_Poly_Systems; +with DoblDobl_Complex_Poly_SysFun; use DoblDobl_Complex_Poly_SysFun; +with DoblDobl_Complex_Jaco_Matrices; use DoblDobl_Complex_Jaco_Matrices; + +package DoblDobl_Systems_Pool is + +-- DESCRIPTION : +-- Provides storage facility for multiple polynomial systems, +-- with double double precision complex coefficients. +-- For each system we store four different data structures: +-- (1) a system is an array of polynomials, as lists of terms; +-- (2) an evaluator is an array of nester Horner schemes; +-- (3) the Jacobian matrix as matrix of polynomials; +-- (4) the Jacobian evaluator is a matrix of evaluators. +-- This package is modeled after the package Systems_Container. + +-- CREATORS : + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Allocates memory to store n systems in the pool. + + procedure Initialize ( k : in integer32; p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the k-th system in the pool with p, + -- making a deep copy of the complete data structure for p. + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ); + + -- DESCRITPION : + -- Initializes the k-th systems in the pool with p + -- and creates an evaluator, a Jacobian matrix, and + -- a Jacobian matrix for the system. + + procedure Create_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates an evaluator for the k-th system in the pool. + + procedure Create_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian matrix for the k-th system in the pool. + + procedure Create_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian evaluator for the k-th system in the pool. + +-- SELECTORS : + + function Size return natural32; + + -- DESCRIPTION : + -- Returns the size of the systems pool. + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th system stored in the pool. + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th evaluator stored in the pool. + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian matrix stored in the pool. + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian evaluator stored in the pool. + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th system in the pool. + + procedure Clear_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th evaluator in the pool. + + procedure Clear_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian matrix in the pool. + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian evaluator in the pool. + + procedure Clear ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of all four data structures for + -- the k-th system in the pool. + + procedure Clear; + + -- DESCRIPTION : + -- Deallocation of all memory for the n systems. + +end DoblDobl_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/file_management.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/file_management.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/file_management.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/file_management.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,126 @@ +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; + +package body File_Management is + +-- INTERNAL DATA : + + link_to_infile,link_to_outfile : link_to_file_type; + link_to_wfile1,link_to_wfile2 : link_to_file_type; + +-- OPERATIONS : + + procedure Silent_Open_Input_File ( filename : in string ) is + begin + link_to_infile := new file_type; + Open(link_to_infile.all,in_file,filename); + end Silent_Open_Input_File; + + procedure Silent_Open_Input_File + ( k : in natural32; filename : in string ) is + begin + if k = 1 then + link_to_wfile1 := new file_type; + Open(link_to_wfile1.all,in_file,filename); + elsif k = 2 then + link_to_wfile2 := new file_type; + Open(link_to_wfile2.all,in_file,filename); + end if; + end Silent_Open_Input_File; + + procedure Silent_Open_Input_File is + begin + link_to_infile := new file_type; + Read_Name_and_Open_File(link_to_infile.all); + end Silent_Open_Input_File; + + procedure Silent_Open_Input_File ( k : in natural32 ) is + begin + if k = 1 then + link_to_wfile1 := new file_type; + Read_Name_and_Open_File(link_to_wfile1.all); + elsif k = 2 then + link_to_wfile2 := new file_type; + Read_Name_and_Open_File(link_to_wfile2.all); + end if; + end Silent_Open_Input_File; + + procedure Open_Input_File is + begin + link_to_infile := new file_type; + put_line("Reading the name of the input file..."); + Read_Name_and_Open_File(link_to_infile.all); + end Open_Input_File; + + procedure Open_Input_File ( k : in natural32 ) is + begin + put("Reading the name of the input file for witness set "); + put(k,1); put_line("."); + if k = 1 then + link_to_wfile1 := new file_type; + Read_Name_and_Open_File(link_to_wfile1.all); + elsif k = 2 then + link_to_wfile2 := new file_type; + Read_Name_and_Open_File(link_to_wfile2.all); + end if; + end Open_Input_File; + + procedure Create_Output_File is + begin + link_to_outfile := new file_type; + put_line("Reading the name of the output file..."); + Read_Name_and_Create_File(link_to_outfile.all); + end Create_Output_File; + + function Link_to_Input return link_to_file_type is + begin + return link_to_infile; + end Link_to_Input; + + function Link_to_Input ( k : natural32 ) return link_to_file_type is + begin + if k = 1 then + return link_to_wfile1; + elsif k = 2 then + return link_to_wfile2; + else + return link_to_infile; + end if; + end Link_to_Input; + + function Link_to_Output return link_to_file_type is + begin + return link_to_outfile; + end Link_to_Output; + + procedure Reset_Input_File ( k : in natural32 ) is + begin + if k = 1 then + Reset(link_to_wfile1.all); + elsif k = 2 then + Reset(link_to_wfile2.all); + end if; + end Reset_Input_File; + + procedure Close_Input_File is + begin + close(link_to_infile.all); + end Close_Input_File; + + procedure Close_Input_File ( k : in natural32 ) is + begin + if k = 0 then + close(link_to_infile.all); + elsif k = 1 then + close(link_to_wfile1.all); + elsif k = 2 then + close(link_to_wfile2.all); + end if; + end Close_Input_File; + + procedure Close_Output_File is + begin + close(link_to_outfile.all); + end Close_Output_File; + +end File_Management; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/file_management.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/file_management.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/file_management.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/file_management.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,58 @@ +with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; + +package File_Management is + +-- DESCRIPTION : +-- This package provides produces and functions to manage files, +-- for use in incremental read and write operations. +-- The benefit of this package is that one function may open or create +-- a file, while another function may then use the file, without having +-- to explicitly use a variable that refers to that file. + + type link_to_file_type is access file_type; + + procedure Silent_Open_Input_File; + procedure Silent_Open_Input_File ( k : in natural32 ); + procedure Silent_Open_Input_File ( filename : in string ); + procedure Silent_Open_Input_File ( k : in natural32; filename : in string ); + procedure Open_Input_File; + procedure Open_Input_File ( k : in natural32 ); + + -- DESCRIPTION : + -- Reads the name of a file for input of solutions. + -- The "Silent_" one just asks for a string of characters, + -- while the other one prints first a message before prompting. + -- When the filename is provided, no messages are written. + -- If k is provided, then it is for reading witness set k. + + procedure Create_Output_File; + + -- DESCRIPTION : + -- Reads the name of a file for output of solutions. + + function Link_to_Input return link_to_file_type; + function Link_to_Input ( k : natural32 ) return link_to_file_type; + + -- DESCRIPTION : + -- Returns the reference to the input file. + + function Link_to_Output return link_to_file_type; + + -- DESCRIPTION : + -- Returns the reference to the output file. + + procedure Reset_Input_File ( k : in natural32 ); + + -- DESCRIPTION : + -- Resets the file for the k-th witness set for reading. + -- The number k must be 1 or 2 to have an effect. + + procedure Close_Input_File; + procedure Close_Input_File ( k : in natural32 ); + procedure Close_Output_File; + + -- DESCRIPTION : + -- Closes file used for input or output. + +end File_Management; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_laursys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,169 @@ +with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; +with Standard_Integer_Vectors; use Standard_Integer_Vectors; + +package body Multprec_LaurSys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Laur_Sys; + ep : Link_to_Eval_Laur_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ) is + begin + lp := new Laur_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Laur_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Laur_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Degree ( k : integer32 ) return integer32 is + begin + if lp = null then + return -1; + elsif lp(k) = Null_Poly then + return -1; + else + return Degree(lp(k)); + end if; + end Degree; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + Copy(t.cf,res.cf); + res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Multprec_Complex_Numbers.Create(natural32(0)); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Laur_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Laur_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + begin + Clear(lp); + Clear(ep); + Clear(jm); + Clear(ej); + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end Multprec_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_laursys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,120 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Multprec_Complex_Laurentials; use Multprec_Complex_Laurentials; +with Multprec_Complex_Laur_Systems; use Multprec_Complex_Laur_Systems; +with Multprec_Complex_Laur_SysFun; use Multprec_Complex_Laur_SysFun; +with Multprec_Complex_Laur_JacoMats; use Multprec_Complex_Laur_JacoMats; + +package Multprec_LaurSys_Container is + +-- DESCRIPTION : +-- This package provides a container for a Laurent polynomial system, +-- with multiprecision complex coefficients, for the C interface. + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Degree ( k : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns -1 if there is no k-th polynomial, + -- otherwise returns the degree of the k-th polynomial + -- stored in the system container. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Laur_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Laur_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end Multprec_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_polysys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,169 @@ +with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; +with Standard_Natural_Vectors; use Standard_Natural_Vectors; + +package body Multprec_PolySys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Poly_Sys; + ep : Link_to_Eval_Poly_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ) is + begin + lp := new Poly_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Poly_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Poly_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Degree ( k : integer32 ) return integer32 is + begin + if lp = null then + return -1; + elsif lp(k) = Null_Poly then + return -1; + else + return Degree(lp(k)); + end if; + end Degree; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + Copy(t.cf,res.cf); + res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Multprec_Complex_Numbers.Create(natural32(0)); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Poly_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Poly_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + begin + Clear(lp); + Clear(ep); + Clear(jm); + Clear(ej); + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end Multprec_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_polysys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,121 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Multprec_Complex_Polynomials; use Multprec_Complex_Polynomials; +with Multprec_Complex_Poly_Systems; use Multprec_Complex_Poly_Systems; +with Multprec_Complex_Poly_SysFun; use Multprec_Complex_Poly_SysFun; +with Multprec_Complex_Jaco_Matrices; use Multprec_Complex_Jaco_Matrices; + +package Multprec_PolySys_Container is + +-- DESCRIPTION : +-- This package provides a container for a polynomial system, +-- with coefficients of arbitrary precision, +-- designed for the interface with C. + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Degree ( k : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns -1 if there is no k-th polynomial, + -- otherwise returns the degree of the k-th polynomial + -- stored in the system container. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end Multprec_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_solutions_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,200 @@ +with Multprec_Floating_Numbers; +with Multprec_Complex_Numbers; +with Multprec_Complex_Vectors; + +package body Multprec_Solutions_Container is + +-- INTERNAL DATA : + + first,last,current : Solution_List; + cursor : natural32 := 0; -- index to the current solution + +-- OPERATIONS : + + procedure Initialize ( sols : in Solution_List ) is + + tmp : Solution_List := sols; + + begin + for i in 1..Length_Of(sols) loop + Append(first,last,Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + current := first; + cursor := 1; + end Initialize; + + function Length return natural32 is + begin + return Length_Of(first); + end Length; + + function Dimension return natural32 is + begin + if Is_Null(first) + then return 0; + else return natural32(Head_Of(first).n); + end if; + end Dimension; + + function Retrieve return Solution_List is + begin + return first; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ) is + + ls : Link_to_Solution; + + begin + Retrieve(k,ls,fail); + if not fail + then s := ls.all; + end if; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + s := Head_Of(tmp); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Retrieve; + + procedure Retrieve_Next_Initialize is + begin + current := first; + if Is_Null(current) + then cursor := 0; -- empty solution list + else cursor := 1; -- index to the first solution + end if; + end Retrieve_Next_Initialize; + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + current := Tail_Of(current); + cursor := cursor + 1; + end if; + end Retrieve_Next; + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + end if; + end Retrieve_Current; + + procedure Move_Current ( k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + current := Tail_Of(current); + if Is_Null(current) + then cursor := 0; + else cursor := cursor + 1; + end if; + k := cursor; + end if; + end Move_Current; + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + ls : Link_to_Solution; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + ls := Head_Of(tmp); + Multprec_Complex_Numbers.Copy(s.t,ls.t); + ls.m := s.m; + Multprec_Complex_Vectors.Copy(s.v,ls.v); + Multprec_Floating_Numbers.Copy(s.err,ls.err); + Multprec_Floating_Numbers.Copy(s.rco,ls.rco); + Multprec_Floating_Numbers.Copy(s.res,ls.res); + Set_Head(tmp,ls); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + Set_Head(tmp,s); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Append ( s : in Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Append ( s : in Link_to_Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Clear is + begin + Clear(first); + last := first; + current := first; + cursor := 0; + end Clear; + +end Multprec_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/multprec_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/multprec_solutions_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,89 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Multprec_Complex_Solutions; use Multprec_Complex_Solutions; + +package Multprec_Solutions_Container is + +-- DESCRIPTION : +-- This package provides a container for a solution list +-- with multiprecision complex coefficients for the interface with C. + + procedure Initialize ( sols : in Solution_List ); + + -- DESCRIPTION : + -- Initializes the container with a solution list. + + function Length return natural32; + + -- DESCRIPTION : + -- Returns the number of solutions in the container. + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- dimension of the solution vectors is returned. + + function Retrieve return Solution_List; + + -- DESCRIPTION : + -- Returns the lists of solutions stored in the container. + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ); + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to retrieve the k-th solution in s. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Retrieve_Next_Initialize; + + -- DESCRIPTION : + -- Resets the current pointer to the first solution in the container. + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the next solution, where the current pointer is, + -- and returns in k the index of the solution in the list. + -- If k > 0, then s contains the pointer to the current solutioni + -- and the current pointer is moved to the next solution. + -- Otherwise, if the current pointer is null, then k on return is 0. + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the current solution without advancing the pointer to + -- the current solution. If the pointer refers to a valid solution, + -- then k is the solution number on return, otherwise, k = 0. + + procedure Move_Current ( k : out natural32 ); + + -- DESCRIPTION : + -- Moves the pointer to the current solution to the next solution. + -- If the pointer is currently null or if there is no next solution, + -- then k will be zero on return. Otherwise, k will equal the + -- value of the cursor, the number of the current solution. + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ); + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to replace the k-th solution with the given one. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Append ( s : in Solution ); + procedure Append ( s : in Link_to_Solution ); + + -- DESCRIPTION : + -- Appends the solution to the container. + + procedure Clear; + + -- DESCRIPTION : + -- Clears the solutions in the container. + +end Multprec_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,165 @@ +with Quad_Double_Numbers; use Quad_Double_Numbers; +with QuadDobl_Complex_Numbers; use QuadDobl_Complex_Numbers; +with Standard_Integer_Vectors; use Standard_Integer_Vectors; + +package body QuadDobl_LaurSys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Laur_Sys; + ep : Link_to_Eval_Laur_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ) is + begin + lp := new Laur_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Laur_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Laur_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + zero : constant quad_double := create(0.0); + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(zero); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Laur_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Laur_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + + -- NOTE : + -- The "if .. /= null then .." test is a patch + -- because a Clear should never lead to a crash! + + begin + if lp /= null then Clear(lp); end if; + if ep /= null then Clear(ep); end if; + if jm /= null then Clear(jm); end if; + if ej /= null then Clear(ej); end if; + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end QuadDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_laursys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,113 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with QuadDobl_Complex_Laurentials; use QuadDobl_Complex_Laurentials; +with QuadDobl_Complex_Laur_Systems; use QuadDobl_Complex_Laur_Systems; +with QuadDobl_Complex_Laur_SysFun; use QuadDobl_Complex_Laur_SysFun; +with QuadDobl_Complex_Laur_JacoMats; use QuadDobl_Complex_Laur_JacoMats; + +package QuadDobl_LaurSys_Container is + +-- DESCRIPTION : +-- This package provides a container for a Laurent polynomial system, +-- with complex double double coefficients, designed for the C interface. + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Laur_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Laur_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end QuadDobl_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,169 @@ +with QuadDobl_Complex_Numbers; use QuadDobl_Complex_Numbers; +with Standard_Natural_Vectors; + +package body QuadDobl_PolySys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Poly_Sys; + ep : Link_to_Eval_Poly_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ) is + begin + lp := new Poly_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Poly_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Poly_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Degree ( k : integer32 ) return integer32 is + begin + if lp = null then + return -1; + elsif lp(k) = Null_Poly then + return -1; + else + return Degree(lp(k)); + end if; + end Degree; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(integer(0)); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Poly_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Poly_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + begin + Clear(lp); + Clear(ep); + Clear(jm); + Clear(ej); + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end QuadDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_polysys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,120 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with QuadDobl_Complex_Polynomials; use QuadDobl_Complex_Polynomials; +with QuadDobl_Complex_Poly_Systems; use QuadDobl_Complex_Poly_Systems; +with QuadDobl_Complex_Poly_SysFun; use QuadDobl_Complex_Poly_SysFun; +with QuadDobl_Complex_Jaco_Matrices; use QuadDobl_Complex_Jaco_Matrices; + +package QuadDobl_PolySys_Container is + +-- DESCRIPTION : +-- This package provides a container for a polynomial system +-- with quad double complex coefficients, for the interface with C. + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Degree ( k : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns -1 if there is no k-th polynomial, + -- otherwise returns the degree of the k-th polynomial + -- stored in the system container. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end QuadDobl_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,196 @@ +package body QuadDobl_Solutions_Container is + +-- INTERNAL DATA : + + first,last,current : Solution_List; + cursor : natural32 := 0; -- index to the current solution + +-- OPERATIONS : + + procedure Initialize ( sols : in Solution_List ) is + + tmp : Solution_List := sols; + + begin + for i in 1..Length_Of(sols) loop + Append(first,last,Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + current := first; + cursor := 1; + end Initialize; + + function Length return natural32 is + begin + return Length_Of(first); + end Length; + + function Dimension return natural32 is + begin + if Is_Null(first) + then return 0; + else return natural32(Head_Of(first).n); + end if; + end Dimension; + + function Retrieve return Solution_List is + begin + return first; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ) is + + ls : Link_to_Solution; + + begin + Retrieve(k,ls,fail); + if not fail + then s := ls.all; + end if; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + s := Head_Of(tmp); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Retrieve; + + procedure Retrieve_Next_Initialize is + begin + current := first; + if Is_Null(current) + then cursor := 0; -- empty solution list + else cursor := 1; -- index to the first solution + end if; + end Retrieve_Next_Initialize; + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + current := Tail_Of(current); + cursor := cursor + 1; + end if; + end Retrieve_Next; + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + end if; + end Retrieve_Current; + + procedure Move_Current ( k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + current := Tail_Of(current); + if Is_Null(current) + then cursor := 0; + else cursor := cursor + 1; + end if; + k := cursor; + end if; + end Move_Current; + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + ls : Link_to_Solution; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + ls := Head_Of(tmp); + ls.t := s.t; + ls.m := s.m; + ls.v := s.v; + ls.err := s.err; + ls.rco := s.rco; + ls.res := s.res; + Set_Head(tmp,ls); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + Set_Head(tmp,s); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Append ( s : in Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Append ( s : in Link_to_Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Clear is + begin + Clear(first); + last := first; + current := first; + cursor := 0; + end Clear; + +end QuadDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_solutions_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,89 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with QuadDobl_Complex_Solutions; use QuadDobl_Complex_Solutions; + +package QuadDobl_Solutions_Container is + +-- DESCRIPTION : +-- This package provides a container for a solution list +-- with quad double complex coefficients for the interface with C. + + procedure Initialize ( sols : in Solution_List ); + + -- DESCRIPTION : + -- Initializes the container with a solution list. + + function Length return natural32; + + -- DESCRIPTION : + -- Returns the number of solutions in the container. + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- dimension of the solution vectors is returned. + + function Retrieve return Solution_List; + + -- DESCRIPTION : + -- Returns the lists of solutions stored in the container. + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ); + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to retrieve the k-th solution in s. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Retrieve_Next_Initialize; + + -- DESCRIPTION : + -- Resets the current pointer to the first solution in the container. + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the next solution, where the current pointer is, + -- and returns in k the index of the solution in the list. + -- If k > 0, then s contains the pointer to the current solutioni + -- and the current pointer is moved to the next solution. + -- Otherwise, if the current pointer is null, then k on return is 0. + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the current solution without advancing the pointer to + -- the current solution. If the pointer refers to a valid solution, + -- then k is the solution number on return, otherwise, k = 0. + + procedure Move_Current ( k : out natural32 ); + + -- DESCRIPTION : + -- Moves the pointer to the current solution to the next solution. + -- If the pointer is currently null or if there is no next solution, + -- then k will be zero on return. Otherwise, k will equal the + -- value of the cursor, the number of the current solution. + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ); + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to replace the k-th solution with the given one. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Append ( s : in Solution ); + procedure Append ( s : in Link_to_Solution ); + + -- DESCRIPTION : + -- Appends the solution to the container. + + procedure Clear; + + -- DESCRIPTION : + -- Clears the solutions in the container. + +end QuadDobl_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,204 @@ +with unchecked_deallocation; +with QuadDobl_Complex_Polynomials; use QuadDobl_Complex_Polynomials; + +package body QuadDobl_Systems_Pool is + +-- DATA STRUCTURES : + + type Link_to_Array_of_Eval_Poly_Sys is access Array_of_Eval_Poly_Sys; + type Link_to_Array_of_Jaco_Mat is access Array_of_Jaco_Mat; + type Link_to_Array_of_Eval_Jaco_Mat is access Array_of_Eval_Jaco_Mat; + +-- INTERNAL DATA : + + size_pool : integer32; + sp : Link_to_Array_of_Poly_Sys; + ep : Link_to_Array_of_Eval_Poly_Sys; + jm : Link_to_Array_of_Jaco_Mat; + jf : Link_to_Array_of_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( n : in integer32 ) is + begin + size_pool := n; + sp := new Array_of_Poly_Sys(1..n); + ep := new Array_of_Eval_Poly_Sys(1..n); + jm := new Array_of_Jaco_Mat(1..n); + jf := new Array_of_Eval_Jaco_Mat(1..n); + end Initialize; + + procedure Initialize ( k : in integer32; p : in Poly_Sys ) is + begin + if k > 0 and k <= size_pool then + declare + q : Poly_Sys(p'range); + begin + Copy(p,q); + sp(k) := new Poly_Sys'(q); + end; + end if; + end Initialize; + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ) is + begin + Initialize(k,p); + Create_Evaluator(k); + Create_Jacobian_Matrix(k); + Create_Jacobian_Evaluator(k); + end Create; + + procedure Create_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + f : constant Eval_Poly_Sys(p'range) := Create(p.all); + begin + ep(k) := new Eval_Poly_Sys'(f); + end; + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + nv : constant integer32 := integer32(Number_of_Unknowns(p(p'first))); + m : constant Jaco_Mat(p'range,1..nv) := Create(p.all); + begin + jm(k) := new Jaco_Mat'(m); + end; + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + m : constant Link_to_Jaco_Mat := jm(k); + f : constant Eval_Jaco_Mat(m'range(1),m'range(2)) := Create(m.all); + begin + jf(k) := new Eval_Jaco_Mat'(f); + end; + end if; + end Create_Jacobian_Evaluator; + +-- SELECTORS : + + function Size return natural32 is + begin + return natural32(size_pool); + end Size; + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys is + + res : Link_to_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := sp(k); + end if; + return res; + end Retrieve; + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys is + + res : Link_to_Eval_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := ep(k); + end if; + return res; + end Evaluator; + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat is + + res : Link_to_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jm(k); + end if; + return res; + end Jacobian_Matrix; + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat is + + res : Link_to_Eval_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jf(k); + end if; + return res; + end Jacobian_Evaluator; + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then QuadDobl_Complex_Poly_Systems.Clear(sp(k)); + end if; + end Clear_System; + + procedure Clear_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then QuadDobl_Complex_Poly_SysFun.Clear(ep(k)); + end if; + end Clear_Evaluator; + + procedure Clear_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then QuadDobl_Complex_Jaco_Matrices.Clear(jm(k)); + end if; + end Clear_Jacobian_Matrix; + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then QuadDobl_Complex_Jaco_Matrices.Clear(jf(k)); + end if; + end Clear_Jacobian_Evaluator; + + procedure Clear ( k : in integer32 ) is + begin + Clear_System(k); + Clear_Evaluator(k); + Clear_Jacobian_Matrix(k); + Clear_Jacobian_Evaluator(k); + end Clear; + + procedure Clear is + + procedure free is + new unchecked_deallocation(Array_of_Poly_Sys,Link_to_Array_of_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Eval_Poly_Sys, + Link_to_Array_of_Eval_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Jaco_Mat,Link_to_Array_of_Jaco_Mat); + procedure free is + new unchecked_deallocation(Array_of_Eval_Jaco_Mat, + Link_to_Array_of_Eval_Jaco_Mat); + + begin + if size_pool > 0 then + for k in 1..size_pool loop + Clear(k); + end loop; + end if; + free(sp); free(ep); free(jm); free(jf); + size_pool := 0; + end Clear; + +begin + size_pool := 0; +end QuadDobl_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/quaddobl_systems_pool.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,116 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with QuadDobl_Complex_Poly_Systems; use QuadDobl_Complex_Poly_Systems; +with QuadDobl_Complex_Poly_SysFun; use QuadDobl_Complex_Poly_SysFun; +with QuadDobl_Complex_Jaco_Matrices; use QuadDobl_Complex_Jaco_Matrices; + +package QuadDobl_Systems_Pool is + +-- DESCRIPTION : +-- Provides storage facility for multiple polynomial systems, +-- with quad double precision complex coefficients. +-- For each system we store four different data structures: +-- (1) a system is an array of polynomials, as lists of terms; +-- (2) an evaluator is an array of nester Horner schemes; +-- (3) the Jacobian matrix as matrix of polynomials; +-- (4) the Jacobian evaluator is a matrix of evaluators. +-- This package is modeled after the package Systems_Container. + +-- CREATORS : + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Allocates memory to store n systems in the pool. + + procedure Initialize ( k : in integer32; p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the k-th system in the pool with p, + -- making a deep copy of the complete data structure for p. + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ); + + -- DESCRITPION : + -- Initializes the k-th systems in the pool with p + -- and creates an evaluator, a Jacobian matrix, and + -- a Jacobian matrix for the system. + + procedure Create_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates an evaluator for the k-th system in the pool. + + procedure Create_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian matrix for the k-th system in the pool. + + procedure Create_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian evaluator for the k-th system in the pool. + +-- SELECTORS : + + function Size return natural32; + + -- DESCRIPTION : + -- Returns the size of the systems pool. + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th system stored in the pool. + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th evaluator stored in the pool. + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian matrix stored in the pool. + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian evaluator stored in the pool. + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th system in the pool. + + procedure Clear_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th evaluator in the pool. + + procedure Clear_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian matrix in the pool. + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian evaluator in the pool. + + procedure Clear ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of all four data structures for + -- the k-th system in the pool. + + procedure Clear; + + -- DESCRIPTION : + -- Deallocation of all memory for the n systems. + +end QuadDobl_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/READ_ME phcpack-2.4.85/src/Ada/CtoPHC/Structures/READ_ME --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/READ_ME 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,43 @@ +Structures defines wrappers to systems and solutions in PHCv2.4.85. + +The packages in this folder wrap the data structures to represent +polynomial systems, systems of Laurent polynomials, and solution lists. + +This directory was splitted off from the ../State folder in v2.4.85 +and contains only pure Ada code, using the C type equivalents. + +Run "gprbuild structures.gpr" to make all test procedures. +On windows, type "gprbuild structures.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean structures.gpr" removes all files created by gprbuild. + +------------------------------------------------------------------------------ +file name : short description +------------------------------------------------------------------------------ +file_management : encapsulation of file_type variables +ts_filman : tests encapsulation of type_type variables +------------------------------------------------------------------------------ +standard_polysys_container : management of polynomial systems +dobldobl_polysys_container : polynomial systems with double doubles +quaddobl_polysys_container : polynomial systems with quad doubles +multprec_polysys_container : multiprecision poly system container +standard_laursys_container : management of Laurent systems +dobldobl_laursys_container : for Laurent systems with dobldobl coeffs +quaddobl_laursys_container : for Laurent systems with quaddobl coeffs +multprec_laursys_container : for Laurent systems with multprec coeffs +ts_syscon : tests the systems container +------------------------------------------------------------------------------ +standard_systems_pool : pool of systems and associated structures +dobldobl_systems_pool : pool of dobldobl complex systems +quaddobl_systems_pool : pool of quaddobl complex systems +ts_syspool : test on the systems pool +------------------------------------------------------------------------------ +standard_solutions_container : management of solution lists +dobldobl_solutions_container : solutions with double doubles +quaddobl_solutions_container : solutions with quad doubles +multprec_solutions_container : multiprecision solutions +ts_solcon : tests the solutions container +------------------------------------------------------------------------------ +solutions_pool : pool of solution lists +ts_solpool : test on the solutions pool +------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/solutions_pool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/solutions_pool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/solutions_pool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/solutions_pool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,212 @@ +package body Solutions_Pool is + +-- INTERNAL DATA : + + size_pool : integer32; + pool_first,pool_last : Link_to_Array_of_Solution_Lists; + +-- CREATORS : + + procedure Initialize ( n : in integer32 ) is + begin + size_pool := n; + pool_first := new Array_of_Solution_Lists(1..n); + pool_last := new Array_of_Solution_Lists(1..n); + end Initialize; + + procedure Initialize ( k : in integer32; sols : in Solution_List ) is + + tmp : Solution_List; + ls : Link_to_Solution; + + begin + if k > 0 and k <= size_pool then + tmp := sols; + while not Is_Null(tmp) loop + ls := Head_Of(tmp); + Append(pool_first(k),pool_last(k),ls.all); + tmp := Tail_Of(tmp); + end loop; + end if; + end Initialize; + +-- SELECTORS : + + function Size return natural32 is + begin + return natural32(size_pool); + end Size; + + function Length ( k : in integer32 ) return natural32 is + begin + if k > size_pool or k < 1 + then return 0; + else return Length_Of(pool_first(k)); + end if; + end Length; + + function Dimension ( k : in integer32 ) return natural32 is + begin + if k > size_pool or k < 1 then + return 0; + elsif Is_Null(pool_first(k)) then + return 0; + else + return natural32(Head_Of(pool_first(k)).n); + end if; + end Dimension; + + function Retrieve ( k : in integer32 ) return Solution_List is + + res : Solution_List; + + begin + if k > 0 and k <= size_pool + then res := pool_first(k); + end if; + return res; + end Retrieve; + + procedure Retrieve ( k : in integer32; i : in natural32; + s : out Solution; fail : out boolean ) is + + tmp : Solution_List; + cnt : natural32 := 0; + ls : Link_to_Solution; + + begin + if k < 1 or k > size_pool then + fail := true; + elsif i > Length_Of(pool_first(k)) then + fail := true; + else + tmp := pool_first(k); + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = i then + fail := false; + ls := Head_Of(tmp); + s := ls.all; + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + end if; + fail := true; + end Retrieve; + + procedure Retrieve ( k : in integer32; i : in natural32; + s : out Link_to_Solution; fail : out boolean ) is + + tmp : Solution_List; + cnt : natural32 := 0; + + begin + if k < 1 or k > size_pool then + fail := true; + elsif i > Length_Of(pool_first(k)) then + fail := true; + else + tmp := pool_first(k); + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = i then + fail := false; + s := Head_Of(tmp); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + end if; + fail := true; + end Retrieve; + + procedure Replace ( k : in integer32; i : in natural32; + s : in Solution; fail : out boolean ) is + + tmp : Solution_List; + cnt : natural32 := 0; + ls : Link_to_Solution; + + begin + if k < 1 or k > size_pool then + fail := true; + elsif i > Length_Of(pool_first(k)) then + fail := true; + else + tmp := pool_first(k); + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = i then + fail := false; + ls := Head_Of(tmp); + ls.t := s.t; ls.m := s.m; ls.v := s.v; + ls.err := s.err; ls.rco := s.rco; ls.res := s.res; + Set_Head(tmp,ls); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + end if; + fail := true; + end Replace; + + procedure Replace ( k : in integer32; i : in natural32; + s : in Link_to_Solution; fail : out boolean ) is + + tmp : Solution_List; + cnt : natural32 := 0; + + begin + if k < 1 or k > size_pool then + fail := true; + elsif i > Length_Of(pool_first(k)) then + fail := true; + else + tmp := pool_first(k); + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = i + then fail := false; Set_Head(tmp,s); return; + else tmp := Tail_Of(tmp); + end if; + end loop; + end if; + fail := true; + end Replace; + + procedure Append ( k : in integer32; s : in Solution ) is + begin + if k > 0 and k <= size_pool + then Append(pool_first(k),pool_last(k),s); + end if; + end Append; + + procedure Append ( k : in integer32; s : in Link_to_Solution ) is + begin + if k > 0 and k <= size_pool + then Append(pool_first(k),pool_last(k),s); + end if; + end Append; + +-- DESTRUCTORS : + + procedure Clear ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + Clear(pool_first(k)); + pool_last(k) := pool_first(k); + end if; + end Clear; + + procedure Clear is + begin + size_pool := 0; + end Clear; + +begin + size_pool := 0; +end Solutions_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/solutions_pool.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/solutions_pool.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/solutions_pool.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/solutions_pool.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,81 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_Solutions; use Standard_Complex_Solutions; + +package Solutions_Pool is + +-- DESCRIPTION : +-- The solutions pool manages several lists of solutions. +-- The design of the pool was modeled after Solutions_Container. + +-- CREATORS : + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the pool for n solution lists. + + procedure Initialize ( k : in integer32; sols : in Solution_List ); + + -- DESCRIPTION : + -- Initializes the k-th solution list with the solutions in sols. + +-- SELECTORS : + + function Size return natural32; + + -- DESCRIPTION : + -- Returns the size of the solutions pool. + + function Length ( k : in integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns the length of the k-th solution list in the pool. + + function Dimension ( k : in integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns the dimension of the k-th solution list in the pool. + + function Retrieve ( k : in integer32 ) return Solution_List; + + -- DESCRIPTION : + -- Returns the k-th solution list in the pool. + + procedure Retrieve ( k : in integer32; i : in natural32; + s : out Solution; fail : out boolean ); + procedure Retrieve ( k : in integer32; i : in natural32; + s : out Link_to_Solution; fail : out boolean ); + + -- DESCRIPTION : + -- Returns in s the i-th solution of the k-th solution list of the pool, + -- fail on return is false if k > Size or i > Length(k). + + procedure Replace ( k : in integer32; i : in natural32; + s : in Solution; fail : out boolean ); + procedure Replace ( k : in integer32; i : in natural32; + s : in Link_to_Solution; fail : out boolean ); + + -- DESCRIPTION : + -- Replaces the i-th solution of the k-th solution list of the pool by s, + -- fail on return is false if k > Size or i > Length(k). + + procedure Append ( k : in integer32; s : in Solution ); + procedure Append ( k : in integer32; s : in Link_to_Solution ); + + -- DESCRIPTION : + -- Appends the solution to the k-th list in the container. + +-- DESTRUCTORS : + + procedure Clear ( k : in integer32 ); + + -- DESCRIPTION : + -- Clears the k-th solution list in the pool. + + procedure Clear; + + -- DESCRIPTION : + -- Clears the entire pool of all solution lists. + +end Solutions_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_laursys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_laursys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_laursys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_laursys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,163 @@ +with Standard_Complex_Numbers; use Standard_Complex_Numbers; +with Standard_Integer_Vectors; use Standard_Integer_Vectors; + +package body Standard_LaurSys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Laur_Sys; + ep : Link_to_Eval_Laur_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ) is + begin + lp := new Laur_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Laur_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Laur_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Integer_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(0.0); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Laur_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Laur_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + + -- NOTE : + -- The "if .. /= null then .." test is a patch + -- because a Clear should never lead to a crash! + + begin + if lp /= null then Clear(lp); end if; + if ep /= null then Clear(ep); end if; + if jm /= null then Clear(jm); end if; + if ej /= null then Clear(ej); end if; + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end Standard_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_laursys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_laursys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_laursys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_laursys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,113 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; +with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; +with Standard_Complex_Laur_SysFun; use Standard_Complex_Laur_SysFun; +with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; + +package Standard_LaurSys_Container is + +-- DESCRIPTION : +-- This package provides a container for a Laurent polynomial system, +-- with coefficients in standard double precision, for the C interface. + +-- CREATORS : + + procedure Initialize ( p : in Laur_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Laur_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Laur_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end Standard_LaurSys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_polysys_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_polysys_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_polysys_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_polysys_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,169 @@ +with Standard_Complex_Numbers; use Standard_Complex_Numbers; +with Standard_Natural_Vectors; + +package body Standard_PolySys_Container is + +-- INTERNAL DATA : + + lp : Link_to_Poly_Sys; + ep : Link_to_Eval_Poly_Sys; + jm : Link_to_Jaco_Mat; + ej : Link_to_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ) is + begin + lp := new Poly_Sys(p'range); + for i in p'range loop + Copy(p(i),lp(i)); + end loop; + end Initialize; + + procedure Initialize ( n : in integer32 ) is + begin + lp := new Poly_Sys'(1..n => Null_Poly); + end Initialize; + + procedure Create_Evaluator is + begin + if lp /= null + then ep := new Eval_Poly_Sys'(Create(lp.all)); + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix is + begin + if lp /= null + then jm := new Jaco_Mat'(Create(lp.all)); + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator is + begin + if jm = null + then Create_Jacobian_Matrix; + end if; + if jm /= null + then ej := new Eval_Jaco_Mat'(Create(jm.all)); + end if; + end Create_Jacobian_Evaluator; + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ) is + begin + Add(lp(k),t); + end Add_Term; + + procedure Add_Poly ( k : in integer32; p : in Poly ) is + begin + Add(lp(k),p); + end Add_Poly; + +-- SELECTORS : + + function Dimension return natural32 is + begin + if lp = null + then return 0; + else return natural32(lp'last); + end if; + end Dimension; + + function Degree ( k : integer32 ) return integer32 is + begin + if lp = null then + return -1; + elsif lp(k) = Null_Poly then + return -1; + else + return Degree(lp(k)); + end if; + end Degree; + + function Number_of_Terms ( k : integer32 ) return natural32 is + begin + if lp = null + then return 0; + else return Number_of_Terms(lp(k)); + end if; + end Number_of_Terms; + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term is + + res : Term; + cnt : natural32 := 0; + + procedure Find_Term ( t : in Term; continue : out boolean ) is + begin + cnt := cnt + 1; + if cnt = i then + res.cf := t.cf; + res.dg := new Standard_Natural_Vectors.Vector'(t.dg.all); + continue := false; + else + continue := true; + end if; + end Find_Term; + procedure Scan_Terms is new Visiting_Iterator(Find_Term); + + begin + res.cf := Create(0.0); + if lp = null then + return res; + elsif i = 0 or i > Number_of_Terms(k) then + return res; + else + Scan_Terms(lp(k)); + end if; + return res; + end Retrieve_Term; + + function Retrieve_Poly ( k : integer32 ) return Poly is + begin + if lp = null then + return Null_Poly; + elsif k = 0 or k > lp'last then + return Null_Poly; + else + return lp(k); + end if; + end Retrieve_Poly; + + function Retrieve return Link_to_Poly_Sys is + begin + return lp; + end Retrieve; + + function Evaluator return Link_to_Eval_Poly_Sys is + begin + return ep; + end Evaluator; + + function Jacobian_Matrix return Link_to_Jaco_Mat is + begin + return jm; + end Jacobian_Matrix; + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat is + begin + return ej; + end Jacobian_Evaluator; + +-- DESTRUCTOR : + + procedure Clear is + begin + Clear(lp); + Clear(ep); + Clear(jm); + Clear(ej); + end Clear; + +begin + lp := null; + ep := null; + jm := null; + ej := null; +end Standard_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_polysys_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_polysys_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_polysys_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_polysys_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,120 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; +with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; +with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; +with Standard_Complex_Jaco_Matrices; use Standard_Complex_Jaco_Matrices; + +package Standard_PolySys_Container is + +-- DESCRIPTION : +-- This package provides a container for a polynomial system, +-- designed for the interface with C. + +-- CREATORS : + + procedure Initialize ( p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the container with a polynomial system. + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Initializes the container with space to hold a system + -- of dimension n. + + procedure Create_Evaluator; + + -- DESCRIPTION : + -- An evaluator is created for the system in the container. + + procedure Create_Jacobian_Matrix; + + -- DESCRIPTION : + -- Creates the Jacobian matrix for the system in the container. + + procedure Create_Jacobian_Evaluator; + + -- DESCRIPTION : + -- Creates an evaluator for the Jacobian matrix in the container. + +-- CONSTRUCTORS : + + procedure Add_Term ( k : in integer32; t : in Term ); + + -- DESCRIPTION : + -- Adds the term t to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + + procedure Add_Poly ( k : in integer32; p : in Poly ); + + -- DESCRIPTION : + -- Adds the polynomial p to the k-th polynomial in the system. + + -- REQUIRED : Dimension >= k > 0. + +-- SELECTORS : + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns the number of polynomials in the system, + -- zero if the system is empty. + + function Degree ( k : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns -1 if there is no k-th polynomial, + -- otherwise returns the degree of the k-th polynomial + -- stored in the system container. + + function Number_of_Terms ( k : integer32 ) return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- number of terms in the k-th polynomial is returned. + + function Retrieve_Term ( k : integer32; i : natural32 ) return Term; + + -- DESCRIPTION : + -- Returns the i-th term of the k-th polynomial, + -- if i <= Number_of_Terms(k), otherwise the term + -- on return has a zero coefficient. + + function Retrieve_Poly ( k : integer32 ) return Poly; + + -- DESCRIPTION : + -- Returns the k-th polynomial in the system. + + function Retrieve return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Returns the polynomial system stored by the container. + + function Evaluator return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Returns the evaluator for the polynomial system + -- stored in the container. + + function Jacobian_Matrix return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the Jacobian matrix for the polynomial system + -- stored in the container. + + function Jacobian_Evaluator return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Returns the evaluator for the Jacobian matrix. + +-- DESTRUCTOR : + + procedure Clear; + + -- DESCRIPTION : + -- Clears the container: its polynomial system and evaluator. + +end Standard_PolySys_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_solutions_container.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_solutions_container.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_solutions_container.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_solutions_container.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,240 @@ +package body Standard_Solutions_Container is + +-- INTERNAL DATA : + + first,last,current : Solution_List; + ls1,ls2,solsym : Symbol_Table.Link_to_Array_of_Symbols; + cursor : natural32 := 0; -- index to the current solution + +-- OPERATIONS : + + procedure Initialize ( sols : in Solution_List ) is + + tmp : Solution_List := sols; + + begin + for i in 1..Length_Of(sols) loop + Append(first,last,Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + current := first; + cursor := 1; + end Initialize; + + function Length return natural32 is + begin + return Length_Of(first); + end Length; + + function Dimension return natural32 is + begin + if Is_Null(first) + then return 0; + else return natural32(Head_Of(first).n); + end if; + end Dimension; + + function Retrieve return Solution_List is + begin + return first; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ) is + + ls : Link_to_Solution; + + begin + Retrieve(k,ls,fail); + if not fail + then s := ls.all; + end if; + end Retrieve; + + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + s := Head_Of(tmp); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Retrieve; + + procedure Retrieve_Next_Initialize is + begin + current := first; + if Is_Null(current) + then cursor := 0; -- empty solution list + else cursor := 1; -- index to the first solution + end if; + end Retrieve_Next_Initialize; + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + current := Tail_Of(current); + cursor := cursor + 1; + end if; + end Retrieve_Next; + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + s := Head_Of(current); + k := cursor; + end if; + end Retrieve_Current; + + procedure Move_Current ( k : out natural32 ) is + begin + if Is_Null(current) then + k := 0; + else + current := Tail_Of(current); + if Is_Null(current) + then cursor := 0; + else cursor := cursor + 1; + end if; + k := cursor; + end if; + end Move_Current; + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + ls : Link_to_Solution; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + ls := Head_Of(tmp); + ls.t := s.t; + ls.m := s.m; + ls.v := s.v; + ls.err := s.err; + ls.rco := s.rco; + ls.res := s.res; + Set_Head(tmp,ls); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ) is + + tmp : Solution_List := first; + cnt : natural32 := 0; + + begin + while not Is_Null(tmp) loop + cnt := cnt + 1; + if cnt = k then + fail := false; + Set_Head(tmp,s); + return; + else + tmp := Tail_Of(tmp); + end if; + end loop; + fail := true; + end Replace; + + procedure Append ( s : in Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Append ( s : in Link_to_Solution ) is + begin + if Is_Null(first) then + Append(first,last,s); + current := first; + cursor := 1; + else + Append(first,last,s); + end if; + end Append; + + procedure Clear is + begin + Clear(first); + last := first; + current := first; + cursor := 0; + end Clear; + +-- Management of two symbol tables for diagonal homotopies : + + procedure Store_Symbol_Table + ( k : in natural32; sbs : Symbol_Table.Array_of_Symbols ) is + begin + if k = 0 then + solsym := new Symbol_Table.Array_of_Symbols'(sbs); + elsif k = 1 then + ls1 := new Symbol_Table.Array_of_Symbols'(sbs); + elsif k = 2 then + ls2 := new Symbol_Table.Array_of_Symbols'(sbs); + end if; + end Store_Symbol_Table; + + function Retrieve_Symbol_Table + ( k : in natural32 ) + return Symbol_Table.Link_to_Array_of_Symbols is + + res : Symbol_Table.Link_to_Array_of_Symbols := null; + + begin + if k = 0 then + return solsym; + elsif k = 1 then + return ls1; + elsif k = 2 then + return ls2; + else + return res; + end if; + end Retrieve_Symbol_Table; + + procedure Clear_Symbol_Table ( k : in natural32 ) is + begin + if k = 0 then + Symbol_Table.Clear(solsym); + elsif k = 1 then + Symbol_Table.Clear(ls1); + elsif k = 2 then + Symbol_Table.Clear(ls2); + end if; + end Clear_Symbol_Table; + +end Standard_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_solutions_container.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_solutions_container.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_solutions_container.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_solutions_container.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,114 @@ +with text_io; use text_io; +with Symbol_Table; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Complex_Solutions; use Standard_Complex_Solutions; + +package Standard_Solutions_Container is + +-- DESCRIPTION : +-- This package provides a container for a solution list, +-- designed for the interface with C. + + procedure Initialize ( sols : in Solution_List ); + + -- DESCRIPTION : + -- Initializes the container with a solution list. + + function Length return natural32; + + -- DESCRIPTION : + -- Returns the number of solutions in the container. + + function Dimension return natural32; + + -- DESCRIPTION : + -- Returns 0 if the container is empty, otherwise the + -- dimension of the solution vectors is returned. + + function Retrieve return Solution_List; + + -- DESCRIPTION : + -- Returns the lists of solutions stored in the container. + + procedure Retrieve ( k : in natural32; s : out Solution; + fail : out boolean ); + procedure Retrieve ( k : in natural32; s : out Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to retrieve the k-th solution in s. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Retrieve_Next_Initialize; + + -- DESCRIPTION : + -- Resets the current pointer to the first solution in the container. + + procedure Retrieve_Next ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the next solution, where the current pointer is, + -- and returns in k the index of the solution in the list. + -- If k > 0, then s contains the pointer to the current solutioni + -- and the current pointer is moved to the next solution. + -- Otherwise, if the current pointer is null, then k on return is 0. + + procedure Retrieve_Current ( s : out Link_to_Solution; k : out natural32 ); + + -- DESCRIPTION : + -- Retrieves the current solution without advancing the pointer to + -- the current solution. If the pointer refers to a valid solution, + -- then k is the solution number on return, otherwise, k = 0. + + procedure Move_Current ( k : out natural32 ); + + -- DESCRIPTION : + -- Moves the pointer to the current solution to the next solution. + -- If the pointer is currently null or if there is no next solution, + -- then k will be zero on return. Otherwise, k will equal the + -- value of the cursor, the number of the current solution. + + procedure Replace ( k : in natural32; s : in Solution; + fail : out boolean ); + procedure Replace ( k : in natural32; s : in Link_to_Solution; + fail : out boolean ); + -- DESCRIPTION : + -- Attemps to replace the k-th solution with the given one. + -- Reports failure (fail = true) if there are fewer than k + -- solutions in the container. + + procedure Append ( s : in Solution ); + procedure Append ( s : in Link_to_Solution ); + + -- DESCRIPTION : + -- Appends the solution to the container. + + procedure Clear; + + -- DESCRIPTION : + -- Clears the solutions in the container. + +-- Management of two symbol tables for diagonal homotopies : + + procedure Store_Symbol_Table + ( k : in natural32; sbs : Symbol_Table.Array_of_Symbols ); + + -- DESCRIPTION : + -- Stores the symbol table for the k-th witness set, k must be 1 or 2. + -- The k = 0 can be used for a common symbol table for reading the + -- solutions in the witness sets from file. + + function Retrieve_Symbol_Table + ( k : in natural32 ) return Symbol_Table.Link_to_Array_of_Symbols; + + -- DESCRIPTION : + -- Returns the symbol table for the k-th witness set, k must be 1 or 2. + -- With k = 0, one obtains the common symbol table to read solutions. + + procedure Clear_Symbol_Table ( k : in natural32 ); + + -- DESCRIPTION : + -- Clears the symbol table for the k-th witness set, if k = 1 or 2; + -- or, in case k = 0, then the common solution symbol table is cleared. + +end Standard_Solutions_Container; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_systems_pool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_systems_pool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_systems_pool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_systems_pool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,204 @@ +with unchecked_deallocation; +with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; + +package body Standard_Systems_Pool is + +-- DATA STRUCTURES : + + type Link_to_Array_of_Eval_Poly_Sys is access Array_of_Eval_Poly_Sys; + type Link_to_Array_of_Jaco_Mat is access Array_of_Jaco_Mat; + type Link_to_Array_of_Eval_Jaco_Mat is access Array_of_Eval_Jaco_Mat; + +-- INTERNAL DATA : + + size_pool : integer32; + sp : Link_to_Array_of_Poly_Sys; + ep : Link_to_Array_of_Eval_Poly_Sys; + jm : Link_to_Array_of_Jaco_Mat; + jf : Link_to_Array_of_Eval_Jaco_Mat; + +-- CREATORS : + + procedure Initialize ( n : in integer32 ) is + begin + size_pool := n; + sp := new Array_of_Poly_Sys(1..n); + ep := new Array_of_Eval_Poly_Sys(1..n); + jm := new Array_of_Jaco_Mat(1..n); + jf := new Array_of_Eval_Jaco_Mat(1..n); + end Initialize; + + procedure Initialize ( k : in integer32; p : in Poly_Sys ) is + begin + if k > 0 and k <= size_pool then + declare + q : Poly_Sys(p'range); + begin + Copy(p,q); + sp(k) := new Poly_Sys'(q); + end; + end if; + end Initialize; + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ) is + begin + Initialize(k,p); + Create_Evaluator(k); + Create_Jacobian_Matrix(k); + Create_Jacobian_Evaluator(k); + end Create; + + procedure Create_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + f : constant Eval_Poly_Sys(p'range) := Create(p.all); + begin + ep(k) := new Eval_Poly_Sys'(f); + end; + end if; + end Create_Evaluator; + + procedure Create_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + p : constant Link_to_Poly_Sys := sp(k); + nv : constant integer32 := integer32(Number_of_Unknowns(p(p'first))); + m : constant Jaco_Mat(p'range,1..nv) := Create(p.all); + begin + jm(k) := new Jaco_Mat'(m); + end; + end if; + end Create_Jacobian_Matrix; + + procedure Create_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool then + declare + m : constant Link_to_Jaco_Mat := jm(k); + f : constant Eval_Jaco_Mat(m'range(1),m'range(2)) := Create(m.all); + begin + jf(k) := new Eval_Jaco_Mat'(f); + end; + end if; + end Create_Jacobian_Evaluator; + +-- SELECTORS : + + function Size return natural32 is + begin + return natural32(size_pool); + end Size; + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys is + + res : Link_to_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := sp(k); + end if; + return res; + end Retrieve; + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys is + + res : Link_to_Eval_Poly_Sys := null; + + begin + if k > 0 and k <= size_pool + then res := ep(k); + end if; + return res; + end Evaluator; + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat is + + res : Link_to_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jm(k); + end if; + return res; + end Jacobian_Matrix; + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat is + + res : Link_to_Eval_Jaco_Mat := null; + + begin + if k > 0 and k <= size_pool + then res := jf(k); + end if; + return res; + end Jacobian_Evaluator; + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then Standard_Complex_Poly_Systems.Clear(sp(k)); + end if; + end Clear_System; + + procedure Clear_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then Standard_Complex_Poly_SysFun.Clear(ep(k)); + end if; + end Clear_Evaluator; + + procedure Clear_Jacobian_Matrix ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then Standard_Complex_Jaco_Matrices.Clear(jm(k)); + end if; + end Clear_Jacobian_Matrix; + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ) is + begin + if k > 0 and k <= size_pool + then Standard_Complex_Jaco_Matrices.Clear(jf(k)); + end if; + end Clear_Jacobian_Evaluator; + + procedure Clear ( k : in integer32 ) is + begin + Clear_System(k); + Clear_Evaluator(k); + Clear_Jacobian_Matrix(k); + Clear_Jacobian_Evaluator(k); + end Clear; + + procedure Clear is + + procedure free is + new unchecked_deallocation(Array_of_Poly_Sys,Link_to_Array_of_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Eval_Poly_Sys, + Link_to_Array_of_Eval_Poly_Sys); + procedure free is + new unchecked_deallocation(Array_of_Jaco_Mat,Link_to_Array_of_Jaco_Mat); + procedure free is + new unchecked_deallocation(Array_of_Eval_Jaco_Mat, + Link_to_Array_of_Eval_Jaco_Mat); + + begin + if size_pool > 0 then + for k in 1..size_pool loop + Clear(k); + end loop; + end if; + free(sp); free(ep); free(jm); free(jf); + size_pool := 0; + end Clear; + +begin + size_pool := 0; +end Standard_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_systems_pool.ads phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_systems_pool.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/standard_systems_pool.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/standard_systems_pool.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,115 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; +with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; +with Standard_Complex_Jaco_Matrices; use Standard_Complex_Jaco_Matrices; + +package Standard_Systems_Pool is + +-- DESCRIPTION : +-- Provides storage facility for multiple polynomial systems. +-- For each system we store four different data structures: +-- (1) a system is an array of polynomials, as lists of terms; +-- (2) an evaluator is an array of nester Horner schemes; +-- (3) the Jacobian matrix as matrix of polynomials; +-- (4) the Jacobian evaluator is a matrix of evaluators. +-- This package is modeled after the package Systems_Container. + +-- CREATORS : + + procedure Initialize ( n : in integer32 ); + + -- DESCRIPTION : + -- Allocates memory to store n systems in the pool. + + procedure Initialize ( k : in integer32; p : in Poly_Sys ); + + -- DESCRIPTION : + -- Initializes the k-th system in the pool with p, + -- making a deep copy of the complete data structure for p. + +-- CONSTRUCTORS : + + procedure Create ( k : in integer32; p : in Poly_Sys ); + + -- DESCRITPION : + -- Initializes the k-th systems in the pool with p + -- and creates an evaluator, a Jacobian matrix, and + -- a Jacobian matrix for the system. + + procedure Create_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates an evaluator for the k-th system in the pool. + + procedure Create_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian matrix for the k-th system in the pool. + + procedure Create_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Creates a Jacobian evaluator for the k-th system in the pool. + +-- SELECTORS : + + function Size return natural32; + + -- DESCRIPTION : + -- Returns the size of the systems pool. + + function Retrieve ( k : integer32 ) return Link_to_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th system stored in the pool. + + function Evaluator ( k : integer32 ) return Link_to_Eval_Poly_Sys; + + -- DESCRIPTION : + -- Retrieves the k-th evaluator stored in the pool. + + function Jacobian_Matrix ( k : integer32 ) return Link_to_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian matrix stored in the pool. + + function Jacobian_Evaluator ( k : integer32 ) return Link_to_Eval_Jaco_Mat; + + -- DESCRIPTION : + -- Retrieves the k-th Jacobian evaluator stored in the pool. + +-- DESTRUCTORS : + + procedure Clear_System ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th system in the pool. + + procedure Clear_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th evaluator in the pool. + + procedure Clear_Jacobian_Matrix ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian matrix in the pool. + + procedure Clear_Jacobian_Evaluator ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of the k-th Jacobian evaluator in the pool. + + procedure Clear ( k : in integer32 ); + + -- DESCRIPTION : + -- Deallocation of all four data structures for + -- the k-th system in the pool. + + procedure Clear; + + -- DESCRIPTION : + -- Deallocation of all memory for the n systems. + +end Standard_Systems_Pool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/structures.gpr phcpack-2.4.85/src/Ada/CtoPHC/Structures/structures.gpr --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/structures.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/structures.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,49 @@ +project structures is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Circuits", "../../Math_Lib/Supports", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../Types"); + for Languages use ("Ada", "C"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../Types"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_filman.adb", -- tests encapsulation of type_type variables + "ts_syscon.adb", -- tests system containers + "ts_syspool.adb", -- tests systems pool + "ts_solcon.adb", -- tests solutions containers + "ts_solpool.adb" -- tests pool of solution lists + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end structures; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_filman.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_filman.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_filman.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_filman.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,19 @@ +with text_io; use text_io; +with File_Management; + +procedure ts_filman is + +-- DESCRIPTION : +-- Test on management of file_type objects. + + c : character; + +begin + new_line; + File_Management.Create_Output_File; + put_line(File_Management.Link_to_Output.all,"hello world!"); + File_Management.Close_Output_File; + File_Management.Open_Input_File; + get(File_Management.Link_to_Input.all,c); + put_line("The first character on the file : " & c); +end ts_filman; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_solcon.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_solcon.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_solcon.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_solcon.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,293 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Complex_Solutions; +with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; +with DoblDobl_Complex_Solutions; +with DoblDobl_Complex_Solutions_io; use DoblDobl_Complex_Solutions_io; +with QuadDobl_Complex_Solutions; +with QuadDobl_Complex_Solutions_io; use QuadDobl_Complex_Solutions_io; +with Multprec_Complex_Solutions; +with Multprec_Complex_Solutions_io; use Multprec_Complex_Solutions_io; +with Standard_Solutions_Container; +with DoblDobl_Solutions_Container; +with QuadDobl_Solutions_Container; +with Multprec_Solutions_Container; + +procedure ts_solcon is + +-- DESCRIPTION : +-- This procedure is an interactive test on the operations +-- in the solution container. + + procedure Standard_Test_Retrievals is + + -- DESRIPTION : + -- Test the retrieval of the solutions in the container. + + use Standard_Complex_Solutions; + + fail : boolean; + ind : natural32 := 0; + ls : Link_to_Solution; + + begin + new_line; + put_line("Testing the retrieval of solutions..."); + new_line; + put("Number of solutions in the container : "); + put(Standard_Solutions_Container.Length,1); new_line; + put("Dimension of solution vectors : "); + put(Standard_Solutions_Container.Dimension,1); new_line; + loop + ind := ind + 1; + Standard_Solutions_Container.Retrieve(ind,ls,fail); + exit when fail; + put("Solution "); put(ind,1); put_line(" :"); + put(ls.all); new_line; + end loop; + end Standard_Test_Retrievals; + + procedure DoblDobl_Test_Retrievals is + + -- DESRIPTION : + -- Test the retrieval of the solutions in the container. + + use DoblDobl_Complex_Solutions; + + fail : boolean; + ind : natural32 := 0; + ls : Link_to_Solution; + + begin + new_line; + put_line("Testing the retrieval of solutions..."); + new_line; + put("Number of solutions in the container : "); + put(DoblDobl_Solutions_Container.Length,1); new_line; + put("Dimension of solution vectors : "); + put(DoblDobl_Solutions_Container.Dimension,1); new_line; + loop + ind := ind + 1; + DoblDobl_Solutions_Container.Retrieve(ind,ls,fail); + exit when fail; + put("Solution "); put(ind,1); put_line(" :"); + put(ls.all); new_line; + end loop; + end DoblDobl_Test_Retrievals; + + procedure QuadDobl_Test_Retrievals is + + -- DESRIPTION : + -- Test the retrieval of the solutions in the container. + + use QuadDobl_Complex_Solutions; + + fail : boolean; + ind : natural32 := 0; + ls : Link_to_Solution; + + begin + new_line; + put_line("Testing the retrieval of solutions..."); + new_line; + put("Number of solutions in the container : "); + put(QuadDobl_Solutions_Container.Length,1); new_line; + put("Dimension of solution vectors : "); + put(QuadDobl_Solutions_Container.Dimension,1); new_line; + loop + ind := ind + 1; + QuadDobl_Solutions_Container.Retrieve(ind,ls,fail); + exit when fail; + put("Solution "); put(ind,1); put_line(" :"); + put(ls.all); new_line; + end loop; + end QuadDobl_Test_Retrievals; + + procedure Multprec_Test_Retrievals is + + -- DESRIPTION : + -- Test the retrieval of the solutions in the container. + + use Multprec_Complex_Solutions; + + fail : boolean; + ind : natural32 := 0; + ls : Link_to_Solution; + + begin + new_line; + put_line("Testing the retrieval of solutions..."); + new_line; + put("Number of solutions in the container : "); + put(Multprec_Solutions_Container.Length,1); new_line; + put("Dimension of solution vectors : "); + put(Multprec_Solutions_Container.Dimension,1); new_line; + loop + ind := ind + 1; + Multprec_Solutions_Container.Retrieve(ind,ls,fail); + exit when fail; + put("Solution "); put(ind,1); put_line(" :"); + put(ls.all); new_line; + end loop; + end Multprec_Test_Retrievals; + + procedure Standard_Test_Additions + ( sols : in Standard_Complex_Solutions.Solution_List ) is + + -- DESCRIPTION : + -- Tests the constructors of the container. + + use Standard_Complex_Solutions; + + tmp,retrieved : Solution_List; + + begin + new_line; + put_line("Testing the addition of solutions..."); + new_line; + tmp := sols; + while not Is_Null(tmp) loop + Standard_Solutions_Container.Append(Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + retrieved := Standard_Solutions_Container.Retrieve; + put_line("The retrieved solution list :"); + if not Is_Null(retrieved) + then put(Standard_Output, + Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); + end if; + end Standard_Test_Additions; + + procedure DoblDobl_Test_Additions + ( sols : in DoblDobl_Complex_Solutions.Solution_List ) is + + -- DESCRIPTION : + -- Tests the constructors of the container. + + use DoblDobl_Complex_Solutions; + + tmp,retrieved : Solution_List; + + begin + new_line; + put_line("Testing the addition of solutions..."); + new_line; + tmp := sols; + while not Is_Null(tmp) loop + DoblDobl_Solutions_Container.Append(Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + retrieved := DoblDobl_Solutions_Container.Retrieve; + put_line("The retrieved solution list :"); + if not Is_Null(retrieved) + then put(Standard_Output, + Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); + end if; + end DoblDobl_Test_Additions; + + procedure QuadDobl_Test_Additions + ( sols : in QuadDobl_Complex_Solutions.Solution_List ) is + + -- DESCRIPTION : + -- Tests the constructors of the container. + + use QuadDobl_Complex_Solutions; + + tmp,retrieved : Solution_List; + + begin + new_line; + put_line("Testing the addition of solutions..."); + new_line; + tmp := sols; + while not Is_Null(tmp) loop + QuadDobl_Solutions_Container.Append(Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + retrieved := QuadDobl_Solutions_Container.Retrieve; + put_line("The retrieved solution list :"); + if not Is_Null(retrieved) + then put(Standard_Output, + Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); + end if; + end QuadDobl_Test_Additions; + + procedure Multprec_Test_Additions + ( sols : in Multprec_Complex_Solutions.Solution_List ) is + + -- DESCRIPTION : + -- Tests the constructors of the container. + + use Multprec_Complex_Solutions; + + tmp,retrieved : Solution_List; + + begin + new_line; + put_line("Testing the addition of solutions..."); + new_line; + tmp := sols; + while not Is_Null(tmp) loop + Multprec_Solutions_Container.Append(Head_Of(tmp).all); + tmp := Tail_Of(tmp); + end loop; + retrieved := Multprec_Solutions_Container.Retrieve; + put_line("The retrieved solution list :"); + if not Is_Null(retrieved) + then put(Standard_Output, + Length_Of(retrieved),natural32(Head_Of(retrieved).n),retrieved); + end if; + end Multprec_Test_Additions; + + procedure Main is + + st_sols : Standard_Complex_Solutions.Solution_List; + dd_sols : DoblDobl_Complex_Solutions.Solution_List; + qd_sols : QuadDobl_Complex_Solutions.Solution_List; + mp_sols : Multprec_Complex_Solutions.Solution_List; + ans : character; + + begin + new_line; + put_line("MENU to test the operations in the solutions container :"); + put_line(" 1. test with standard double complex numbers;"); + put_line(" 2. test with double double complex numbers;"); + put_line(" 3. test with quad double complex numbers;"); + put_line(" 4. test with multiprecision complex numbers."); + put("Type 1, 2, 3, or 4 to select the precision : "); + Ask_Alternative(ans,"1234"); + new_line; + case ans is + when '1' => + Read(st_sols); + Standard_Solutions_Container.Initialize(st_sols); + Standard_Test_Retrievals; + Standard_Solutions_Container.Clear; + Standard_Test_Additions(st_sols); + when '2' => + Read(dd_sols); + DoblDobl_Solutions_Container.Initialize(dd_sols); + DoblDobl_Test_Retrievals; + DoblDobl_Solutions_Container.Clear; + DoblDobl_Test_Additions(dd_sols); + when '3' => + Read(qd_sols); + QuadDobl_Solutions_Container.Initialize(qd_sols); + QuadDobl_Test_Retrievals; + QuadDobl_Solutions_Container.Clear; + QuadDobl_Test_Additions(qd_sols); + when '4' => + Read(mp_sols); + Multprec_Solutions_Container.Initialize(mp_sols); + Multprec_Test_Retrievals; + Multprec_Solutions_Container.Clear; + Multprec_Test_Additions(mp_sols); + when others => null; + end case; + end Main; + +begin + Main; +end ts_solcon; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_solpool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_solpool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_solpool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_solpool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,23 @@ +with text_io; use text_io; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Solutions; use Standard_Complex_Solutions; +with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; +with Solutions_Pool; + +procedure ts_solpool is + + n : integer32 := 0; + +begin + new_line; + put_line("Testing the operations in the solutions pool..."); + new_line; + put("-> The size of the solutions pool : "); + put(Solutions_Pool.Size,1); new_line; + put("Give the number of solution lists : "); get(n); + Solutions_Pool.Initialize(n); + put("-> The size of the solutions pool : "); + put(Solutions_Pool.Size,1); new_line; +end ts_solpool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_syscon.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_syscon.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_syscon.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_syscon.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,631 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Polynomials; +with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; +with Standard_Complex_Poly_Systems; +with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; +with Standard_Complex_Laurentials; +with Standard_Complex_Laurentials_io; use Standard_Complex_Laurentials_io; +with Standard_Complex_Laur_Systems; +with Standard_Complex_Laur_Systems_io; use Standard_Complex_Laur_Systems_io; +with DoblDobl_Complex_Polynomials; +with DoblDobl_Complex_Polynomials_io; use DoblDobl_Complex_Polynomials_io; +with DoblDobl_Complex_Poly_Systems; +with DoblDobl_Complex_Poly_Systems_io; use DoblDobl_Complex_Poly_Systems_io; +with DoblDobl_Complex_Laurentials; +with DoblDobl_Complex_Laurentials_io; use DoblDobl_Complex_Laurentials_io; +with DoblDobl_Complex_Laur_Systems; +with DoblDobl_Complex_Laur_Systems_io; use DoblDobl_Complex_Laur_Systems_io; +with QuadDobl_Complex_Polynomials; +with QuadDobl_Complex_Polynomials_io; use QuadDobl_Complex_Polynomials_io; +with QuadDobl_Complex_Poly_Systems; +with QuadDobl_Complex_Poly_Systems_io; use QuadDobl_Complex_Poly_Systems_io; +with QuadDobl_Complex_Laurentials; +with QuadDobl_Complex_Laurentials_io; use QuadDobl_Complex_Laurentials_io; +with QuadDobl_Complex_Laur_Systems; +with QuadDobl_Complex_Laur_Systems_io; use QuadDobl_Complex_Laur_Systems_io; +with Multprec_Complex_Polynomials; +with Multprec_Complex_Polynomials_io; use Multprec_Complex_Polynomials_io; +with Multprec_Complex_Poly_Systems; +with Multprec_Complex_Poly_Systems_io; use Multprec_Complex_Poly_Systems_io; +with Multprec_Complex_Laurentials; +with Multprec_Complex_Laurentials_io; use Multprec_Complex_Laurentials_io; +with Multprec_Complex_Laur_Systems; +with Multprec_Complex_Laur_Systems_io; use Multprec_Complex_Laur_Systems_io; +with Standard_PolySys_Container; +with DoblDobl_PolySys_Container; +with QuadDobl_PolySys_Container; +with Multprec_PolySys_Container; +with Standard_LaurSys_Container; +with DoblDobl_LaurSys_Container; +with QuadDobl_LaurSys_Container; +with Multprec_LaurSys_Container; + +procedure ts_syscon is + +-- DESCRIPTION : +-- This procedure is an interactive testing facility on the +-- operations in the package systems container. + + procedure Standard_Test_Retrievals is + + -- DESCRIPTION : + -- Tests the selectors in the package. + + use Standard_Complex_Polynomials; + + n : constant natural32 := Standard_PolySys_Container.Dimension; + m : natural32; + + begin + put("Dimension of the system : "); put(n,1); new_line; + for i in 1..integer32(n) loop + m := Standard_PolySys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := Standard_PolySys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(Standard_PolySys_Container.Retrieve(i)); new_line; + end; + end loop; + end Standard_Test_Retrievals; + + procedure DoblDobl_Test_Retrievals is + + -- DESCRIPTION : + -- Tests the selectors in the package. + + use DoblDobl_Complex_Polynomials; + + n : constant natural32 := DoblDobl_PolySys_Container.Dimension; + m : natural32; + + begin + put("Dimension of the system : "); put(n,1); new_line; + for i in 1..integer32(n) loop + m := DoblDobl_PolySys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := DoblDobl_PolySys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(DoblDobl_PolySys_Container.Retrieve(i)); new_line; + end; + end loop; + end DoblDobl_Test_Retrievals; + + procedure QuadDobl_Test_Retrievals is + + -- DESCRIPTION : + -- Tests the selectors in the package. + + use QuadDobl_Complex_Polynomials; + + n : constant natural32 := QuadDobl_PolySys_Container.Dimension; + m : natural32; + + begin + put("Dimension of the system : "); put(n,1); new_line; + for i in 1..integer32(n) loop + m := QuadDobl_PolySys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := QuadDobl_PolySys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(QuadDobl_PolySys_Container.Retrieve(i)); new_line; + end; + end loop; + end QuadDobl_Test_Retrievals; + + procedure Multprec_Test_Retrievals is + + -- DESCRIPTION : + -- Tests the selectors in the package. + + use Multprec_Complex_Polynomials; + + n : constant natural32 := Multprec_PolySys_Container.Dimension; + m : natural32; + + begin + put("Dimension of the system : "); put(n,1); new_line; + for i in 1..integer32(n) loop + m := Multprec_PolySys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := Multprec_PolySys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(Multprec_PolySys_Container.Retrieve(i)); new_line; + end; + end loop; + end Multprec_Test_Retrievals; + + procedure Standard_Test_Laurent_Retrievals is + + -- DESCRIPTION : + -- Test on retrieving data from the Laurent system container, + -- for coefficients in standard double precision. + + use Standard_Complex_Laurentials; + + n : constant natural32 := Standard_LaurSys_Container.Dimension; + m : natural32; + -- lp : Standard_Complex_Laur_Systems.Link_to_Laur_Sys; + + begin + put("Dimension of the system : "); put(n,1); new_line; + -- lp := Standard_LaurSys_Container.Retrieve; + -- put_line("The Laurent polynomial system : "); put(lp.all); + for i in 1..integer32(n) loop + m := Standard_LaurSys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := Standard_LaurSys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(Standard_LaurSys_Container.Retrieve(i)); new_line; + end; + end loop; + end Standard_Test_Laurent_Retrievals; + + procedure DoblDobl_Test_Laurent_Retrievals is + + -- DESCRIPTION : + -- Test on retrieving data from the Laurent system container, + -- for coefficients in double double precision. + + use DoblDobl_Complex_Laurentials; + + n : constant natural32 := DoblDobl_LaurSys_Container.Dimension; + m : natural32; + -- lp : DoblDobl_Complex_Laur_Systems.Link_to_Laur_Sys; + + begin + put("Dimension of the system : "); put(n,1); new_line; + -- lp := DoblDobl_LaurSys_Container.Retrieve; + -- put_line("The Laurent polynomial system : "); put(lp.all); + for i in 1..integer32(n) loop + m := DoblDobl_LaurSys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := DoblDobl_LaurSys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(DoblDobl_LaurSys_Container.Retrieve(i)); new_line; + end; + end loop; + end DoblDobl_Test_Laurent_Retrievals; + + procedure QuadDobl_Test_Laurent_Retrievals is + + -- DESCRIPTION : + -- Test on retrieving data from the Laurent system container, + -- for coefficients in double double precision. + + use QuadDobl_Complex_Laurentials; + + n : constant natural32 := QuadDobl_LaurSys_Container.Dimension; + m : natural32; + -- lp : QuadDobl_Complex_Laur_Systems.Link_to_Laur_Sys; + + begin + put("Dimension of the system : "); put(n,1); new_line; + -- lp := QuadDobl_LaurSys_Container.Retrieve; + -- put_line("The Laurent polynomial system : "); put(lp.all); + for i in 1..integer32(n) loop + m := QuadDobl_LaurSys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := QuadDobl_LaurSys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(QuadDobl_LaurSys_Container.Retrieve(i)); new_line; + end; + end loop; + end QuadDobl_Test_Laurent_Retrievals; + + procedure Multprec_Test_Laurent_Retrievals is + + -- DESCRIPTION : + -- Test on retrieving data from the Laurent system container, + -- for multiprecision complex coefficients. + + use Multprec_Complex_Laurentials; + + n : constant natural32 := Multprec_LaurSys_Container.Dimension; + m : natural32; + -- lp : Multprec_Complex_Laur_Systems.Link_to_Laur_Sys; + + begin + put("Dimension of the system : "); put(n,1); new_line; + -- lp := Multprec_LaurSys_Container.Retrieve; + -- put_line("The Laurent polynomial system : "); put(lp.all); + for i in 1..integer32(n) loop + m := Multprec_LaurSys_Container.Number_of_Terms(i); + put("Number of terms in polynomial "); put(i,1); + put(" : "); put(m,1); new_line; + declare + p : Poly := Null_Poly; + begin + for j in 1..m loop + declare + t : Term := Multprec_LaurSys_Container.Retrieve_Term(i,j); + begin + Add(p,t); + Clear(t); + end; + end loop; + put(p); new_line; + put(Multprec_LaurSys_Container.Retrieve(i)); new_line; + end; + end loop; + end Multprec_Test_Laurent_Retrievals; + + procedure Standard_Test_Additions + ( p : in Standard_Complex_Poly_Systems.Poly_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the standard double polynomial container. + + use Standard_Complex_Polynomials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + Standard_PolySys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + Standard_PolySys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The polynomial system : "); + put(Standard_PolySys_Container.Retrieve.all); + end Standard_Test_Additions; + + procedure DoblDobl_Test_Additions + ( p : in DoblDobl_Complex_Poly_Systems.Poly_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the double double polynomial container. + + use DoblDobl_Complex_Polynomials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + DoblDobl_PolySys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + DoblDobl_PolySys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The polynomial system : "); + put(DoblDobl_PolySys_Container.Retrieve.all); + end DoblDobl_Test_Additions; + + procedure QuadDobl_Test_Additions + ( p : in QuadDobl_Complex_Poly_Systems.Poly_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the quad double polynomial container. + + use QuadDobl_Complex_Polynomials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + QuadDobl_PolySys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + QuadDobl_PolySys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The polynomial system : "); + put(QuadDobl_PolySys_Container.Retrieve.all); + end QuadDobl_Test_Additions; + + procedure Multprec_Test_Additions + ( p : in Multprec_Complex_Poly_Systems.Poly_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the multiprecision polynomial container. + + use Multprec_Complex_Polynomials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + Multprec_PolySys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + Multprec_PolySys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The polynomial system : "); + put(Multprec_PolySys_Container.Retrieve.all); + end Multprec_Test_Additions; + + procedure Standard_Test_Laurent_Additions + ( p : in Standard_Complex_Laur_Systems.Laur_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the standard double Laurent container. + + use Standard_Complex_Laurentials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + Standard_LaurSys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + Standard_LaurSys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The Laurent polynomial system : "); + put(Standard_LaurSys_Container.Retrieve.all); + end Standard_Test_Laurent_Additions; + + procedure DoblDobl_Test_Laurent_Additions + ( p : in DoblDobl_Complex_Laur_Systems.Laur_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the double double Laurent container. + + use DoblDobl_Complex_Laurentials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + DoblDobl_LaurSys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + DoblDobl_LaurSys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The Laurent polynomial system : "); + put(DoblDobl_LaurSys_Container.Retrieve.all); + end DoblDobl_Test_Laurent_Additions; + + procedure QuadDobl_Test_Laurent_Additions + ( p : in QuadDobl_Complex_Laur_Systems.Laur_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the quad double Laurent container. + + use QuadDobl_Complex_Laurentials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + QuadDobl_LaurSys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + QuadDobl_LaurSys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The Laurent polynomial system : "); + put(QuadDobl_LaurSys_Container.Retrieve.all); + end QuadDobl_Test_Laurent_Additions; + + procedure Multprec_Test_Laurent_Additions + ( p : in Multprec_Complex_Laur_Systems.Laur_Sys ) is + + -- DESCRIPTION : + -- Tests the constructors of the multiprecision Laurent container. + + use Multprec_Complex_Laurentials; + + ind : integer32; + + procedure Add_Term ( t : in Term; continue : out boolean ) is + begin + Multprec_LaurSys_Container.Add_Term(ind,t); + continue := true; + end Add_Term; + procedure Add_Terms is new Visiting_Iterator(Add_Term); + + begin + Multprec_LaurSys_Container.Initialize(p'last); + for i in p'range loop + ind := i; + Add_Terms(p(i)); + end loop; + put_line("The Laurent polynomial system : "); + put(Multprec_LaurSys_Container.Retrieve.all); + end Multprec_Test_Laurent_Additions; + + procedure Main is + + st_lp : Standard_Complex_Poly_Systems.Link_to_Poly_Sys; + dd_lp : DoblDobl_Complex_Poly_Systems.Link_to_Poly_Sys; + qd_lp : QuadDobl_Complex_Poly_Systems.Link_to_Poly_Sys; + mp_lp : Multprec_Complex_Poly_Systems.Link_to_Poly_Sys; + st_lq : Standard_Complex_Laur_Systems.Link_to_Laur_Sys; + dd_lq : DoblDobl_Complex_Laur_Systems.Link_to_Laur_Sys; + qd_lq : QuadDobl_Complex_Laur_Systems.Link_to_Laur_Sys; + mp_lq : Multprec_Complex_Laur_Systems.Link_to_Laur_Sys; + ans : character; + + begin + new_line; + put_line("MENU to test the operations in the systems container :"); + put_line(" 1. test with standard double complex numbers;"); + put_line(" 2. test with double double complex numbers;"); + put_line(" 3. test with quad double complex numbers;"); + put_line(" 4. test with arbitrary precision complex numbers;"); + put_line(" 5. test Laurent systems in standard double precision;"); + put_line(" 6. test Laurent systems in double double precision;"); + put_line(" 7. test Laurent systems in quad double precision;"); + put_line(" 8. test Laurent systems in arbitrary multiprecision;"); + put("Type 1, 2, 3, 4, 5, 6, 7, or 8 to select the precision : "); + Ask_Alternative(ans,"12345678"); + new_line; + case ans is + when '1' => + get(st_lp); + Standard_PolySys_Container.Initialize(st_lp.all); + Standard_Test_Retrievals; + Standard_PolySys_Container.Clear; + Standard_Test_Additions(st_lp.all); + when '2' => + get(dd_lp); + DoblDobl_PolySys_Container.Initialize(dd_lp.all); + DoblDobl_Test_Retrievals; + DoblDobl_PolySys_Container.Clear; + DoblDobl_Test_Additions(dd_lp.all); + when '3' => + get(qd_lp); + QuadDobl_PolySys_Container.Initialize(qd_lp.all); + QuadDobl_Test_Retrievals; + QuadDobl_PolySys_Container.Clear; + QuadDobl_Test_Additions(qd_lp.all); + when '4' => + get(mp_lp); + Multprec_PolySys_Container.Initialize(mp_lp.all); + Multprec_Test_Retrievals; + Multprec_PolySys_Container.Clear; + Multprec_Test_Additions(mp_lp.all); + when '5' => + get(st_lq); + Standard_LaurSys_Container.Initialize(st_lq.all); + Standard_Test_Laurent_Retrievals; + Standard_LaurSys_Container.Clear; + Standard_Test_Laurent_Additions(st_lq.all); + when '6' => + get(dd_lq); + DoblDobl_LaurSys_Container.Initialize(dd_lq.all); + DoblDobl_Test_Laurent_Retrievals; + DoblDobl_LaurSys_Container.Clear; + DoblDobl_Test_Laurent_Additions(dd_lq.all); + when '7' => + get(qd_lq); + QuadDobl_LaurSys_Container.Initialize(qd_lq.all); + QuadDobl_Test_Laurent_Retrievals; + QuadDobl_LaurSys_Container.Clear; + QuadDobl_Test_Laurent_Additions(qd_lq.all); + when '8' => + get(mp_lq); + Multprec_LaurSys_Container.Initialize(mp_lq.all); + Multprec_Test_Laurent_Retrievals; + Multprec_LaurSys_Container.Clear; + Multprec_Test_Laurent_Additions(mp_lq.all); + when others => null; + end case; + end Main; + +begin + Main; +end ts_syscon; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_syspool.adb phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_syspool.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Structures/ts_syspool.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Structures/ts_syspool.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,131 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Poly_Systems; +with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; +with DoblDobl_Complex_Poly_Systems; +with DoblDobl_Complex_Poly_Systems_io; use DoblDobl_Complex_Poly_Systems_io; +with QuadDobl_Complex_Poly_Systems; +with QuadDobl_Complex_Poly_Systems_io; use QuadDobl_Complex_Poly_Systems_io; +with Standard_Systems_Pool; +with DoblDobl_Systems_Pool; +with QuadDobl_Systems_Pool; + +procedure ts_syspool is + +-- DESCRIPTION : +-- Tests some basic operations on the systems pools. + + procedure Standard_Test is + + -- DESCRIPTION : + -- Runs a basic test to store systems of polynomials with + -- complex coefficients in standard double precision. + + use Standard_Complex_Poly_Systems; + + n : integer32 := 0; + p : Link_to_Poly_Sys; + + begin + new_line; + put_line("Testing the operations in the systems pool..."); + new_line; + put("-> The size of the systems pool : "); + put(Standard_Systems_Pool.Size,1); new_line; + put("Give the number of systems : "); get(n); + Standard_Systems_Pool.Initialize(n); + put("-> The size of the systems pool : "); + put(Standard_Systems_Pool.Size,1); new_line; + new_line; + put_line("Reading a polynomial system..."); get(p); + for k in 1..n loop + Standard_Systems_Pool.Create(k,p.all); + end loop; + end Standard_Test; + + procedure DoblDobl_Test is + + -- DESCRIPTION : + -- Runs a basic test to store systems of polynomials with + -- complex coefficients in double double precision. + + use DoblDobl_Complex_Poly_Systems; + + n : integer32 := 0; + p : Link_to_Poly_Sys; + + begin + new_line; + put_line("Testing the operations in the systems pool..."); + new_line; + put("-> The size of the systems pool : "); + put(DoblDobl_Systems_Pool.Size,1); new_line; + put("Give the number of systems : "); get(n); + DoblDobl_Systems_Pool.Initialize(n); + put("-> The size of the systems pool : "); + put(DoblDobl_Systems_Pool.Size,1); new_line; + new_line; + put_line("Reading a polynomial system..."); get(p); + for k in 1..n loop + DoblDobl_Systems_Pool.Create(k,p.all); + end loop; + end DoblDobl_Test; + + procedure QuadDobl_Test is + + -- DESCRIPTION : + -- Runs a basic test to store systems of polynomials with + -- complex coefficients in quad double precision. + + use QuadDobl_Complex_Poly_Systems; + + n : integer32 := 0; + p : Link_to_Poly_Sys; + + begin + new_line; + put_line("Testing the operations in the systems pool..."); + new_line; + put("-> The size of the systems pool : "); + put(QuadDobl_Systems_Pool.Size,1); new_line; + put("Give the number of systems : "); get(n); + QuadDobl_Systems_Pool.Initialize(n); + put("-> The size of the systems pool : "); + put(QuadDobl_Systems_Pool.Size,1); new_line; + new_line; + put_line("Reading a polynomial system..."); get(p); + for k in 1..n loop + QuadDobl_Systems_Pool.Create(k,p.all); + end loop; + end QuadDobl_Test; + + procedure Main is + + -- DESCRIPTION : + -- Prompts the user for the working precision + -- and then launches the corresponding test. + + ans : character; + + begin + new_line; + put_line("MENU to select the working precision :"); + put_line(" 0. standard double precision;"); + put_line(" 1. double double precision;"); + put_line(" 2. quad double precision."); + put("Type 0, 1, or 2 to select the precision : "); + Ask_Alternative(ans,"012"); + case ans is + when '0' => Standard_Test; + when '1' => DoblDobl_Test; + when '2' => QuadDobl_Test; + when others => null; + end case; + end Main; + +begin + Main; +end ts_syspool; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,547 @@ +with Interfaces.C; use Interfaces.C; +with Characters_and_Numbers; use Characters_and_Numbers; + +package body Assignments_in_Ada_and_C is + + procedure Assign ( this : in integer32; to_that : in C_intarrs.Pointer ) is + + val : C_Integer_Array(0..0); -- := C_intarrs.Value(to_that); + + begin + val(0) := Interfaces.C.int(this); + C_intarrs.Copy_Array(val(0)'unchecked_access,to_that,1); + end Assign; + + procedure Assign ( this : in C_intarrs.Pointer; to_that : out integer32 ) is + + val : constant C_Integer_Array := C_intarrs.Value(this); + + begin + to_that := integer32(val(val'first)); + end Assign; + + procedure Assign ( this : in double_float; + to_that : in C_dblarrs.Pointer ) is + + val : C_Double_Array(0..0); -- := C_dblarrs.Value(to_that); + + begin + val(0) := Interfaces.C.double(this); + C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,1); + end Assign; + + procedure Assign ( this : in C_dblarrs.Pointer; + to_that : out double_float ) is + + val : constant C_Double_Array := C_dblarrs.Value(this); + + begin + to_that := double_float(val(val'first)); + end Assign; + + procedure Assign ( this : in double_double; + to_that : in C_dblarrs.Pointer ) is + + val : C_Double_Array(0..1); + + begin + val(0) := Interfaces.C.double(hi_part(this)); + val(1) := Interfaces.C.double(lo_part(this)); + C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,2); + end Assign; + + procedure Assign ( this : in C_dblarrs.Pointer; + to_that : out double_double ) is + + val : constant C_Double_Array := C_dblarrs.Value(this,2); + + begin + to_that := Create(double_float(val(0)),double_float(val(1))); + end Assign; + + procedure Assign ( this : in quad_double; + to_that : in C_dblarrs.Pointer ) is + + val : C_Double_Array(0..3); + + begin + val(0) := Interfaces.C.double(hihi_part(this)); + val(1) := Interfaces.C.double(lohi_part(this)); + val(2) := Interfaces.C.double(hilo_part(this)); + val(3) := Interfaces.C.double(lolo_part(this)); + C_dblarrs.Copy_Array(val(0)'unchecked_access,to_that,4); + end Assign; + + procedure Assign ( this : in C_dblarrs.Pointer; + to_that : out quad_double ) is + + val : constant C_Double_Array := C_dblarrs.Value(this,4); + hihi : constant double_float := double_float(val(0)); + lohi : constant double_float := double_float(val(1)); + hilo : constant double_float := double_float(val(2)); + lolo : constant double_float := double_float(val(3)); + + begin + to_that := create(hihi,lohi,hilo,lolo); + end Assign; + + procedure Assign ( ada_cf : in Standard_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ) is + + use Standard_Complex_Numbers; + + val : C_Double_Array(0..1); + + begin + val(0) := Interfaces.C.double(REAL_PART(ada_cf)); + val(1) := Interfaces.C.double(IMAG_PART(ada_cf)); + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,2); + end Assign; + + procedure Assign ( ada_cf : in DoblDobl_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ) is + + use DoblDobl_Complex_Numbers; + + r : constant double_double := REAL_PART(ada_cf); + i : constant double_double := IMAG_PART(ada_cf); + + val : C_Double_Array(0..3); + + begin + val(0) := Interfaces.C.double(hi_part(r)); + val(1) := Interfaces.C.double(lo_part(r)); + val(2) := Interfaces.C.double(hi_part(i)); + val(3) := Interfaces.C.double(lo_part(i)); + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,4); + end Assign; + + procedure Assign ( ada_cf : in QuadDobl_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ) is + + use QuadDobl_Complex_Numbers; + + r : constant quad_double := REAL_PART(ada_cf); + i : constant quad_double := IMAG_PART(ada_cf); + + val : C_Double_Array(0..7); + + begin + val(0) := Interfaces.C.double(hihi_part(r)); + val(1) := Interfaces.C.double(lohi_part(r)); + val(2) := Interfaces.C.double(hilo_part(r)); + val(3) := Interfaces.C.double(lolo_part(r)); + val(4) := Interfaces.C.double(hihi_part(i)); + val(5) := Interfaces.C.double(lohi_part(i)); + val(6) := Interfaces.C.double(hilo_part(i)); + val(7) := Interfaces.C.double(lolo_part(i)); + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_cf,8); + end Assign; + + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out Standard_Complex_Numbers.Complex_Number ) is + + use Standard_Complex_Numbers; + + val : constant C_Double_Array := C_dblarrs.Value(c_cf,2); + + begin + ada_cf := Create(double_float(val(0)),double_float(val(1))); + end Assign; + + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out DoblDobl_Complex_Numbers.Complex_Number ) is + + val : constant C_Double_Array := C_dblarrs.Value(c_cf,4); + + r : constant double_double + := create(double_float(val(0)),double_float(val(1))); + i : constant double_double + := create(double_float(val(0)),double_float(val(1))); + + begin + ada_cf := DoblDobl_Complex_Numbers.Create(r,i); + end Assign; + + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out QuadDobl_Complex_Numbers.Complex_Number ) is + + val : constant C_Double_Array := C_dblarrs.Value(c_cf,8); + + r : constant quad_double + := create(double_float(val(0)),double_float(val(1)), + double_float(val(2)),double_float(val(3))); + i : constant quad_double + := create(double_float(val(4)),double_float(val(5)), + double_float(val(6)),double_float(val(7))); + + begin + ada_cf := QuadDobl_Complex_Numbers.Create(r,i); + end Assign; + + procedure Assign ( ada_d : in Standard_Natural_Vectors.Vector; + c_d : in C_intarrs.Pointer ) is + + nd : constant natural32 := natural32(ada_d'last); + val : C_Integer_Array(0..Interfaces.C.size_t(nd-1)); + ind : Interfaces.C.size_t := 0; + + begin + for i in ada_d'range loop + val(ind) := Interfaces.C.int(ada_d(i)); + ind := ind + 1; + end loop; + C_intarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(nd)); + end Assign; + + procedure Assign ( ada_d : in Standard_Integer_Vectors.Vector; + c_d : in C_intarrs.Pointer ) is + + nd : constant natural32 := natural32(ada_d'last); + val : C_Integer_Array(0..Interfaces.C.size_t(nd-1)); + ind : Interfaces.C.size_t := 0; + + begin + for i in ada_d'range loop + val(ind) := Interfaces.C.int(ada_d(i)); + ind := ind + 1; + end loop; + C_intarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(nd)); + end Assign; + + procedure Assign ( ada_d : in Standard_Floating_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + nd : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(nd-1)); + ind : Interfaces.C.size_t := 0; + + begin + for i in ada_d'range loop + val(ind) := Interfaces.C.double(ada_d(i)); + ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(nd)); + end Assign; + + procedure Assign ( ada_d : in Double_Double_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + nd : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(2*nd-1)); + ind : Interfaces.C.size_t := 0; + nbr : double_double; + + begin + for i in ada_d'range loop + nbr := ada_d(i); + val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(2*nd)); + end Assign; + + procedure Assign ( ada_d : in Quad_Double_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + nd : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(4*nd-1)); + ind : Interfaces.C.size_t := 0; + nbr : quad_double; + + begin + for i in ada_d'range loop + nbr := ada_d(i); + val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(4*nd)); + end Assign; + + procedure Assign ( ada_d : in Standard_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + use Standard_Complex_Numbers; + + v_n : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(2*v_n-1)) + := C_dblarrs.Value(c_d); + ind : Interfaces.C.size_t := 0; + + begin + for i in 1..integer32(v_n) loop + val(ind) := Interfaces.C.double(REAL_PART(ada_d(i))); + ind := ind + 1; + val(ind) := Interfaces.C.double(IMAG_PART(ada_d(i))); + ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(2*v_n)); + end Assign; + + procedure Assign ( ada_d : in DoblDobl_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + use DoblDobl_Complex_Numbers; + + v_n : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(4*v_n-1)) + := C_dblarrs.Value(c_d); + ind : Interfaces.C.size_t := 0; + nbr : double_double; + + begin + for i in 1..integer32(v_n) loop + nbr := REAL_PART(ada_d(i)); + val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; + nbr := IMAG_PART(ada_d(i)); + val(ind) := Interfaces.C.double(hi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lo_part(nbr)); ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(4*v_n)); + end Assign; + + procedure Assign ( ada_d : in QuadDobl_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ) is + + use QuadDobl_Complex_Numbers; + + v_n : constant natural32 := natural32(ada_d'last); + val : C_Double_Array(0..Interfaces.C.size_t(8*v_n-1)) + := C_dblarrs.Value(c_d); + ind : Interfaces.C.size_t := 0; + nbr : quad_double; + + begin + for i in 1..integer32(v_n) loop + nbr := REAL_PART(ada_d(i)); + val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; + nbr := IMAG_PART(ada_d(i)); + val(ind) := Interfaces.C.double(hihi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lohi_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(hilo_part(nbr)); ind := ind + 1; + val(ind) := Interfaces.C.double(lolo_part(nbr)); ind := ind + 1; + end loop; + C_dblarrs.Copy_Array(val(0)'unchecked_access,c_d, + Interfaces.C.ptrdiff_t(8*v_n)); + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; + ada_d : out Standard_Natural_Vectors.Vector ) is + + val : constant C_Integer_Array(0..Interfaces.C.size_t(v_n-1)) + := C_intarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + + begin + for i in 1..integer32(v_n) loop + ada_d(i) := natural32(val(ind)); + ind := ind + 1; + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; + ada_d : out Standard_Integer_Vectors.Vector ) is + + val : constant C_Integer_Array(0..Interfaces.C.size_t(v_n-1)) + := C_intarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + + begin + for i in 1..integer32(v_n) loop + ada_d(i) := integer32(val(ind)); + ind := ind + 1; + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Standard_Floating_Vectors.Vector ) is + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + + begin + for i in 1..integer32(v_n) loop + ada_d(i) := double_float(val(ind)); + ind := ind + 1; + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Double_Double_Vectors.Vector ) is + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + lo,hi : double_float; + dim : constant integer32 := integer32(v_n)/2; + + begin + for i in 1..dim loop + hi := double_float(val(ind)); ind := ind + 1; + lo := double_float(val(ind)); ind := ind + 1; + ada_d(i) := Double_Double_Numbers.Create(hi,lo); + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Quad_Double_Vectors.Vector ) is + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + hihi,lohi,hilo,lolo : double_float; + dim : constant integer32 := integer32(v_n)/4; + + begin + for i in 1..dim loop + hihi := double_float(val(ind)); ind := ind + 1; + lohi := double_float(val(ind)); ind := ind + 1; + hilo := double_float(val(ind)); ind := ind + 1; + lolo := double_float(val(ind)); ind := ind + 1; + ada_d(i) := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Standard_Complex_Vectors.Vector ) is + + use Standard_Complex_Numbers; + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + + begin + for i in 1..integer32(v_n)/2 loop + ada_d(i) := Create(double_float(val(ind)),double_float(val(ind+1))); + ind := ind + 2; + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out DoblDobl_Complex_Vectors.Vector ) is + + use DoblDobl_Complex_Numbers; + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + lo,hi : double_float; + re,im : double_double; + dim : constant integer32 := integer32(v_n)/4; + + begin + for i in 1..dim loop + hi := double_float(val(ind)); ind := ind + 1; + lo := double_float(val(ind)); ind := ind + 1; + re := Double_Double_Numbers.Create(hi,lo); + hi := double_float(val(ind)); ind := ind + 1; + lo := double_float(val(ind)); ind := ind + 1; + im := Double_Double_Numbers.Create(hi,lo); + ada_d(i) := Create(re,im); + end loop; + end Assign; + + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out QuadDobl_Complex_Vectors.Vector ) is + + use QuadDobl_Complex_Numbers; + + val : constant C_Double_Array(0..Interfaces.C.size_t(v_n-1)) + := C_dblarrs.Value(c_d,Interfaces.C.ptrdiff_t(v_n)); + ind : Interfaces.C.size_t := 0; + lolo,hilo,lohi,hihi : double_float; + re,im : quad_double; + dim : constant integer32 := integer32(v_n)/8; + + begin + for i in 1..dim loop + hihi := double_float(val(ind)); ind := ind + 1; + lohi := double_float(val(ind)); ind := ind + 1; + hilo := double_float(val(ind)); ind := ind + 1; + lolo := double_float(val(ind)); ind := ind + 1; + re := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); + hihi := double_float(val(ind)); ind := ind + 1; + lohi := double_float(val(ind)); ind := ind + 1; + hilo := double_float(val(ind)); ind := ind + 1; + lolo := double_float(val(ind)); ind := ind + 1; + im := Quad_Double_Numbers.Create(hihi,lohi,hilo,lolo); + ada_d(i) := Create(re,im); + end loop; + end Assign; + + function C_Integer_Array_to_String + ( n : natural32; v : C_Integer_Array ) return String is + + res : String(1..integer(n)); + ch : character; + + begin + for i in v'range loop + exit when (integer(i)+1 > res'last); + ch := Integer_to_Character(integer32(v(i))); + res(integer(i)+1) := ch; + end loop; + return res; + end C_Integer_Array_to_String; + + function Pad_with_Spaces ( n : natural32; s : string ) return string is + begin + if s'last >= integer(n) then + return s; + else + declare + res : string(1..integer(n)); + begin + res(s'range) := s; + for i in s'last+1..integer(n) loop + res(i) := ' '; + end loop; + return res; + end; + end if; + end Pad_with_Spaces; + + function String_to_C_Integer_Array + ( n : natural32; s : string ) return C_Integer_Array is + + + res : C_Integer_Array(0..Interfaces.C.size_t(n-1)); + ind : Interfaces.C.size_t := 0; + + begin + for i in s'range loop + res(ind) := Interfaces.C.int(Character_to_Integer(s(i))); + ind := ind + 1; + end loop; + return res; + end String_to_C_Integer_Array; + + function String_to_Integer_Vector + ( s : string ) return Standard_Integer_Vectors.Vector is + + res : Standard_Integer_Vectors.Vector + (integer32(s'first)..integer32(s'last)); + + begin + for i in s'range loop + res(integer32(i)) := Character_to_Integer(s(i)); + end loop; + return res; + end String_to_Integer_Vector; + +end Assignments_in_Ada_and_C; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/assignments_in_ada_and_c.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,146 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Double_Double_Numbers; use Double_Double_Numbers; +with Quad_Double_Numbers; use Quad_Double_Numbers; +with Standard_Complex_Numbers; +with DoblDobl_Complex_Numbers; +with QuadDobl_Complex_Numbers; +with Standard_Natural_Vectors; +with Standard_Integer_Vectors; +with Standard_Floating_Vectors; +with Double_Double_Vectors; +with Quad_Double_Vectors; +with Standard_Complex_Vectors; +with DoblDobl_Complex_Vectors; +with QuadDobl_Complex_Vectors; +with C_Integer_Arrays; use C_Integer_Arrays; +with C_Double_Arrays; use C_Double_Arrays; + +package Assignments_in_Ada_and_C is + +-- DESCRIPTION : +-- This package provides assignment operators between Ada and C data. + + procedure Assign ( this : in integer32; to_that : in C_intarrs.Pointer ); + procedure Assign ( this : in C_intarrs.Pointer; to_that : out integer32 ); + procedure Assign ( this : in double_float; to_that : in C_dblarrs.Pointer ); + procedure Assign ( this : in C_dblarrs.Pointer; to_that : out double_float ); + + -- DESCRIPTION : + -- Assigns what is in this to the location pointed by to_that. + + procedure Assign ( this : in double_double; + to_that : in C_dblarrs.Pointer ); + procedure Assign ( this : in C_dblarrs.Pointer; + to_that : out double_double ); + procedure Assign ( this : in quad_double; + to_that : in C_dblarrs.Pointer ); + procedure Assign ( this : in C_dblarrs.Pointer; + to_that : out quad_double ); + + -- DESCRIPTION : + -- Assigns the consecutive locations for double doubles and quad doubles + -- of what is in this to the location pointed by to_that. + + procedure Assign ( ada_cf : in Standard_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ); + procedure Assign ( ada_cf : in DoblDobl_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ); + procedure Assign ( ada_cf : in QuadDobl_Complex_Numbers.Complex_Number; + c_cf : in C_dblarrs.Pointer ); + + -- DESCRIPTION : + -- Assigns the complex number in ada_cf to the array in c_cf, + -- copying real and imaginary part of ada_cf to c_cf + -- in consecutive locations. + + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out Standard_Complex_Numbers.Complex_Number ); + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out DoblDobl_Complex_Numbers.Complex_Number ); + procedure Assign ( c_cf : in C_dblarrs.Pointer; + ada_cf : out QuadDobl_Complex_Numbers.Complex_Number ); + + -- DESCRIPTION : + -- Assigns to ada_cf the values of real and imaginary parts in c_cf. + -- The values for double double and quad doubles are assumed to be + -- in consecutive locations in memory. + + procedure Assign ( ada_d : in Standard_Natural_Vectors.Vector; + c_d : in C_intarrs.Pointer ); + procedure Assign ( ada_d : in Standard_Integer_Vectors.Vector; + c_d : in C_intarrs.Pointer ); + procedure Assign ( ada_d : in Standard_Floating_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + procedure Assign ( ada_d : in Double_Double_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + procedure Assign ( ada_d : in Quad_Double_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + procedure Assign ( ada_d : in Standard_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + procedure Assign ( ada_d : in DoblDobl_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + procedure Assign ( ada_d : in QuadDobl_Complex_Vectors.Vector; + c_d : in C_dblarrs.Pointer ); + + -- DESCRIPTION : + -- Assigns the content of the Ada vector to the C vector. + -- The complex numbers in ada_d are written to c_d as a sequence + -- of real and imaginary double floats. + -- Double double and quad double numbers are written as sequences + -- of respectively two and four doubles, in order of significance. + + -- REQUIRED : ada_d'range = 1..n, for some n. + + procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; + ada_d : out Standard_Natural_Vectors.Vector ); + procedure Assign ( v_n : in natural32; c_d : in C_intarrs.Pointer; + ada_d : out Standard_Integer_Vectors.Vector ); + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Standard_Floating_Vectors.Vector ); + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out Standard_Complex_Vectors.Vector ); + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out DoblDobl_Complex_Vectors.Vector ); + procedure Assign ( v_n : in natural32; c_d : in C_dblarrs.Pointer; + ada_d : out QuadDobl_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Assigns the content of the C vector to the Ada vector. + -- For complex vectors, it copies the consecutive real and + -- and imaginary parts in c_d to ada_d. + -- When writing to a vector of double double or quad double + -- complex numbers, the doubles are interpreted as parts of + -- a double double or quad doubles, with their most significant + -- parts first. + + -- REQUIRED : ada_d'range = 1..N, for some N; + -- for complex vectors: ada_d'range = 1..v_n/2, for some v_n; + -- for double double vectors: ada_d'range = 1..v_n/2; and + -- for quad double vectors: ada_d'range = 1..v_n/4; and + -- for double double complex vectors: ada_d'range = 1..v_n/4; and + -- for quad double complex vectors: ada_d'range = 1..v_n/8. + + function C_Integer_Array_to_String + ( n : natural32; v : C_Integer_Array ) return String; + + -- DESCRIPTION : + -- Converts an array of n integers into a string of n characters. + + function Pad_with_Spaces ( n : natural32; s : string ) return string; + + -- DESCRIPTION : + -- If s'last >= n, then the string s is returned, otherwise, + -- if s'last < n, then the string on return will be of length n, + -- contain s padded with spaces. + + function String_to_C_Integer_Array + ( n : natural32; s : string ) return C_Integer_Array; + function String_to_Integer_Vector + ( s : string ) return Standard_Integer_Vectors.Vector; + + -- DESCRIPTION : + -- Converts a string into an array of integer C type numbers. + +end Assignments_in_Ada_and_C; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,22 @@ +package body C_Double_Arrays is + + function Concat ( a,b : C_Double_Array ) return C_Double_Array is + + res : C_Double_Array(0..Interfaces.C.size_T(a'length+b'length-1)); + ind : Interfaces.C.size_T := 0; + + use Interfaces.C; + + begin + for i in a'range loop + res(ind) := a(i); + ind := ind+1; + end loop; + for i in b'range loop + res(ind) := b(i); + ind := ind+1; + end loop; + return res; + end Concat; + +end C_Double_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,27 @@ +with Interfaces.C; +with Interfaces.C.Pointers; + +package C_Double_Arrays is + +-- DESCRIPTION : +-- This package defines the type "C_Double_Array" to work with arrays +-- of C doubles and instantiates the C pointers packages. +-- The "Pointer_to_C_Double_Array" is needed to make matrices as +-- arrays of arrays of doubles. + + type C_Double_Array is + array ( Interfaces.C.size_t range <> ) of aliased Interfaces.C.double; + + type Pointer_to_C_Double_Array is access C_Double_Array; + + package C_DblArrs is + new Interfaces.C.Pointers(Interfaces.C.size_t, + Interfaces.C.double, + C_Double_Array,0.0); + + function Concat ( a,b : C_Double_Array ) return C_Double_Array; + + -- DESCRIPTION : + -- Concatenates the array b after the array a. + +end C_Double_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays_io.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays_io.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays_io.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,19 @@ +with Interfaces.C; +with C_Double_io; use C_Double_io; + +package body C_Double_Arrays_io is + + procedure put ( n : in natural; v : in C_Double_Array ) is + begin + put(Standard_Output,n,v); + end put; + + procedure put ( file : in file_type; + n : in natural; v : in C_Double_Array ) is + begin + for i in 0..Interfaces.C.size_T(n-1) loop + put(file,v(i)); new_line(file); + end loop; + end put; + +end C_Double_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_arrays_io.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_arrays_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,16 @@ +with text_io; use text_io; +with C_Double_Arrays; use C_Double_Arrays; + +package C_Double_Arrays_io is + +-- DESCRIPTION : +-- This package provides output routines for arrays of C doubles. + + procedure put ( n : in natural; v : in C_Double_Array ); + procedure put ( file : in file_type; + n : in natural; v : in C_Double_Array ); + + -- DESCRIPTION : + -- Writes the entries of v from 0 to n-1 to standard output or to file. + +end C_Double_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_double_io.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_double_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,4 @@ +with text_io; use text_io; +with Interfaces.C; + +package C_Double_io is new text_io.float_io(Interfaces.C.double); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,18 @@ +with Interfaces.C; +with Interfaces.C.Pointers; + +package C_Integer_Arrays is + +-- DESCRIPTION : +-- This package defines the type "C_Integer_Array" to work with arrays +-- of C integers and instantiates the C pointers packages. + + type C_Integer_Array is + array ( Interfaces.C.size_T range <> ) of aliased Interfaces.C.int; + + package C_intarrs is + new Interfaces.C.Pointers(Interfaces.C.size_T, + Interfaces.C.int, + C_Integer_Array,0); + +end C_Integer_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays_io.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays_io.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays_io.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,19 @@ +with Interfaces.C; +with C_Integer_io; use C_Integer_io; + +package body C_Integer_Arrays_io is + + procedure put ( n : in natural; v : in C_Integer_Array ) is + begin + put(Standard_Output,n,v); + end put; + + procedure put ( file : in file_type; + n : in natural; v : in C_Integer_Array ) is + begin + for i in 0..Interfaces.C.size_T(n-1) loop + put(file," "); put(file,v(i),1); + end loop; + end put; + +end C_Integer_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_arrays_io.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_arrays_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,16 @@ +with text_io; use text_io; +with C_Integer_Arrays; use C_Integer_Arrays; + +package C_Integer_Arrays_io is + +-- DESCRIPTION : +-- This package provides output routines for arrays of C integers. + + procedure put ( n : in natural; v : in C_Integer_Array ); + procedure put ( file : in file_type; + n : in natural; v : in C_Integer_Array ); + + -- DESCRIPTION : + -- Writes the entries of v from 0 to n-1 to standard output or to file. + +end C_Integer_Arrays_io; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_io.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_io.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_integer_io.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_integer_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,4 @@ +with text_io; use text_io; +with Interfaces.C; + +package C_Integer_io is new text_io.integer_io(Interfaces.C.int); diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_to_ada_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/c_to_ada_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_to_ada_arrays.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_to_ada_arrays.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,174 @@ +with Interfaces.C; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Complex_Numbers; +with Double_Double_Numbers; use Double_Double_Numbers; +with DoblDobl_Complex_Numbers; +with Quad_Double_Numbers; use Quad_Double_Numbers; +with QuadDobl_Complex_Numbers; + +package body C_to_Ada_Arrays is + + function Convert ( v : C_Integer_Array ) + return Standard_Integer_Vectors.Vector is + + res : Standard_Integer_Vectors.Vector(0..integer32(v'length)-1); + + begin + for i in v'range loop + res(integer32(i)) := integer32(v(i)); + end loop; + return res; + end Convert; + + function Convert ( v : Standard_Integer_Vectors.Vector ) + return C_Integer_Array is + + res : C_Integer_Array(0..Interfaces.C.size_T(v'length-1)); + ind : Interfaces.C.size_T := 0; + + use Interfaces.C; + + begin + for i in v'range loop + res(ind) := Interfaces.C.int(v(i)); + ind := ind + 1; + end loop; + return res; + end Convert; + + function Convert ( v : C_Double_Array ) + return Standard_Floating_Vectors.Vector is + + res : Standard_Floating_Vectors.Vector(0..integer32(v'length)-1); + + begin + for i in v'range loop + res(integer32(i)) := double_float(v(i)); + end loop; + return res; + end Convert; + + function Convert ( v : Standard_Floating_Vectors.Vector ) + return C_Double_Array is + + res : C_Double_Array(0..Interfaces.C.size_T(v'length-1)); + ind : Interfaces.C.size_T := 0; + + use Interfaces.C; + + begin + for i in v'range loop + res(ind) := Interfaces.C.double(v(i)); + ind := ind + 1; + end loop; + return res; + end Convert; + + function Convert ( v : C_Double_Array ) + return Standard_Complex_Vectors.Vector is + + vlen : constant integer32 := integer32(v'length); + res : Standard_Complex_Vectors.Vector(1..vlen/2); + ind : Interfaces.C.size_T := 0; + + use Interfaces.C,Standard_Complex_Numbers; + + begin + for i in res'range loop + res(i) := Create(double_float(v(ind)),double_float(v(ind+1))); + ind := ind + 2; + end loop; + return res; + end Convert; + + function Convert ( v : Standard_Complex_Vectors.Vector ) + return C_Double_Array is + + res : C_Double_Array(0..Interfaces.C.size_T(2*v'length-1)); + ind : Interfaces.C.size_T := 0; + re,im : double_float; + use Interfaces.C; + + begin + for i in v'range loop + re := Standard_Complex_Numbers.REAL_PART(v(i)); + res(ind) := Interfaces.C.double(re); + ind := ind + 1; + im := Standard_Complex_Numbers.IMAG_PART(v(i)); + res(ind) := Interfaces.C.double(im); + ind := ind + 1; + end loop; + return res; + end Convert; + + function Convert ( v : DoblDobl_Complex_Vectors.Vector ) + return C_Double_Array is + + dim : constant integer32 := v'last; + res : C_Double_Array(0..Interfaces.C.size_T(4*dim)); + ind : Interfaces.C.size_T := 0; + re,im : double_double; + use Interfaces.C; + + begin + for i in v'range loop + re := DoblDobl_Complex_Numbers.REAL_PART(v(i)); + res(ind) := Interfaces.C.double(hi_part(re)); ind := ind + 1; + res(ind) := Interfaces.C.double(lo_part(re)); ind := ind + 1; + im := DoblDobl_Complex_Numbers.IMAG_PART(v(i)); + res(ind) := Interfaces.C.double(hi_part(im)); ind := ind + 1; + res(ind) := Interfaces.C.double(lo_part(im)); ind := ind + 1; + end loop; + return res; + end Convert; + + function Convert ( v : QuadDobl_Complex_Vectors.Vector ) + return C_Double_Array is + + dim : constant integer32 := v'last; + res : C_Double_Array(0..Interfaces.C.size_T(8*dim)); + ind : Interfaces.C.size_T := 0; + re,im : quad_double; + use Interfaces.C; + + begin + for i in v'range loop + re := QuadDobl_Complex_Numbers.REAL_PART(v(i)); + res(ind) := Interfaces.C.double(hihi_part(re)); ind := ind + 1; + res(ind) := Interfaces.C.double(lohi_part(re)); ind := ind + 1; + res(ind) := Interfaces.C.double(hilo_part(re)); ind := ind + 1; + res(ind) := Interfaces.C.double(lolo_part(re)); ind := ind + 1; + im := QuadDobl_Complex_Numbers.IMAG_PART(v(i)); + res(ind) := Interfaces.C.double(hihi_part(im)); ind := ind + 1; + res(ind) := Interfaces.C.double(lohi_part(im)); ind := ind + 1; + res(ind) := Interfaces.C.double(hilo_part(im)); ind := ind + 1; + res(ind) := Interfaces.C.double(lolo_part(im)); ind := ind + 1; + end loop; + return res; + end Convert; + + function Convert ( m : Standard_Complex_Matrices.Matrix ) + return C_Double_Array is + + len : constant integer32 := 2*m'length(1)*m'length(2); + res : C_Double_Array(0..Interfaces.C.size_T(len-1)); + ind : Interfaces.C.size_T := 0; + re,im : double_float; + use Interfaces.C; + + begin + for i in m'range(1) loop + for j in m'range(2) loop + re := Standard_Complex_Numbers.REAL_PART(m(i,j)); + res(ind) := Interfaces.C.double(re); + ind := ind + 1; + im := Standard_Complex_Numbers.IMAG_PART(m(i,j)); + res(ind) := Interfaces.C.double(im); + ind := ind + 1; + end loop; + end loop; + return res; + end Convert; + +end C_to_Ada_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/c_to_ada_arrays.ads phcpack-2.4.85/src/Ada/CtoPHC/Types/c_to_ada_arrays.ads --- phcpack-2.4.84/src/Ada/CtoPHC/Types/c_to_ada_arrays.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/c_to_ada_arrays.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,61 @@ +with C_Integer_Arrays; use C_Integer_Arrays; +with C_Double_Arrays; use C_Double_Arrays; +with Standard_Integer_Vectors; +with Standard_Floating_Vectors; +with Standard_Complex_Vectors; +with DoblDobl_Complex_Vectors; +with QuadDobl_Complex_Vectors; +with Standard_Complex_Matrices; + +package C_to_Ada_Arrays is + +-- DESCRIPTION : +-- This package offers conversion operators between arrays of +-- integers and doubles, to interface with C, and the vector types +-- defined in PHCpack. Note that C arrays always start at 0. + + function Convert ( v : C_Integer_Array ) + return Standard_Integer_Vectors.Vector; + function Convert ( v : Standard_Integer_Vectors.Vector ) + return C_Integer_Array; + + -- DESCRIPTION : + -- Conversion between arrays of C integers and Ada integers. + + function Convert ( v : C_Double_Array ) + return Standard_Floating_Vectors.Vector; + function Convert ( v : Standard_Floating_Vectors.Vector ) + return C_Double_Array; + + -- DESCRIPTION : + -- Conversion between arrays of C doubles and Ada doubles. + + function Convert ( v : C_Double_Array ) + return Standard_Complex_Vectors.Vector; + + -- DESCRIPTION : + -- Converts a double array into an array of complex numbers, + -- the array on return starts at index 1. + + -- REQUIRED : v'length mod 2 = 0. + + function Convert ( v : Standard_Complex_Vectors.Vector ) + return C_Double_Array; + function Convert ( v : DoblDobl_Complex_Vectors.Vector ) + return C_Double_Array; + function Convert ( v : QuadDobl_Complex_Vectors.Vector ) + return C_Double_Array; + + -- DESCRIPTION : + -- Creates an array of doubles with real and imaginary parts of + -- the complex numbers in v. + + function Convert ( m : Standard_Complex_Matrices.Matrix ) + return C_Double_Array; + + -- DESCRIPTION : + -- Creates an array of doubles with real and imaginary parts of + -- the complex numbers in the matrix m, stored consecutively + -- row after row. + +end C_to_Ada_Arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/READ_ME phcpack-2.4.85/src/Ada/CtoPHC/Types/READ_ME --- phcpack-2.4.84/src/Ada/CtoPHC/Types/READ_ME 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,20 @@ +Working with C types in PHCv2.4.85 + +This folder was added in version 2.4.85 to simplify the building process. +The first part of the code in this folder was moved from ../Funky +and the assignments_in_ada_and_c was moved from ../State. + +------------------------------------------------------------------------------ +file name : short description +------------------------------------------------------------------------------ +c_integer_io : input/output of C integers +c_integer_arrays : defines arrays of C integers +c_integer_arrays_io : output of arrays of C integers +c_double_io : input/output of C doubles +c_double_arrays : defines arrays of C doubles +c_double_arrays_io : output of arrays of C doubles +c_to_ada_arrays : converting arrays between C and Ada +ts_arrays : interactive test of array conversions +------------------------------------------------------------------------------ +assignments_in_ada_and_c : assign data in Ada and C format +------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/ts_arrays.adb phcpack-2.4.85/src/Ada/CtoPHC/Types/ts_arrays.adb --- phcpack-2.4.84/src/Ada/CtoPHC/Types/ts_arrays.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/ts_arrays.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,154 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; +with Standard_Integer_Vectors; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Complex_Vectors; +with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; +with Interfaces.C; +with C_integer_io; use C_Integer_io; +with C_Integer_Arrays; use C_Integer_Arrays; +with C_Integer_Arrays_io; use C_Integer_Arrays_io; +with C_Double_io; use C_Double_io; +with C_Double_Arrays; use C_Double_Arrays; +with C_Double_Arrays_io; use C_Double_Arrays_io; +with C_to_Ada_Arrays; use C_to_Ada_Arrays; + +procedure ts_arrays is + +-- DESCRIPTION : +-- This package allows interactive testing of the conversions +-- between the various array types in C and Ada. + + procedure Test_C_to_Ada_Integer_Array is + + -- DESCRIPTION : + -- Reads in an array of C integers and writes the converted Ada array. + + n : integer32 := 0; + + begin + put("Give the number of elements in the array : "); get(n); + declare + ca : C_Integer_Array(0..Interfaces.C.size_T(n-1)); + begin + put("Give "); put(n,1); put(" integers : "); + for i in ca'range loop + get(ca(i)); + end loop; + put("Your integer array : "); put(integer(n),ca); new_line; + declare + aa : constant Standard_Integer_Vectors.Vector := Convert(ca); + begin + put("The Ada array : "); put(aa); new_line; + end; + end; + end Test_C_to_Ada_Integer_Array; + + procedure Test_C_Double_to_Ada_Complex_Array is + + -- DESCRIPTION : + -- Reads in an array of C doubles and writes the converted Ada + -- array of complex numbers. + + n : integer32 := 0; + + begin + loop + put("Give the number of elements in the array : "); get(n); + exit when n mod 2 = 0; + put(" "); put(n,1); + put_line(" is not a multiple of 2. Please try again..."); + end loop; + declare + ca : C_Double_Array(0..Interfaces.C.size_T(n-1)); + begin + put("Give "); put(n,1); put(" doubles : "); + for i in ca'range loop + get(ca(i)); + end loop; + put_line("Your double array : "); put(integer(n),ca); + declare + aa : constant Standard_Complex_Vectors.Vector := Convert(ca); + begin + put_line("The Ada complex array : "); + put_line(aa); + end; + end; + end Test_C_Double_to_Ada_Complex_Array; + + procedure Test_Ada_to_C_Integer_Array is + + a,b : integer32 := 0; + + begin + put("Give lower index : "); get(a); + put("Give upper index : "); get(b); + declare + aa : Standard_Integer_Vectors.Vector(a..b); + begin + put("Give "); put(b-a+1,1); put(" integers : "); + for i in aa'range loop + aa(i) := 0; get(aa(i)); + end loop; + put("Your integer array : "); put(aa); new_line; + declare + ca : constant C_Integer_Array := Convert(aa); + begin + put("The C integer array : "); put(ca'length,ca); new_line; + end; + end; + end Test_Ada_to_C_Integer_Array; + + procedure Test_Ada_Complex_to_C_Double_Array is + + a,b : integer32 := 0; + + begin + put("Give lower index : "); get(a); + put("Give upper index : "); get(b); + declare + aa : Standard_Complex_Vectors.Vector(a..b); + begin + put("Give "); put(b-a+1,1); put(" complex numbers : "); + for i in aa'range loop + get(aa(i)); + end loop; + put_line("Your complex array : "); put_line(aa); + declare + ca : constant C_Double_Array := Convert(aa); + begin + put_line("The C double array : "); put(ca'length,ca); + end; + end; + end Test_Ada_Complex_to_C_Double_Array; + + procedure Main is + + ans : character; + + begin + new_line; + put_line("Conversion between C and Ada arrays."); + new_line; + put_line("MENU to convert arrays from C to Ada and from Ada to C :"); + put_line(" 1. convert C integer array into Ada integer array;"); + put_line(" 2. convert Ada integer array into C integer array;"); + put_line(" 3. convert C double array into Ada complex array;"); + put_line(" 4. convert Ada complex array into C double array;"); + put("Type 1, 2, 3 or 4 to choose : "); Ask_Alternative(ans,"1234"); + new_line; + case ans is + when '1' => Test_C_to_Ada_Integer_Array; + when '2' => Test_Ada_to_C_Integer_Array; + when '3' => Test_C_Double_to_Ada_Complex_Array; + when '4' => Test_Ada_Complex_to_C_Double_Array; + when others => null; + end case; + end Main; + +begin + Main; +end ts_arrays; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/Types/types.gpr phcpack-2.4.85/src/Ada/CtoPHC/Types/types.gpr --- phcpack-2.4.84/src/Ada/CtoPHC/Types/types.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/Types/types.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,25 @@ +project types is + + for Source_Dirs use + ( + ".", "../../System", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices" + ); + for Languages use ("Ada"); + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_arrays.adb" -- tests conversions + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end types; diff -Nru phcpack-2.4.84/src/Ada/CtoPHC/UPDATES phcpack-2.4.85/src/Ada/CtoPHC/UPDATES --- phcpack-2.4.84/src/Ada/CtoPHC/UPDATES 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/CtoPHC/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,69 @@ +Wed 16 Jun 2021 : new folder "Interface" with pure Ada code from "State". + +Mon 14 Jun 2021 : new folder "Types" with basic types from "Funky" + and the "assigments_in_ada_and_c" from "State". + +Wed 16 Mar 2005 : splitted directory into "Funky" and "State". + +Fri 25 Feb 2005 : numerous changes were made to use_c2phc, use_c2fac, + monodromy_permutations and sampling_operations for mpi2fac. + +Sun 20 Feb 2005 : added option 9 to use_c2phc to validate the solutions. + +Tue 15 Feb 2005 : fixed bug in monodromy_permutations.adb, touched + use_c2fac.adb only for printing diagnostics. + +Sun 7 Nov 2004 : changed phcpack_operations to define an output file, + modifications to phcpack_operations_io.adb, c_to_phcpack, use_c2phc. + +Tue 21 Sep 2004 : creates sampling_operations to use sampling_machine + in mpi2fac, also modified use_c2fac and use_c2phc + +Sun 19 Sep 2004 : created monodromy_permutations, changed use_c2fac, + use_c2phc, and their test programs, also phcpack_operations.adb. + +Thu 16 Sep 2004 : more changes in phcpack_operations, use_c2fac, and + use_c2phc to make one loop in the parallel monodromy. + +Wed 15 Sep 2004 : changes in phcpack_operations.adb for random gamma + +Mon 13 Sep 2004 : use_c2fac leads to changes in use_c2phc + +Sat 29 May 2004 : fixed pieri_homotopy.adb with corrected local + solutions for use with mixed pivots. + +Thu 27 May 2004 : fixed pieri_homotopy.adb with corrected locmaps + for use with top pivots. + +Tue 11 May 2004 : updated pieri_homotopy.adb to also deal with top + and mixed top+bottom Pieri homotopies. + +Wed 7 Jan 2004 : create use_c2pieri.ads, use_c2pieri.adb, tested + by ts_use_c2pieri.c + +Mon 5 Jan 2004 : created pieri_homotopy, tested by ts_pirhom.adb + +******************* after release of version 2.2 *************** + +Mon 14 July 2003 : changed solutions_container.adb to fix bug + +Wed 11 June 2003 : changed procedure c_to_phcpack into function + and created use_c2phc, bundling containers and c_to_phcpack, + the new test routine is ts_use_c2phc.c + +Tue 10 June 2003 : simplified interface of use_syscon and use_solcon + +Mon 9 June 2003 : upgraded use_solcon.ads and ts_use_solcon.c. + Creation of new package "assignments_in_ada_and_c", which also + changes use_syscon.adb. + +Fri 6 June 2003 : ts_use_syscon.c works fine, calls use_syscon (Ada), + which relies on the updated systems_container. + Added new entries in the READ_ME file. + +Thu 5 June 2003 : c_to_phcpack.ads and .adb changed, and also + ts_c2phc.c and phcpack_operations_io was updated. + Added systems_container and ts_syscon.adb. + +*** bookkeeping since release 2.2alpha on 30 May 2003 *** +*** most recent updates are inserted to the top of this file *** diff -Nru phcpack-2.4.84/src/Ada/Deformations/Continuation/continuation.gpr phcpack-2.4.85/src/Ada/Deformations/Continuation/continuation.gpr --- phcpack-2.4.84/src/Ada/Deformations/Continuation/continuation.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Continuation/continuation.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,53 @@ +project continuation is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Trackers", "../Sweep", "../../Tasking", + "../../CtoPHC/State", "../../Components/Samplers", + "../../Root_Counts/Symmetry", + "../../Components/Decomposition"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Trackers", "../Sweep", "../../Tasking", + "../../CtoPHC/State", "../../Components/Samplers", + "../../Root_Counts/Symmetry", + "../../Components/Decomposition"); + for Excluded_Source_Files use ("corecount.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_pactun.adb", -- tuning parameters via compact format + "ts_poco.adb", -- calls the polynomial continuation driver + "ts_bbpoco.adb" -- calls the blackbox continuation + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end continuation; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Continuation/myhomotopy.ads phcpack-2.4.85/src/Ada/Deformations/Continuation/myhomotopy.ads --- phcpack-2.4.84/src/Ada/Deformations/Continuation/myhomotopy.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Continuation/myhomotopy.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -with Generic_Inline_Homotopy; -with eval_homcyc7; - -package MyHomotopy is - new Generic_Inline_Homotopy(eval_homcyc7.Homotopy_Constants, - eval_homcyc7.Eval_Homotopy, - eval_homcyc7.Diff_Homotopy, - eval_homcyc7.Diff_Homotopy); diff -Nru phcpack-2.4.84/src/Ada/Deformations/Continuation/mypoco.adb phcpack-2.4.85/src/Ada/Deformations/Continuation/mypoco.adb --- phcpack-2.4.84/src/Ada/Deformations/Continuation/mypoco.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Continuation/mypoco.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -with text_io; use text_io; -with Timing_Package; use Timing_Package; -with Communications_with_User; use Communications_with_User; -with File_Scanning; use File_Scanning; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Complex_Norms_Equals; use Standard_Complex_Norms_Equals; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; -with Drivers_for_Homotopy_Creation; use Drivers_for_Homotopy_Creation; -with Increment_and_Fix_Continuation; use Increment_and_Fix_Continuation; -with Drivers_for_Poly_Continuation; use Drivers_for_Poly_Continuation; -with MyHomotopy; - -procedure mypoco is - - procedure Continue ( file : in file_type; sols : in out Solution_List; - report : in boolean; - target : in Complex_Number ) is - - -- DESCRIPTION : - -- Instantiates the path-trackers. - - timer : Timing_Widget; - - procedure Sil_Cont is - new Silent_Continue(Max_Norm, - MyHomotopy.Eval,MyHomotopy.Diff,MyHomotopy.Diff); - procedure Rep_Cont is - new Reporting_Continue(Max_Norm, - MyHomotopy.Eval,MyHomotopy.Diff,MyHomotopy.Diff); - - begin - tstart(timer); - if report - then Rep_Cont(file,sols,false,target); - else Sil_Cont(sols,false,target); - end if; - tstop(timer); - new_line(file); print_times(file,timer,"continuation"); - end Continue; - - procedure Main is - - infile,outfile : file_type; - found : boolean; - sols : Solution_List; - k : positive; - a,target : Complex_Number; - oc : natural; - report : boolean; - - begin - put_line - ("Polynomial Continuation with inline evaluators and differentiators."); - new_line; - put_line("Reading the name of the file where the start solutions are."); - Read_Name_and_Open_File(infile); - Scan_and_Skip(infile,"SOLUTIONS",found); - if found - then get(infile,sols); - else Reset(infile); - get(infile,sols); - end if; - new_line; - put_line("Reading the name of the output file."); - Read_Name_and_Create_File(outfile); - put_line(outfile,"THE START SOLUTIONS : "); - put(outfile,Length_Of(sols),Head_Of(sols).n,sols); new_line(outfile); - Default_Homotopy_Settings(k,a,target); - Menu_for_Homotopy_Settings(outfile,k,a,target); - MyHomotopy.Init(a,k); - new_line; - Driver_for_Continuation_Parameters(outfile); - new_line; - Driver_for_Process_io(outfile,oc); - report := not (oc = 0); - Continue(outfile,sols,report,target); - end Main; - -begin - Main; -end mypoco; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Continuation/READ_ME phcpack-2.4.85/src/Ada/Deformations/Continuation/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Continuation/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Continuation/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Data management and drivers for polynomial continuation in PHCv2.4.84 +Data management and drivers for polynomial continuation in PHCv2.4.85 In version 2.3.75, this directory was simplified with the moving of specific code for end games, sweeps, and path trackers to separate directories. @@ -29,6 +29,11 @@ 1. Increment-and-Fix continuation 2. Driver routines +Run "gprbuild continuation.gpr" to make all test programs. +On windows, type "gprbuild continuation.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean continuation.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Deformations/Continuation/UPDATES phcpack-2.4.85/src/Ada/Deformations/Continuation/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Continuation/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Continuation/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to continuation.gpr. + +Wed 9 Jun 2021 : defined continuation.gpr to build the test procedures. + Tue 23 Feb 2021 : updated ts_poco.adb for the renaming of the package drivers_for_poly_continuation into main_poly_continuation. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/curves.gpr phcpack-2.4.85/src/Ada/Deformations/Curves/curves.gpr --- phcpack-2.4.84/src/Ada/Deformations/Curves/curves.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/curves.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,68 @@ +project curves is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Sweep", + "../../Root_Counts/Product", "../../Tasking", "../../Main"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Sweep", + "../../Root_Counts/Product", "../../Tasking", "../../Main"); + for Excluded_Source_Files use ("corecount.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_durker.adb", -- tests polynomial equation solver + "ts_extrapol.adb", -- tests extrapolation + "ts_extrapts.adb", -- tests points on skew line + "ts_sernew.adb", -- tests the Newton series packages + "ts_sersol.adb", -- tests solution series + "ts_sernewcnv.adb", -- tests Newton power series convolutions + "ts_serhom.adb", -- tests series and homotopies + "ts_serpade.adb", -- tests rational approximations given series + "ts_ratapp.adb", -- calls the main test on rational approxs + "ts_fabryhom.adb", -- tests Newton-Fabry on a homotopy + "ts_hesscrit.adb", -- tests development of the Hessian criterion + "ts_hesspred.adb", -- tests step size based on nearest solution + "ts_hesspcnv.adb", -- tests Hessian criterion on convolutions + "ts_corcnv.adb", -- tests corrector convolutions + "ts_serpred.adb", -- tests series predictor + "ts_jacrabin.adb", -- tests the application of Rabinowitsch trick + "ts_padepred.adb", -- tests the Pade predictors + "ts_padepcnv.adb", -- tests Pade predictors for convolution circuits + "ts_predstep.adb", -- tests setting of step size + "ts_pcscnv.adb", -- tests predictor-corrector-shift step + "ts_scalecnv.adb", -- tests scaling of solutions + "ts_serpath.adb", -- tests series path tracker + "ts_nxtpadsol.adb", -- tests the get_next() trackers + "ts_wrappade.adb" -- tests the wrapping + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end curves; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/main_pade_trackers.adb phcpack-2.4.85/src/Ada/Deformations/Curves/main_pade_trackers.adb --- phcpack-2.4.84/src/Ada/Deformations/Curves/main_pade_trackers.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/main_pade_trackers.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,7 @@ with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Run_Power_Series_Methods; use Run_Power_Series_Methods; +with Main_Laurent_Series_Newton; use Main_Laurent_Series_Newton; with Regular_Newton_Puiseux; with Series_Path_Trackers; with Interactive_Pade_Trackers; @@ -234,7 +235,7 @@ nbtasks : in natural32; valprc : in character; vrb : in integer32 := 0 ) is - method : character; + method,ans : character; begin if vrb > 0 then @@ -243,7 +244,14 @@ method := Prompt_for_Method; case method is when '1' => Run_Regular_Newton_Puiseux(valprc); - when '2' => Run_Power_Series_Newton(infilename,outfilename,valprc,vrb-1); + when '2' => + new_line; + put("Run on Laurent series ? (y/n) "); Ask_Yes_or_No(ans); + if ans = 'y' then + Run_Laurent_Series_Newton(infilename,outfilename,vrb-1); + else + Run_Power_Series_Newton(infilename,outfilename,valprc,vrb-1); + end if; when '3' => Run_Path_Trackers(valprc,vrb-1); when '4' => Run_Path_Convolution_Trackers(nbtasks,valprc,vrb-1); when '5' => Run_Newton_Fabry(nbtasks,valprc,vrb-1); @@ -255,7 +263,7 @@ ( infilename,outfilename : in string; nbtasks : in natural32; vrb : in integer32 := 0 ) is - method : character; + method,ans : character; begin if vrb > 0 then @@ -264,7 +272,14 @@ method := Prompt_for_Method; case method is when '1' => Run_Regular_Newton_Puiseux; - when '2' => Run_Power_Series_Newton(infilename,outfilename,vrb-1); + when '2' => + new_line; + put("Run on Laurent series ? (y/n) "); Ask_Yes_or_No(ans); + if ans = 'y' then + Run_Laurent_Series_Newton(infilename,outfilename,vrb-1); + else + Run_Power_Series_Newton(infilename,outfilename,vrb-1); + end if; when '3' => Run_Path_Trackers(vrb-1); when '4' => Run_Path_Convolution_Trackers(nbtasks,vrb-1); when '5' => Run_Newton_Fabry(nbtasks,'0',vrb-1); @@ -272,7 +287,6 @@ end case; end Zero_Precision_Main; - procedure Main ( infilename,outfilename : in string; nbtasks : in natural32; precision : in character; verbose : in integer32 := 0 ) is diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/main_pade_trackers.ads phcpack-2.4.85/src/Ada/Deformations/Curves/main_pade_trackers.ads --- phcpack-2.4.84/src/Ada/Deformations/Curves/main_pade_trackers.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/main_pade_trackers.ads 2021-06-30 23:22:40.000000000 +0000 @@ -103,7 +103,9 @@ -- This main procedure is called when the precision is determined, -- either interactively or via the value of precision in valprc. -- The value for the precision in valprc is not '0', it is - -- '1' for double, '2' for double double, or '4' for quad double. + -- '1' for double, '2' for double double, '3' for quad double, + -- '4' for quad double, '5' for penta double, '6' for octo double, + -- or '7' for deca double, -- The procedure can be called immediately if the precision is -- set at the command line. @@ -129,7 +131,11 @@ -- '0' : the user will be prompted for the precision, -- '1' : standard double precision, -- '2' : double double precision, + -- '3' : triple double precision, -- '4' : quad double precision; + -- '5' : penta double precision; + -- '6' : octo double precision; + -- '7' : deca double precision; -- infilename name of the input file, if "", then the user will -- be prompted to provide the name of the input file; -- outfilename name of the output file, if "", then the user will diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/READ_ME phcpack-2.4.85/src/Ada/Deformations/Curves/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Curves/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Univariate solvers and algebraic curves in PHCpack version 2.4.83 +Univariate solvers and algebraic curves in PHCpack version 2.4.85 The numerical treatment of plane algebraic curves needs the solution of polynomial equations in one variable. To solve univariate polynomials, @@ -18,6 +18,11 @@ control and detection of the nearest singularity via the application of the theorem of Fabry. +Run "gprbuild curves.gpr" to make all test programs. +On windows, type "gprbuild curves.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean curves.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/series_path_trackers.adb phcpack-2.4.85/src/Ada/Deformations/Curves/series_path_trackers.adb --- phcpack-2.4.84/src/Ada/Deformations/Curves/series_path_trackers.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/series_path_trackers.adb 2021-06-30 23:22:40.000000000 +0000 @@ -837,7 +837,7 @@ begin new_line; put("Let us define a partition of "); put(nvr,1); - put(" variabes, of size "); put(mhom,1); put_line(" ..."); + put(" variables, of size "); put(mhom,1); put_line(" ..."); declare res : constant Standard_Natural_Vectors.Vector(1..integer32(nvr)) := Partitions_of_Sets_of_Unknowns_io.iget(mhom); diff -Nru phcpack-2.4.84/src/Ada/Deformations/Curves/UPDATES phcpack-2.4.85/src/Ada/Deformations/Curves/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Curves/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Curves/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,12 @@ +Fri 18 Jun 2021 : extended main_pade_trackers, to prompt the user for the + Laurent series option to run Newton's method at a series. + Updated the documentation in main_pade_trackers.ads for the extended + precision levels: triple, penta, octo, and deca double precision. + +Thu 10 Jun 2021 : added the exec_dir attribute to curves.gpr. + +Wed 9 Jun 2021 : defined curves.gpr to build the test procedures. + Tue 15 Dec 2020 : in {trip,pent,octo,deca}dobl_newton_matrix_series.adb, applied the echelon solvers for linear systems. diff -Nru phcpack-2.4.84/src/Ada/Deformations/deformations.gpr phcpack-2.4.85/src/Ada/Deformations/deformations.gpr --- phcpack-2.4.84/src/Ada/Deformations/deformations.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/deformations.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,15 @@ +aggregate project deformations is + + for Project_Files use + ( + "Solutions/solutions.gpr", -- solutions of systems + "Homotopy/homotopy.gpr", -- homotopies, scaling, reduction + "Newton/newton.gpr", -- Newton's method and deflation + "Curves/curves.gpr", -- algebraic space curves + "End_Games/end_games.gpr", -- polyhedral end games + "Trackers/trackers.gpr", -- path trackers + "Sweep/sweep.gpr", -- sweeping for singularities + "Continuation/continuation.gpr" -- main continuation + ); + +end deformations; diff -Nru phcpack-2.4.84/src/Ada/Deformations/End_Games/end_games.gpr phcpack-2.4.85/src/Ada/Deformations/End_Games/end_games.gpr --- phcpack-2.4.84/src/Ada/Deformations/End_Games/end_games.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/End_Games/end_games.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,42 @@ +project end_games is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_vlprs.adb" -- tests extrapolation on generated series + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end end_games; diff -Nru phcpack-2.4.84/src/Ada/Deformations/End_Games/multprec_directions_of_paths.adb phcpack-2.4.85/src/Ada/Deformations/End_Games/multprec_directions_of_paths.adb --- phcpack-2.4.84/src/Ada/Deformations/End_Games/multprec_directions_of_paths.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/End_Games/multprec_directions_of_paths.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,676 +0,0 @@ -with integer_io; use integer_io; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Mathematical_Functions; use Standard_Mathematical_Functions; -with Standard_Floating_Vectors_io; use Standard_Floating_Vectors_io; -with Standard_Floating_Matrices; use Standard_Floating_Matrices; -with Standard_Floating_Matrices_io; use Standard_Floating_Matrices_io; -with Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with vLpRs_Algorithm; use vLpRs_Algorithm; - -package body Multprec_Directions_of_Paths is - --- AUXILIARY : - - function Norm1 ( x : Standard_Floating_Vectors.Vector ) return double_float is - - res : double_float := 0.0; - - begin - for i in x'range loop - res := res + abs(x(i)); - end loop; - return res; - end Norm1; - - procedure Shift_Up ( v : in out Standard_Floating_Vectors.Vector; - x : in double_float ) is - - -- DESCRIPTION : - -- Puts x at v(v'first) after a shift-up: v(i+1) := v(i). - - begin - for i in reverse v'first..(v'last-1) loop - v(i+1) := v(i); - end loop; - v(v'first) := x; - end Shift_Up; - --- FIRST ORDER EXTRAPOLATION : - - procedure Affine_Update_Direction - ( t,prev_t,target : in Complex_Number; - x,prevx : in Standard_Complex_Vectors.Vector; - prevdls,prevstep : in out double_float; - prevdiff,v : in out Standard_Floating_Vectors.Vector ) is - - newdls : double_float; - newstep : double_float := AbsVal(t-prev_t); - newdiff : Standard_Floating_Vectors.Vector(prevdiff'range); - ratio,factor : double_float; - - begin - for i in v'range loop - newdiff(i) := LOG10(AbsVal(x(i))) - LOG10(AbsVal(prevx(i))); - end loop; - newdls := LOG10(AbsVal(target-prev_t)) - LOG10(AbsVal(target-t)); - if prevdls /= 0.0 - then ratio := prevstep/newstep; - factor := prevdls - ratio*newdls; - for i in v'range loop - v(i) := (prevdiff(i) - ratio*newdiff(i))/factor; - end loop; - end if; - prevdiff := newdiff; - prevstep := newstep; - prevdls := newdls; - end Affine_Update_Direction; - - procedure Projective_Update_Direction - ( t,prev_t,target : in Complex_Number; - x,prevx : in Standard_Complex_Vectors.Vector; - prevdls,prevstep : in out double_float; - prevdiff,v : in out Standard_Floating_Vectors.Vector ) is - - newdls : double_float; - newstep : double_float := AbsVal(t-prev_t); - newdiff : Standard_Floating_Vectors.Vector(prevdiff'range); - ratio,factor : double_float; - - begin - for i in v'range loop - newdiff(i) := ( LOG10(AbsVal(x(i))) - LOG10(AbsVal(x(x'last))) ) - - ( LOG10(AbsVal(prevx(i))) - LOG10(AbsVal(prevx(prevx'last))) ); - end loop; - newdls := LOG10(AbsVal(target-prev_t)) - LOG10(AbsVal(target-t)); - if prevdls /= 0.0 - then ratio := prevstep/newstep; - factor := prevdls - ratio*newdls; - for i in v'range loop - v(i) := (prevdiff(i) - ratio*newdiff(i))/factor; - end loop; - end if; - prevdiff := newdiff; - prevstep := newstep; - prevdls := newdls; - end Projective_Update_Direction; - --- DATA MANAGEMENT FOR HIGHER-ORDER EXTRAPOLATION : - - procedure Extrapolation_Window - ( r,m : in natural; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx : in out VecVec ) is - - -- DESCRIPTION : - -- The data (dt,s,logs and logx) are stored as in a window: when - -- full at the incoming of a new element, all elements are shifted - -- and the oldest element drops off. - - use Standard_Floating_Vectors; - - begin - if (r = s'last) and (logx(r) /= null) - then for i in s'first+1..s'last loop -- shift the data - s(i-1) := s(i); - dt(i-1) := dt(i); - logs(i-1) := logs(i); - logx(i-1).all := logx(i).all; - end loop; - end if; - dt(r) := (AbsVal(target-t)); - s(r) := (dt(r))**(1.0/double_float(m)); - logs(r) := LOG10(s(r)); - end Extrapolation_Window; - - procedure Refresh_Window - ( r,m : in natural; dt : in Standard_Floating_Vectors.Vector; - s,logs : in out Standard_Floating_Vectors.Vector ) is - - -- DESCRIPTION : - -- Recomputes s and logs, after m has been changed. - - begin - for i in s'first..r loop - s(i) := (dt(i))**(1.0/double_float(m)); - logs(i) := LOG10(s(i)); - end loop; - end Refresh_Window; - - procedure Write_Update_Information - ( file : in file_type; r,m : in natural; - s,logs : in double_float; - logx : in Standard_Floating_Vectors.Vector ) is - - -- DESCRIPTION : - -- Writes r, s, log(s) and log|x(s)| on file. - -- The current version only writes a banner with r and m. - - begin - put(file,"extrapolation with r = "); put(file,r,1); - put(file," and m = "); put(file,m,1); --put_line(file," : "); - -- put(file,"m : "); put(file,s); - -- put(file," log(s) : "); put(file,logs); - -- put(file," log|x(s)| : "); - -- put(file,logx); - -- for i in logx'range loop - -- put(file,logx(i)); - -- end loop; - new_line(file); - end Write_Update_Information; - - procedure Affine_Update_Extrapolation_Data - ( r,m : in natural; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx,wvl0,wvl1,wvltmp : in out VecVec ) is - - -- DESCRIPTION : - -- Updates the data needed to extrapolate in the affine case. - - use Standard_Floating_Vectors; - - begin - Extrapolation_Window(r,m,t,target,x,dt,s,logs,logx); - if logx(r) = null - then logx(r) := new Standard_Floating_Vectors.Vector(x'range); - end if; - if r > 0 - then - if wvl0(r) = null - then wvl0(r) := new Standard_Floating_Vectors.Vector'(x'range => 0.0); - wvl1(r) := new Standard_Floating_Vectors.Vector'(x'range => 0.0); - wvltmp(r) := new Standard_Floating_Vectors.Vector'(x'range => 0.0); - end if; - end if; - for i in x'range loop - logx(r)(i) := LOG10(AbsVal(x(i))); - end loop; - end Affine_Update_Extrapolation_Data; - - procedure Projective_Update_Extrapolation_Data - ( r,m : in natural; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx : in out VecVec ) is - - -- DESCRIPTION : - -- Updates the data needed to extrapolate in the projective case, - -- under the assumption that the homogenization variable appears lastly. - - use Standard_Floating_Vectors; - - begin - Extrapolation_Window(r,m,t,target,x,dt,s,logs,logx); - if logx(r) = null - then logx(r) := new Standard_Floating_Vectors.Vector(x'first..x'last-1); - end if; - for i in x'first..x'last-1 loop - logx(r)(i) := LOG10(AbsVal(x(i))) - LOG10(AbsVal(x(x'last))); - end loop; - end Projective_Update_Extrapolation_Data; - - procedure Update_Errors - ( r : in natural; - errorv : in out Standard_Floating_Vectors.Vector; - error : out double_float; wvl0,wvl1,wvltmp : in out VecVec ) is - - -- DESCRIPTION : - -- Updates the error computation after the extrapolation. - - -- REQUIRED : r >= 1. - - begin - if r = 1 - then for i in errorv'range loop - errorv(i) := abs(wvltmp(r)(i) - wvl1(r)(i)); - end loop; - else for i in errorv'range loop - errorv(i) := abs(wvltmp(r-1)(i) - wvl1(r-1)(i)); - end loop; - end if; - error := Norm1(errorv); - for i in 1..r loop - wvl0(i).all := wvl1(i).all; - wvl1(i).all := wvltmp(i).all; - end loop; - end Update_Errors; - --- ESTIMATING THE CYCLE NUMBER : - - procedure Frequency_of_Estimate - ( newest,max : in natural; m,estm,cnt : in out natural; - eps : in double_float; newm : out boolean ) is - - -- DESCRIPTION : - -- This procedure manages the frequencies of the estimated values for m. - -- Only after the same estimate has been found a certain number of - -- times, the new estimate will be accepted. - -- The current version does not take the accuracy eps into account. - - -- ON ENTRY : - -- newest newly computed estimate for m; - -- max threshold on cnt before estm is returned; - -- m current value of m; - -- estm previous estimate; - -- cnt number of consecutive guesses that yielded estm; - -- eps accuracy of the current estimate. - - -- ON RETURN : - -- m new value of m; - -- estm new estimate; - -- cnt updated number of consecutive guesses that yielded estm; - -- newm true if m has changed. - - begin - if cnt = 0 -- initial estimate - then estm := newest; - cnt := 1; - elsif newest = estm -- update frequency for current estimate - then cnt := cnt + 1; - else cnt := 1; -- new estimate found - estm := newest; - end if; - if estm /= m -- look for modification of current cycle number - then if (cnt >= max) --and (eps <= 0.1) - then m := estm; - newm := true; - else newm := false; - end if; - else newm := false; - end if; - end Frequency_of_Estimate; - - procedure Extrapolate_on_Errors - ( file : in file_type; - r : in integer; h : in double_float; - err : in Standard_Floating_Vectors.Vector; - estm : out double_float ) is - - -- DESCRIPTION : - -- Performs an rth-order extrapolation on the errors. - - -- ON ENTRY : - -- file to write intermediate results on; - -- r order of the extrapolation method; - -- h ratio in geometric sequence; - -- err vector of range 0..r+1 with differences of estimates for - -- the outer normal, the most recent error is err(0). - - -- ON RETURN : - -- extm estimated value for m. - - em,hm,exterr : Standard_Floating_Vectors.Vector(1..r+1); - dlog : constant double_float := log10(h); - f : double_float; - - begin - for j in exterr'range loop - exterr(j) := log10(err(j-1)) - log10(err(j)); - end loop; - em(1) := dlog/exterr(1); -- 0th order estimate - -- if (m(1) < 0.0001) or (m(1) > 1000.0) -- avoid divergence - -- then m(r+1) := m(1); - -- else - hm(1) := h**(1.0/em(1)); - for k in 1..r loop - f := hm(k) - 1.0; - for j in 1..r-k+1 loop - exterr(j) := exterr(j+1) + (exterr(j+1) - exterr(j))/f; - end loop; - em(k+1) := dlog/exterr(1); - -- exit when ((m(k+1) < 0.0001) or (m(k+1) > 1000.0)); - hm(k+1) := h**(double_float(k+1)/em(k+1)); - end loop; - -- end if; - estm := em(r+1); - put(file,"em(0.."); put(file,r,1); put(file,") : "); - for i in em'range loop - put(file,em(i),3,3,3); - end loop; - new_line(file); - exception - when others => null; - end Extrapolate_on_Errors; - - procedure Estimate0 - ( r,max : in natural; m,estm,cnt : in out natural; - dt : in Standard_Floating_Vectors.Vector; - err,newerr : in double_float; rat,eps : out double_float; - newm : out boolean ) is - - -- DESCRIPTION : - -- Returns an 0th-order estimate of the cycle number m. - - -- ON ENTRY : - -- r extrapolation order; - -- max threshold on cnt before estm is returned; - -- m current value of m; - -- estm previous estimate; - -- cnt number of consecutive guesses that yielded estm; - -- dt consecutive distances to the target; - -- err previous error; - -- newerr current error. - - -- ON RETURN : - -- m new value of m; - -- estm new estimate; - -- cnt updated number of consecutive guesses that yielded estm; - -- rat ratio used to estimate m; - -- eps accuracy of the rounding value for m; - -- newm true if m has changed. - - dferr : constant double_float := log10(newerr) - log10(err); - h : constant double_float := dt(r)/dt(r-1); - dfsr1 : constant double_float := log10(h); - ratio : constant double_float := abs(dfsr1/dferr); - res : natural := integer(ratio); - accuracy : constant double_float := abs(double_float(res) - ratio); - - begin - if res = 0 - then res := 1; - end if; - Frequency_of_Estimate(res,max,m,estm,cnt,accuracy,newm); - rat := ratio; eps := accuracy; - end Estimate0; - - procedure Estimate - ( file : in file_type; r : in integer; - max : in natural; m,estm,cnt : in out natural; - h : in double_float; - diferr : in Standard_Floating_Vectors.Vector; - rat,eps : out double_float; newm : out boolean ) is - - -- DESCRIPTION : - -- Estimates m by extrapolation on consecutvie differences of errors, - -- stored in the parameter diferr. For the specfication of the other - -- parameters, see the procedure Estimate0. - - res : integer; - fltestm,accuracy : double_float; - - begin - -- if r < dt'last - -- then Extrapolate_on_Errors(file,r-1,h,diferr(0..r),fltestm); - -- else - Extrapolate_on_Errors(file,r,h,diferr(0..r+1),fltestm); - -- end if; - res := integer(fltestm); - if res <= 0 - then res := 1; - end if; - accuracy := abs(double_float(res) - fltestm); - Frequency_of_Estimate(res,max,m,estm,cnt,accuracy,newm); - rat := fltestm; eps := accuracy; - end Estimate; - --- APPLYING THE vLpRs-Algorithm : - - function vLpRs_Extrapolate - ( r : natural; s,logs : Standard_Floating_Vectors.Vector; - logx : VecVec ) - return Standard_Floating_Vectors.Vector is - - -- DESCRIPTION : - -- Higher-order extrapolation is based on vLpRs-Algorithm. - - -- REQUIRED : r >= 1. - - res : Standard_Floating_Vectors.Vector(logx(r).all'range); - logx1 : Standard_Floating_Vectors.Vector(0..r); - rt1,rt2 : Matrix(1..r-1,1..r-1); - srp,dsp : Standard_Floating_Vectors.Vector(1..r-1) := (0..r-1 => 0.0); - p : Standard_Floating_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); - l,v : Standard_Floating_Vectors.Vector(0..r) := (0..r => 1.0); - - begin - rt1(1,1) := 0.0; rt2(1,1) := 0.0; - for i in res'range loop - for j in logx1'range loop - logx1(j) := logx(j)(i); - end loop; - vLpRs_full(r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); - res(i) := v(r)/l(r); - end loop; - return res; - end vLpRs_Extrapolate; - - function vLpRs_Extrapolate - ( file : file_type; r : natural; - s,logs : Standard_Floating_Vectors.Vector; logx : VecVec ) - return Standard_Floating_Vectors.Vector is - - -- DESCRIPTION : - -- Higher-order extrapolation based on vLpRs-Algorithm. - - -- REQUIRED : r >= 1. - - res : Standard_Floating_Vectors.Vector(logx(r).all'range); - logx1 : Standard_Floating_Vectors.Vector(0..r); - rt1,rt2 : Matrix(1..r-1,1..r-1); - srp,dsp : Standard_Floating_Vectors.Vector(1..r-1) := (0..r-1 => 0.0); - p : Standard_Floating_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); - l,v : Standard_Floating_Vectors.Vector(0..r) := (0..r => 0.0); - - begin - for i in rt1'range(1) loop - for j in rt1'range(2) loop - rt1(i,j) := 0.0; rt2(i,j) := 0.0; - end loop; - end loop; - for i in res'range loop - for j in logx1'range loop - logx1(j) := logx(j)(i); - end loop; - vLpRs_pipe(file,r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); - res(i) := v(r)/l(r); - end loop; - return res; - end vLpRs_Extrapolate; - - procedure vLpRs_Extrapolate - ( file : in file_type; r : in natural; - s,logs : in Standard_Floating_Vectors.Vector; - logx,wvl0 : in VecVec; wvl1 : in out VecVec; - w,wv,wl : out Standard_Floating_Vectors.Vector ) is - - -- DESCRIPTION : - -- Higher-order extrapolation based on vLpRs-Algorithm, - -- writes an error table on file. - - -- REQUIRED : r >= 1. - - n : constant natural := logx(r)'length; - logx1 : Standard_Floating_Vectors.Vector(0..r); - rt1,rt2 : Matrix(1..r-1,1..r-1); - srp,dsp : Standard_Floating_Vectors.Vector(1..r-1) := (1..r-1 => 0.0); - p : Standard_Floating_Vectors.Vector(0..r-1) := (0..r-1 => 0.0); - l,v : Standard_Floating_Vectors.Vector(0..r) := (0..r => 0.0); - error : Standard_Floating_Vectors.Vector(1..r) := (1..r => 0.0); - - begin - for i in rt1'range(1) loop - for j in rt1'range(2) loop - rt1(i,j) := 0.0; rt2(i,j) := 0.0; - end loop; - end loop; - for i in logx(r)'range loop - for j in logx1'range loop - logx1(j) := logx(j)(i); - end loop; - vLpRs_pipe(file,r,s(0..r),logs(0..r),logx1(0..r),srp,dsp,p,l,v,rt1,rt2); - w(i) := v(r)/l(r); - put(file,s(r),2,3,3); - for j in 1..r loop - wvl1(j)(i) := v(j)/l(j); - error(j) := abs(wvl1(j)(i)-wvl0(j)(i)); - put(file,error(j),2,3,3); - end loop; - new_line(file); - end loop; - wv := v; wl := l; - end vLpRs_Extrapolate; - --- HIGHER-ORDER EXTRAPOLATION (target routines) : - - procedure Affine_Update_Direction - ( r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx,wvl0,wvl1,wvltmp : in out VecVec; - v,diferr : in out Standard_Floating_Vectors.Vector; - error : in out double_float ) is - - use Standard_Floating_Vectors; - res : Standard_Floating_Vectors.Vector(v'range); - eps,newerr : double_float; - newm : boolean := false; - - begin - Affine_Update_Extrapolation_Data - (r,m,t,target,x,dt,s,logs,logx,wvl0,wvl1,wvltmp); - if r >= 1 - then res := vLpRs_Extrapolate(r,s,logs,logx); - newerr := Norm1(res-v); - end if; - if r < s'last - then r := r+1; - end if; - if r >= 3 and (newerr < error) - then --Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); - if newm - then res := vLpRs_Extrapolate(r,s,logs,logx); - newerr := Norm1(res-v); - end if; - end if; - if r >= 1 - then v := res; - error := newerr; - end if; - end Affine_Update_Direction; - - procedure Affine_Update_Direction - ( file : in file_type; - r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx,wvl0,wvl1,wvltmp : in out VecVec; - v,diferr : in out Standard_Floating_Vectors.Vector; - error : in out double_float ) is - - use Standard_Floating_Vectors; - res,errorv,newerrv : Standard_Floating_Vectors.Vector(v'range); - wv,wl : Standard_Floating_Vectors.Vector(0..r); - ind : natural := 1; -- errors based on first-order extrapolation - rat,eps,newerr : double_float; - mv,cntmv,estmv : Standard_Integer_Vectors.Vector(v'range); - newm : boolean := false; - - begin - Affine_Update_Extrapolation_Data - (r,m,t,target,x,dt,s,logs,logx,wvl0,wvl1,wvltmp); - Write_Update_Information(file,r,m,s(r),logs(r),logx(r).all); - if r >= 1 - then vLpRs_Extrapolate(file,r,s,logs,logx,wvl1,wvltmp,res,wv,wl); - if r = 1 then diferr(0) := 1.0; end if; - for i in errorv'range loop - errorv(i) := abs(wvltmp(ind)(i) - wvl1(ind)(i)); - end loop; - Shift_Up(diferr,Norm1(errorv)); - if er < diferr'last-1 then er := er+1; end if; - end if; - if er >= 1 and (diferr(0) < diferr(1)) - then-- Estimate0(r,thresm,m,estm,cntm,diferr(1),diferr(0),rat,eps,newm); - Estimate(file,er,thresm,m,estm,cntm,dt(r)/dt(r-1), - diferr,rat,eps,newm); - put(file,"Ratio for m : "); put(file,rat,3,3,3); - put(file," and accuracy : "); put(file,eps,3,3,3); new_line(file); - if newm - then Refresh_Window(r,m,dt,s,logs); - put_line(file,"Extrapolation after adjusting the m-value :"); - vLpRs_Extrapolate(file,r,s,logs,logx,wvl1,wvltmp,res,wv,wl); - for i in errorv'range loop - errorv(i) := abs(wvltmp(ind)(i) - wvl1(ind)(i)); - end loop; - Shift_Up(diferr,Norm1(errorv)); er := -2; - put(file,"old direction : "); put(file,v); new_line(file); - put(file,"new direction : "); put(file,res); new_line(file); - end if; - end if; - if r >= 1 - then v := res; - Update_Errors(r,errorv,error,wvl0,wvl1,wvltmp); - end if; - if r < s'last then r := r+1; end if; - end Affine_Update_Direction; - - procedure Projective_Update_Direction - ( r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx : in out VecVec; - prevv,v : in out Standard_Floating_Vectors.Vector; - error : in out double_float ) is - - use Standard_Floating_Vectors; - res : Standard_Floating_Vectors.Vector(v'range); - eps,newerr : double_float; - newm : boolean := false; - - begin - Projective_Update_Extrapolation_Data(r,m,t,target,x,dt,s,logs,logx); - if r >= 1 - then res := vLpRs_Extrapolate(r,s,logs,logx); - error := Norm1(res-prevv); newerr := Norm1(res-v); - prevv := v; - v := res; - end if; - -- if r >= 2 and (newerr < error) - -- then Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); - -- end if; - if r < s'last - then r := r+1; - end if; - error := newerr; - end Projective_Update_Direction; - - procedure Projective_Update_Direction - ( file : in file_type; - r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Standard_Complex_Vectors.Vector; - dt,s,logs : in out Standard_Floating_Vectors.Vector; - logx : in out VecVec; - prevv,v : in out Standard_Floating_Vectors.Vector; - error : in out double_float ) is - - use Standard_Floating_Vectors; - res : Standard_Floating_Vectors.Vector(v'range); - eps,newerr : double_float; - newm : boolean := false; - - begin - Projective_Update_Extrapolation_Data(r,m,t,target,x,dt,s,logs,logx); - Write_Update_Information(file,r,m,s(r),logs(r),logx(r).all); - if r >= 1 - then res := vLpRs_Extrapolate(file,r,s,logs,logx); - error := Norm1(res-prevv); - newerr := Norm1(res-v); - prevv := v; - v := res; - end if; - if r < s'last - then r := r+1; - end if; - -- if r >= 2 and (newerr < error) - -- then Estimate(r,r,thresm,m,estm,cntm,dt,s,logs,error,newerr,eps,newm); - -- end if; - error := newerr; - end Projective_Update_Direction; - -end Multprec_Directions_of_Paths; diff -Nru phcpack-2.4.84/src/Ada/Deformations/End_Games/multprec_directions_of_paths.ads phcpack-2.4.85/src/Ada/Deformations/End_Games/multprec_directions_of_paths.ads --- phcpack-2.4.84/src/Ada/Deformations/End_Games/multprec_directions_of_paths.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/End_Games/multprec_directions_of_paths.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,134 +0,0 @@ -with text_io; use text_io; -with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; -with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; -with Multprec_Floating_Vectors; -with Multprec_Complex_Vectors; -with Multprec_Floating_VecVecs; use Multprec_Floating_VecVecs; - -package Multprec_Directions_of_Paths is - --- DESCRIPTION : --- This package provides some routines to estimate numerically the direction --- of a solution path diverging to a solution of a face system. - - procedure Affine_Update_Direction - ( t,prev_t,target : in Complex_Number; - x,prevx : in Multprec_Complex_Vectors.Vector; - prevdls,prevstep : in out Floating_Number; - prevdiff,v : in out Multprec_Floating_Vectors.Vector ); - - -- DESCRIPTION : - -- Computes an approximation of the direction of the path. - -- When prevdls /= 0.0, a second-order extrapolation will be applied. - - -- ON ENTRY : - -- t current value of continuation parameter; - -- prev_t previous value of continuation parameter; - -- target target value of continuation parameter; - -- x current solution vector; - -- prevx solution vector for previous value of continuation parameter; - -- prevdls previous difference of the logs of distances to target; - -- prevstep previous step size; - -- prevdiff previous difference of the logs of the solution vectors; - -- v current approximate direction of the path. - - procedure Projective_Update_Direction - ( t,prev_t,target : in Complex_Number; - x,prevx : in Multprec_Complex_Vectors.Vector; - prevdls,prevstep : in out Floating_Number; - prevdiff,v : in out Multprec_Floating_Vectors.Vector ); - - -- DESCRIPTION : - -- Does the same as the other procedure, under the assumption that the - -- solution vector lies in projective space. - - -- REQUIRED : - -- The homogenization variable is the last element of the solution vector. - - procedure Affine_Update_Direction - ( r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Multprec_Complex_Vectors.Vector; - dt,s,logs : in out Multprec_Floating_Vectors.Vector; - logx,wvl0,wvl1,wvltmp : in out VecVec; - v,diferr : in out Multprec_Floating_Vectors.Vector; - error : in out Floating_Number ); - - procedure Affine_Update_Direction - ( file : in file_type; - r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Multprec_Complex_Vectors.Vector; - dt,s,logs : in out Multprec_Floating_Vectors.Vector; - logx,wvl0,wvl1,wvltmp : in out VecVec; - v,diferr : in out Multprec_Floating_Vectors.Vector; - error : in out Floating_Number ); - - -- DESCRIPTION : - -- Higher-order extrapolation method that produces direction with error of - -- order (t-target)^r, when the solution path converges to regular solution - -- in affine space. - - -- REQUIRED : s'range = logs'range = logx'range = 0..max, - -- wvl'range = 1..max, logx(i)'range = wvl'range(i) = 1..n, - -- diferr'range = 0..max, max >= 1, equals maximal order of extrapolator. - - -- ON ENTRY : - -- file to write intermediate data, if not submitted, no output; - -- r last meaningful entry in logx and logs; - -- m current value for multiplicity; - -- estm current estimate for multiplicity; - -- cntm number of consecutive times estm has been guessed; - -- thresm threshold for changing the m to estm; - -- er order of extrapolator on the errors; - -- t current value of continuation parameter; - -- target target value of continuation parameter; - -- x current solution for t; - -- dt consecutive distances of t-values to target value; - -- s consecutive s-values, with proper value for m; - -- logs logarithms of previous values (target - t); - -- logx logarithms of previous solution vectors; - -- wvl0 previous consecutive estimates for direction; - -- wvl1 current consecutive estimates for direction; - -- wvltmp work space for updating wvl0 and wvl1. - - -- ON RETURN : - -- r if r < logs'last, then r will be raised by one, - -- otherwise r remains unchanged; - -- s updated distance vector; - -- logs updated vector of logarithms of distances to target; - -- logx updated vector of solution vectors; - -- wvl0 updated previous consecutive estimates, equals wvl1; - -- wvl1 updated current consecutive estimates for direction; - -- v estimated direction of path; - -- diferr norms of consecutive differences of estimates for v; - -- error norm of errorv; - - procedure Projective_Update_Direction - ( r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Multprec_Complex_Vectors.Vector; - dt,s,logs : in out Multprec_Floating_Vectors.Vector; - logx : in out VecVec; - prevv,v : in out Multprec_Floating_Vectors.Vector; - error : in out Floating_Number ); - - procedure Projective_Update_Direction - ( file : in file_type; - r,m,estm,cntm : in out natural; thresm : in natural; - er : in out integer; t,target : in Complex_Number; - x : in Multprec_Complex_Vectors.Vector; - dt,s,logs : in out Multprec_Floating_Vectors.Vector; - logx : in out VecVec; - prevv,v : in out Multprec_Floating_Vectors.Vector; - error : in out Floating_Number ); - - -- DESCRIPTION : - -- Higher-order extrapolation method that produces direction with error of - -- order (t-target)^r, when the solution path converges to regular solution - -- in affine space. - - -- REQUIRED : - -- x(x'last) contains value of variable introduced to homogenize the system. - -end Multprec_Directions_of_Paths; diff -Nru phcpack-2.4.84/src/Ada/Deformations/End_Games/READ_ME phcpack-2.4.85/src/Ada/Deformations/End_Games/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/End_Games/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/End_Games/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,9 +1,14 @@ -Polyhedral end games for polynomial homotopies in PHCv2.4.82 +Polyhedral end games for polynomial homotopies in PHCv2.4.85 This directory was isolated in version 2.3.75 for clarity. New in release 2.3 is Newton's method with deflation for singularities and improved endgame routines based on extrapolation methods. +Run "gprbuild end_games.gpr" to make all test programs. +On windows, type "gprbuild end_games.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean end_games.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Deformations/End_Games/UPDATES phcpack-2.4.85/src/Ada/Deformations/End_Games/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/End_Games/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/End_Games/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to end_games.gpr. + +Wed 9 Jun 2021 : defined end_games.gpr to build the test procedures. + Sun 8 Nov 2020 : updated driver_for_winding_numbers.adb for the renaming of drivers_for_poly_continuation into main_poly_continuation. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/homotopy.gpr phcpack-2.4.85/src/Ada/Deformations/Homotopy/homotopy.gpr --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/homotopy.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/homotopy.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,55 @@ +project homotopy is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Newton", "../Curves", + "../../Root_Counts/Product"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Newton", "../Curves", + "../../Root_Counts/Product"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_qdhom.adb", -- compares eval & diff for dd & qd + "ts_homotopy.adb", -- runs tests on homotopies + "ts_evalhomt.adb", -- tests coefficient homotopies + "ts_scalplane.adb", -- tests scaling last hyperplane + "ts_multproj.adb", -- tests multi-homogenization + "ts_scal.adb", -- simple test program on scaling + "ts_mainscal.adb", -- calls main scaling procedures + "ts_reduce.adb", -- calls a main reduction procedure + "ts_linsol.adb", -- tests the linear poly solvers + "ts_poldrop.adb", -- interactive test on dropping of coordinates + "ts_vmphom.adb", -- test variable precision homotopies + "ts_homcnv.adb" -- tests convolution circuits for homotopies + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end homotopy; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/mainfilt.ads phcpack-2.4.85/src/Ada/Deformations/Homotopy/mainfilt.ads --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/mainfilt.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/mainfilt.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -procedure mainfilt ( infilename,outfilename : in string ); - --- DESCRIPTION : --- This routines is called by the central dispatcher of PHCpack to --- filter solution lists subject to criteria provided by the user. --- The arguments are the respective names of the input and output files. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/READ_ME phcpack-2.4.85/src/Ada/Deformations/Homotopy/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Homotopies, scaling and reduction in PHCv2.4.82 +Homotopies, scaling and reduction in PHCv2.4.85 The Creators in the package Homotopy allow more accessibility constants for the Cheater's homotopy. A multiprecision version of the homotopy package @@ -8,6 +8,12 @@ This library is organized in three parts: 1) Homotopy with homogenization 2) Scaling and reduction of polynomial systems. +3) Encapsulation of convolution circuits. + +Run "gprbuild homotopy.gpr" to make all test programs. +On windows, type "gprbuild homotopy.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean homotopy.gpr" removes all files created by gprbuild. ------------------------------------------------------------------------------ file name : short description diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/UPDATES phcpack-2.4.85/src/Ada/Deformations/Homotopy/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to homotopy.gpr. + +Wed 9 Jun 2021 : defined homotopy.gpr to build the test procedures. + Sun 29 Nov 2020 : renamed drivers_for_scaling into scaling_methods. Reworked the procedure mainenum into the package main_scaling. Renamed ts_drivscal.adb into ts_mainscal.adb. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/weighted_projective_transfos.adb phcpack-2.4.85/src/Ada/Deformations/Homotopy/weighted_projective_transfos.adb --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/weighted_projective_transfos.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/weighted_projective_transfos.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; - -package body Weighted_Projective_Transfos is - - function Projective_Transformation ( p : Poly; q : Vector ) return Poly is - - deg : Degrees := new Vector(q'first..q'last+1); - res : Poly := Null_Poly; - - procedure Embed_Term ( t : in Term; continue : out boolean ) is - - ht : Term; - sum : natural := 0; - - begin - ht.cf := t.cf; - deg(t.dg'range) := t.dg.all; - deg(deg'last) := t.dg.all*q; - ht.dg := deg; - Add(res,ht); - continue := true; - end Embed_Term; - procedure Embed_Terms is new Visiting_Iterator(Embed_Term); - - begin - Embed_Terms(p); - Clear(deg); - return res; - end Projective_Transformation; - - procedure Projective_Transformation ( p : in out Poly; q : in Vector ) is - - res : Poly := Projective_Transformation(p,q); - - begin - Copy(res,p); Clear(res); - end Projective_Transformation; - - function Projective_Transformation - ( p : Laur_Sys; q : Vector ) return Laur_Sys is - - res : Laur_Sys(p'range); - - begin - for k in p'range loop - res(k) := Projective_Transformation(p(k),q); - end loop; - return res; - end Projective_Transformation; - - procedure Projective_Transformation ( p : in out Laur_Sys; q : in Vector ) is - begin - for k in p'range loop - Projective_Transformation(p(k),q); - end loop; - end Projective_Transformation; - - function Affine_Transformation ( s : Solution; q : Vector ) return Solution is - - n : natural := s.n; - r : Solution(n-1); - absvn : double_float := AbsVal(s.v(n)); - - begin - for i in 1..(n-1) loop - r.v(i) := s.v(i); - for j in 1..q(i) loop - Mul(r.v(i),s.v(n)); - end loop; - end loop; - r.t := s.t; - r.m := s.m; - r.err := s.err; - r.rco := s.rco; - r.res := s.res; - return r; - exception - when numeric_error => r.v(1..(n-1)) := (1..(n-1) => Create(10.0**10)); - return r; - end Affine_Transformation; - - function Affine_Transformation - ( sols : Solution_List; q : Vector ) return Solution_List is - - res,res_last : Solution_List; - tmp : Solution_List := sols; - ls : Link_to_Solution; - - begin - while not Is_Null(tmp) loop - ls := Head_Of(tmp); - Append(res,res_last,Affine_Transformation(ls.all,q)); - tmp := Tail_Of(tmp); - end loop; - return res; - end Affine_Transformation; - - procedure Affine_Transformation - ( sols : in out Solution_List; q : in Vector ) is - begin - if Is_Null(sols) - then null; - else declare - n : natural := Head_Of(sols).n; - s1 : Solution(n); - s2 : Solution(n-1); - temp : Solution_List := sols; - l : Link_To_Solution; - begin - while not Is_Null(temp) loop - l := Head_Of(temp); - s1 := l.all; - s2 := Affine_Transformation(s1,q); - Clear(l); - l := new Solution'(s2); - Set_Head(temp,l); - temp := Tail_Of(temp); - end loop; - end; - end if; - end Affine_Transformation; - -end Weighted_Projective_Transfos; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Homotopy/weighted_projective_transfos.ads phcpack-2.4.85/src/Ada/Deformations/Homotopy/weighted_projective_transfos.ads --- phcpack-2.4.84/src/Ada/Deformations/Homotopy/weighted_projective_transfos.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Homotopy/weighted_projective_transfos.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -with Standard_Integer_Vectors; use Standard_Integer_Vectors; -with Standard_Complex_Laur_Polys; use Standard_Complex_Laur_Polys; -with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; - -package Weighted_Projective_Transfos is - --- DESCRIPTION : --- Weighted projective embeddings are determined by an integral weight --- vector q : replace x^a by x^a*z^. The homogeneous coordinates ---- are then (l^(-1) x0, l^q1 x1 , l^q2 x2,.., l^qn x_n), for l /= 0. --- Set l := x0 to move from projective to affine space. --- Usual projective space corresponds to q = (-1,-1,..,-1). - - function Projective_Transformation ( p : Poly; q : Vector ) return Poly; - function Projective_Transformation - ( p : Laur_Sys; q : Vector ) return Laur_Sys; - - procedure Projective_Transformation ( p : in out Poly; q : in Vector ); - procedure Projective_Transformation ( p : in out Laur_Sys; q : in Vector ); - - -- DESCRIPTION : - -- An unknown using q as weight is added according to the recipe above. - - function Affine_Transformation ( s : Solution; q : Vector ) return Solution; - - function Affine_Transformation - ( sols : Solution_List; q : Vector ) return Solution_List; - - procedure Affine_Transformation - ( sols : in out Solution_List; q : in Vector ); - - -- DESCRIPTION : - -- All components of the solution vector will be divided by the last - -- component, which is afterwards cut off. - -end Weighted_Projective_Transfos; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_multiple_deflation.adb phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_multiple_deflation.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_multiple_deflation.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_multiple_deflation.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,5 @@ with Communications_with_User; use Communications_with_User; with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; @@ -33,35 +32,35 @@ offset : integer32; begin - for i in 1..nq loop + for i in 1..integer32(nq) loop if a(i,1) /= Null_Poly - then res(i) := Add_Variables(a(i,1),nm); + then res(i) := Add_Variables(a(i,1),natural32(nm)); end if; end loop; - mt.cf := Create(1); - mt.dg := new Standard_Natural_Vectors.Vector'(1..nv+nm => 0); + mt.cf := Create(integer32(1)); + mt.dg := new Standard_Natural_Vectors.Vector'(1..integer32(nv)+nm => 0); for i in a'range(1) loop - res(nq+i) := Null_Poly; + res(integer32(nq)+i) := Null_Poly; for j in 1..nm loop - if a(i,j+1) /= Null_Poly - then mt.dg(nv+j) := 1; - acc := Add_Variables(a(i,j+1),nm); - Mul(acc,mt); - Add(res(nq+i),acc); - Clear(acc); - mt.dg(nv+j) := 0; + if a(i,j+1) /= Null_Poly then + mt.dg(integer32(nv)+j) := 1; + acc := Add_Variables(a(i,j+1),natural32(nm)); + Mul(acc,mt); + Add(res(integer32(nq)+i),acc); + Clear(acc); + mt.dg(integer32(nv)+j) := 0; end if; end loop; end loop; - offset := nq+a'last(1); + offset := integer32(nq)+a'last(1); for i in h'range(1) loop mt.cf := h(i,1); res(offset+i) := Create(mt); for j in 1..nm loop - mt.dg(nv+j) := 1; + mt.dg(integer32(nv)+j) := 1; mt.cf := h(i,j+1); Add(res(offset+i),mt); - mt.dg(nv+j) := 0; + mt.dg(integer32(nv)+j) := 0; end loop; end loop; Clear(mt); @@ -104,7 +103,7 @@ ( p : in Eval_Poly_Sys; A : in out Multprec_Complex_Matrices.Matrix; z : in Vector; size : in natural32; - tol : in double_float; max_d : in natural32; + tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ) is use Multprec_Complex_Matrices; @@ -116,7 +115,7 @@ rco : Floating_Number; rank : natural32; w : Vector(z'range); - t,y,c : Vector(0..integer32(max_d)); + t,y,c : Vector(0..max_d); begin Numerical_Rank(A,tol,S,U,V,rco,rank); @@ -127,7 +126,7 @@ w := Random_Vector_in_Kernel(V,corank,size); t := Random_Vector(0,max_d,size); Clear(t(0)); - t(0) := Create(0); + t(0) := Create(integer32(0)); y := Sample_Sum_on_Line(p,z,w,t); c := Interpolation_Coefficients(t,y); d := Numerical_Order(c,tol); @@ -143,7 +142,7 @@ ( file : in file_type; p : in Eval_Poly_Sys; A : in out Multprec_Complex_Matrices.Matrix; z : in Vector; size : in natural32; - tol : in double_float; max_d : in natural32; + tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ) is use Multprec_Complex_Matrices; @@ -157,7 +156,7 @@ rank : natural32; w : Vector(z'range); r : Vector(A'range(1)); - t,y,c : Vector(0..integer32(max_d)); + t,y,c : Vector(0..max_d); begin Copy(A,AA); @@ -167,7 +166,7 @@ put_line(file,S); put(file,"The numerical rank : "); put(file,rank,1); - if rank = A'last(2) + if integer32(rank) = A'last(2) then put(file," = "); else put(file," < "); end if; @@ -188,7 +187,7 @@ put_line(file,r); t := Random_Vector(0,max_d,size); Clear(t(0)); - t(0) := Create(0); + t(0) := Create(integer32(0)); y := Sample_Sum_on_Line(p,z,w,t); -- put_line(file,"Values of the sampled sum on the line :"); -- put_line(file,y); @@ -209,7 +208,7 @@ procedure Predict_Order ( p : in Poly_Sys; z : in Vector; - size : in natural; tol : in double_float; + size : in natural32; tol : in double_float; corank : out natural32; d : out natural32 ) is use Multprec_Complex_Matrices; @@ -217,7 +216,8 @@ jm : Jaco_Mat(p'range,z'range) := Create(p); A : Matrix(p'range,z'range) := Eval(jm,z); f : Eval_Poly_Sys(p'range) := Create(p); - max_d : constant natural := Multprec_Probe_Kernel.Maximal_Degree(p)+1; + max_d : constant integer32 + := Multprec_Probe_Kernel.Maximal_Degree(p)+1; begin Predict_Order(f,A,z,size,tol,max_d,corank,d); @@ -235,7 +235,8 @@ jm : Jaco_Mat(p'range,z'range) := Create(p); A : Matrix(p'range,z'range) := Eval(jm,z); f : Eval_Poly_Sys(p'range) := Create(p); - max_d : constant natural32 := Multprec_Probe_Kernel.Maximal_Degree(p)+1; + max_d : constant integer32 + := Multprec_Probe_Kernel.Maximal_Degree(p)+1; begin put(file,"Bound for the maximal order : "); put(file,max_d,1); @@ -290,7 +291,7 @@ (1..integer32(nr),1..integer32(nc)-1) := Eval1(a,z); u : Multprec_Complex_Matrices.Matrix(y'range(1),y'range(1)); v : Multprec_Complex_Matrices.Matrix(y'range(2),y'range(2)); - m : constant integer32 := Min0(nr+1,nc-1); + m : constant integer32 := Min0(integer32(nr)+1,integer32(nc)-1); s : Multprec_Complex_Vectors.Vector(1..m); rco : Floating_Number; rank : natural32; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_multiple_deflation.ads phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_multiple_deflation.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_multiple_deflation.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_multiple_deflation.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,6 @@ with text_io; use text_io; with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Multprec_Complex_Vectors; use Multprec_Complex_Vectors; with Multprec_Complex_Matrices; @@ -62,17 +63,17 @@ ( p : in Eval_Poly_sys; A : in out Multprec_Complex_Matrices.Matrix; z : in Vector; size : in natural32; - tol : in double_float; max_d : in natural32; + tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ); procedure Predict_Order ( file : in file_type; p : in Eval_Poly_Sys; A : in out Multprec_Complex_Matrices.Matrix; z : in Vector; size : in natural32; - tol : in double_float; max_d : in natural32; + tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ); procedure Predict_Order ( p : in Poly_Sys; z : in Vector; - size : in natural; tol : in double_float; + size : in natural32; tol : in double_float; corank : out natural32; d : out natural32 ); procedure Predict_Order ( file : in file_type; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_matrices.adb phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_matrices.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_matrices.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_matrices.adb 2021-06-30 23:22:40.000000000 +0000 @@ -131,7 +131,7 @@ end Eval1; function Evaluate_Nullity_Matrix - ( nq,nv,nr,nc : natural; k : positive; f : Poly_Sys; + ( nq,nv,nr,nc,k : natural32; f : Poly_Sys; z : Multprec_Complex_Vectors.Vector ) return Multprec_Complex_Matrices.Matrix is @@ -212,7 +212,7 @@ res : Multprec_Complex_Matrices.Matrix (1..integer32(nr),1..integer32(nc)); nr1,nc1 : natural32; - y : Multprec_Complex_Vectors.Vector(1..nq); + y : Multprec_Complex_Vectors.Vector(1..integer32(nq)); dp : Poly; begin diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_polynomials.adb phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_polynomials.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_polynomials.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_polynomials.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,6 @@ -with integer_io; use integer_io; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; with Standard_Natural_Vectors_io; use Standard_Natural_Vectors_io; @@ -26,16 +28,17 @@ return res; end Derivative; - function Factorial ( m : Standard_Natural_Vectors.Vector ) return natural is + function Factorial ( m : Standard_Natural_Vectors.Vector ) + return natural32 is - res : natural := 1; + res : natural32 := 1; begin for i in m'range loop - if m(i) > 1 - then for j in 2..m(i) loop - res := res*j; - end loop; + if m(i) > 1 then + for j in 2..m(i) loop + res := res*j; + end loop; end if; end loop; return res; @@ -49,7 +52,7 @@ t : Term; begin - t.cf := Create(1); + t.cf := Create(integer32(1)); t.dg := new Standard_Natural_Vectors.Vector'(m); for i in f'range loop res(i) := t*f(i); @@ -60,24 +63,25 @@ procedure Evaluate_Derivatives ( a : in out Multprec_Complex_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is dp : Poly; - row : natural := r; - fac : constant integer := Factorial(m); + row : natural32 := r; + fac : constant natural32 := Factorial(m); mpf_fac : Floating_Number := Create(fac); begin - for i in 1..nq loop + for i in 1..integer32(nq) loop dp := Derivative(f(i),m); - if dp = Null_Poly - then a(row,c) := Create(0); - else a(row,c) := Eval(dp,z); - Div(a(row,c),mpf_fac); - Clear(dp); + if dp = Null_Poly then + a(integer32(row),integer32(c)) := Create(integer32(0)); + else + a(integer32(row),integer32(c)) := Eval(dp,z); + Div(a(integer32(row),integer32(c)),mpf_fac); + Clear(dp); end if; row := row + 1; end loop; @@ -93,24 +97,25 @@ procedure Evaluate_Derivatives ( file : in file_type; a : in out Multprec_Complex_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is dp : Poly; - row : natural := r; - fac : constant integer := Factorial(m); + row : natural32 := r; + fac : constant natural32 := Factorial(m); mpf_fac : Floating_Number := Create(fac); begin - for i in 1..nq loop + for i in 1..integer32(nq) loop dp := Derivative(f(i),m); - if dp = Null_Poly - then a(row,c) := Create(0); - else a(row,c) := Eval(dp,z); - Div(a(row,c),mpf_fac); - Clear(dp); + if dp = Null_Poly then + a(integer32(row),integer32(c)) := Create(integer32(0)); + else + a(integer32(row),integer32(c)) := Eval(dp,z); + Div(a(integer32(row),integer32(c)),mpf_fac); + Clear(dp); end if; put(file,"row = "); put(file,row,1); put(file," column = "); put(file,c,1); new_line(file); @@ -127,24 +132,25 @@ procedure Compute_Derivatives ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; nq,nv,k : in natural32; f : in Poly_Sys ) is procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is dp : Poly; - row : natural := r; - fac : constant integer := Factorial(m); + row : natural32 := r; + fac : constant natural32 := Factorial(m); mpf_fac : Floating_Number := Create(fac); mpc_fac : Complex_Number := Create(1.0/mpf_fac); begin - for i in 1..nq loop + for i in 1..integer32(nq) loop dp := Derivative(f(i),m); - if dp = Null_Poly - then a(row,c) := Null_Poly; - else Mul(dp,mpc_fac); - a(row,c) := dp; + if dp = Null_Poly then + a(integer32(row),integer32(c)) := Null_Poly; + else + Mul(dp,mpc_fac); + a(integer32(row),integer32(c)) := dp; end if; row := row + 1; end loop; @@ -161,24 +167,25 @@ procedure Compute_Derivatives ( file : in file_type; a : in out Multprec_Complex_Poly_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; nq,nv,k : in natural32; f : in Poly_Sys ) is procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is dp : Poly; - row : natural := r; - fac : constant integer := Factorial(m); + row : natural32 := r; + fac : constant natural32 := Factorial(m); mpf_fac : Floating_Number := Create(fac); mpc_fac : Complex_Number := Create(1.0/mpf_fac); begin - for i in 1..nq loop + for i in 1..integer32(nq) loop dp := Derivative(f(i),m); - if dp = Null_Poly - then a(row,c) := Null_Poly; - else Mul(dp,mpc_fac); - a(row,c) := dp; + if dp = Null_Poly then + a(integer32(row),integer32(c)) := Null_Poly; + else + Mul(dp,mpc_fac); + a(integer32(row),integer32(c)) := dp; end if; put(file,"row = "); put(file,row,1); put(file," column = "); put(file,c,1); new_line(file); @@ -196,10 +203,10 @@ procedure Evaluate_All_Derivatives ( a : in out Multprec_Complex_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is - wr : natural := r; + wr : natural32 := r; procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is @@ -207,12 +214,12 @@ -- Evaluates all derivatives up to order k of m*f. mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); - row : natural := wr; - wc : natural; + row : natural32 := wr; + wc : natural32; begin - for i in 1..nq loop - a(row,c) := Eval(mf(i),z); + for i in 1..integer32(nq) loop + a(integer32(row),integer32(c)) := Eval(mf(i),z); row := row + 1; end loop; wc := c+1; @@ -230,22 +237,23 @@ procedure Compute_All_Derivatives ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; f : in Poly_Sys ) is + r,c : in natural32; nq,nv,k : in natural32; + f : in Poly_Sys ) is - wr : natural := r; + wr : natural32 := r; procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is -- DESCRIPTION : -- Computes all derivatives up to order k of m*f. - mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); - row : natural := wr; - wc : natural; + mf : constant Poly_Sys(f'range) := Monomial_Multiple(m,f); + row : natural32 := wr; + wc : natural32; begin - for i in 1..nq loop - a(row,c) := mf(i); + for i in 1..integer32(nq) loop + a(integer32(row),integer32(c)) := mf(i); row := row + 1; end loop; wc := c+1; @@ -262,18 +270,18 @@ procedure Evaluate_Highest_Order ( a : in out Multprec_Complex_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is - wr : natural := r; + wr : natural32 := r; procedure Highest_Order ( m : in Standard_Natural_Vectors.Vector ) is -- DESCRIPTION : -- Evaluates the highest order derivative of m*f at z. - mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); - wc : natural := c; + mf : constant Poly_Sys(f'range) := Monomial_Multiple(m,f); + wc : natural32 := c; begin Evaluate_Derivatives(a,wr,wc,nq,nv,k,mf,z); @@ -289,17 +297,18 @@ procedure Compute_Highest_Order ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; f : in Poly_Sys ) is + r,c : in natural32; nq,nv,k : in natural32; + f : in Poly_Sys ) is - wr : natural := r; + wr : natural32 := r; procedure Highest_Order ( m : in Standard_Natural_Vectors.Vector ) is -- DESCRIPTION : -- Computes the highest order derivative of m*f at z. - mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); - wc : natural := c; + mf : constant Poly_Sys(f'range) := Monomial_Multiple(m,f); + wc : natural32 := c; begin Compute_Derivatives(a,wr,wc,nq,nv,k,mf); @@ -315,10 +324,10 @@ procedure Evaluate_Monomial_Multiples ( a : in out Multprec_Complex_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is - wr,wc : natural; + wr,wc : natural32; begin wc := nc1+1; @@ -333,10 +342,10 @@ procedure Evaluate_Monomial_Multiples ( file : in file_type; a : in out Multprec_Complex_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ) is - wr,wc : natural; + wr,wc : natural32; procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is @@ -344,14 +353,14 @@ -- Evaluates all derivatives up to order k of m*f. mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); - row : natural := wr; + row : natural32 := wr; begin put(file,"multiply f with monomial "); put(file,m); new_line(file); - for i in 1..nq loop + for i in 1..integer32(nq) loop put(file,"row = "); put(file,row,1); put(file," column = "); put(file,c,1); new_line(file); - a(row,c) := Eval(mf(i),z); + a(integer32(row),integer32(c)) := Eval(mf(i),z); row := row + 1; end loop; wc := c+1; @@ -369,7 +378,7 @@ -- DESCRIPTION : -- Evaluates the highest order derivative of m*f at z. - mf : Poly_Sys(f'range) := Monomial_Multiple(m,f); + mf : constant Poly_Sys(f'range) := Monomial_Multiple(m,f); begin put(file,"multiply f with monomial "); put(file,m); new_line(file); @@ -397,9 +406,9 @@ procedure Compute_Monomial_Multiples ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; f : in Poly_Sys ) is + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys ) is - wr,wc : natural; + wr,wc : natural32; begin wc := nc1+1; @@ -414,9 +423,9 @@ procedure Compute_Monomial_Multiples ( file : in file_type; a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; f : in Poly_Sys ) is + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys ) is - wr,wc : natural; + wr,wc : natural32; procedure Monomial ( m : in Standard_Natural_Vectors.Vector ) is @@ -424,14 +433,14 @@ -- Computes all derivatives up to order k of m*f. mf : constant Poly_Sys(f'range) := Monomial_Multiple(m,f); - row : natural := wr; + row : natural32 := wr; begin put(file,"multiply f with monomial "); put(file,m); new_line(file); - for i in 1..nq loop + for i in 1..integer32(nq) loop put(file,"row = "); put(file,row,1); put(file," column = "); put(file,c,1); new_line(file); - a(row,c) := mf(i); + a(integer32(row),integer32(c)) := mf(i); row := row + 1; end loop; wc := c+1; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_polynomials.ads phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_polynomials.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_nullity_polynomials.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_nullity_polynomials.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; with Standard_Natural_Vectors; use Standard_Natural_Vectors; with Multprec_Complex_Vectors; use Multprec_Complex_Vectors; with Multprec_Complex_Matrices; @@ -19,7 +20,7 @@ -- DESCRIPTION : -- Returns the derivative of p with respect to the variables in m. - function Factorial ( m : Standard_Natural_Vectors.Vector ) return natural; + function Factorial ( m : Standard_Natural_Vectors.Vector ) return natural32; -- DESCRIPTION : -- Returns the product of all factorials of the elements in m. @@ -33,12 +34,14 @@ procedure Evaluate_Derivatives ( a : in out Multprec_Complex_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; + nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); procedure Evaluate_Derivatives ( file : in file_type; a : in out Multprec_Complex_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; + r : in natural32; c : in out natural32; + nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); -- DESCRIPTION : @@ -48,13 +51,13 @@ procedure Compute_Derivatives ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; - f : in Poly_Sys ); + r : in natural32; c : in out natural32; + nq,nv,k : in natural32; f : in Poly_Sys ); procedure Compute_Derivatives ( file : in file_type; a : in out Multprec_Complex_Poly_Matrices.Matrix; - r : in natural; c : in out natural; nq,nv,k : in natural; - f : in Poly_Sys ); + r : in natural32; c : in out natural32; + nq,nv,k : in natural32; f : in Poly_Sys ); -- DESCRIPTION : -- Computes all derivatives up to order k of the system f, @@ -63,7 +66,7 @@ procedure Evaluate_All_Derivatives ( a : in out Multprec_Complex_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); -- DESCRIPTION : @@ -72,7 +75,7 @@ procedure Compute_All_Derivatives ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; f : in Poly_Sys ); + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys ); -- DESCRIPTION : -- Computes all derivatives of f multiplied with all monomials of @@ -80,7 +83,7 @@ procedure Evaluate_Highest_Order ( a : in out Multprec_Complex_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); -- DESCRIPTION : @@ -89,7 +92,7 @@ procedure Compute_Highest_Order ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c : in natural; nq,nv,k : in natural; f : in Poly_Sys ); + r,c : in natural32; nq,nv,k : in natural32; f : in Poly_Sys ); -- DESCRIPTION : -- Computes the k-th order derivative of f at all monomial multiples of @@ -97,12 +100,12 @@ procedure Evaluate_Monomial_Multiples ( a : in out Multprec_Complex_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); procedure Evaluate_Monomial_Multiples ( file : in file_type; a : in out Multprec_Complex_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys; z : in Multprec_Complex_Vectors.Vector ); -- DESCRIPTION : @@ -112,11 +115,11 @@ procedure Compute_Monomial_Multiples ( a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; f : in Poly_Sys ); + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys ); procedure Compute_Monomial_Multiples ( file : in file_type; a : in out Multprec_Complex_Poly_Matrices.Matrix; - r,c,nq,nv,k,nc1 : in natural; f : in Poly_Sys ); + r,c,nq,nv,k,nc1 : in natural32; f : in Poly_Sys ); -- DESCRIPTION : -- Evaluates monomial multiples of the degree k with the system f diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_probe_kernel.adb phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_probe_kernel.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_probe_kernel.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_probe_kernel.adb 2021-06-30 23:22:40.000000000 +0000 @@ -6,10 +6,10 @@ package body Multprec_Probe_Kernel is - function Maximal_Degree ( p : Poly_Sys ) return integer is + function Maximal_Degree ( p : Poly_Sys ) return integer32 is - res : integer := Degree(p(p'first)); - dpi : integer; + res : integer32 := Degree(p(p'first)); + dpi : integer32; begin for i in p'first+1..p'last loop @@ -22,7 +22,7 @@ end Maximal_Degree; function Random_Vector_in_Kernel - ( V : Matrix; corank : positive; s : natural ) return Vector is + ( V : Matrix; corank,s : natural32 ) return Vector is res : Vector(V'range(1)); r,t : Complex_Number; @@ -31,8 +31,8 @@ for i in res'range loop -- initialize with last column in V Copy(V(i,V'last(2)),res(i)); end loop; - for j in 1..corank-1 loop -- add the (j+1)-to-last column of V - r := Random(s); -- multiplied with a random number + for j in 1..integer32(corank)-1 loop -- add the (j+1)-to-last column of V + r := Random(s); -- multiplied with a random number for i in res'range loop t := r*V(i,V'last(2)-j); Add(res(i),t); @@ -73,19 +73,19 @@ end Interpolation_Coefficients; function Numerical_Order - ( c : Vector; tol : double_float ) return natural is + ( c : Vector; tol : double_float ) return natural32 is - res : natural := c'last+1; + res : natural32 := natural32(c'last)+1; v : Floating_Number; begin for i in c'range loop v := AbsVal(c(i)); if v > tol - then res := i; + then res := natural32(i); end if; Clear(v); - exit when (res < c'last+1); + exit when (res < natural32(c'last)+1); end loop; return res; end Numerical_Order; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_probe_kernel.ads phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_probe_kernel.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/multprec_probe_kernel.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/multprec_probe_kernel.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Multprec_Complex_Vectors; use Multprec_Complex_Vectors; with Multprec_Complex_Matrices; use Multprec_Complex_Matrices; @@ -10,14 +12,14 @@ -- This package provides primitive operations used to determine -- the minimal deflation order needed to recondition a singular root. - function Maximal_Degree ( p : Poly_Sys ) return integer; + function Maximal_Degree ( p : Poly_Sys ) return integer32; -- DESCRIPTION : -- Returns the maximal degree of the polynomials in p, -- as the natural upper bound for the order of the deflation. function Random_Vector_in_Kernel - ( V : Matrix; corank : positive; s : natural ) return Vector; + ( V : Matrix; corank,s : natural32 ) return Vector; -- DESCRIPTION : -- Returns a random vector in the kernel of a matrix, @@ -60,7 +62,7 @@ -- coefficients of the interpolating polynomial of degree d, -- in a vector of range 0..d. - function Numerical_Order ( c : Vector; tol : double_float ) return natural; + function Numerical_Order ( c : Vector; tol : double_float ) return natural32; -- DESCRIPTION : -- Returns the index of the first element in c whose magnitude diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/newton.gpr phcpack-2.4.85/src/Ada/Deformations/Newton/newton.gpr --- phcpack-2.4.84/src/Ada/Deformations/Newton/newton.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/newton.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,64 @@ +project newton is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../../Tasking", + "../../Schubert/SAGBI", + "../../Components/Interpolators"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../../Tasking", + "../../Schubert/SAGBI", + "../../Components/Interpolators"); + for Excluded_Source_Files use ("corecount.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_ddnewt.adb", -- tests dobldobl_root_refiners + "ts_qdnewt.adb", -- tests quaddobl_root_refiners + "ts_rootrefi.adb", -- calls the root refiners + "ts_mreseva.adb", -- multiprecision residual computation + "ts_newton.adb", -- interactive testing routine on Newton + "ts_realnewt.adb", -- development of Newton for real numbers + "ts_numdif.adb", -- tests numerical differentiation + "ts_jactrees.adb", -- tests trees of Jacobian matrices + "ts_deflop.adb", -- to make systems to look for singularities + "ts_deftrees.adb", -- interactive test on derivative trees + "ts_defmat.adb", -- working with deflation matrices + "ts_deflate.adb", -- interactive test on deflation + "ts_straight.adb", -- tests straight-line programs + "ts_stair.adb", -- tests examples from the staircase + "ts_multip.adb", -- computation of multiplicity structure + "ts_muldef.adb", -- tests higher-order deflation + "ts_vmpnewt.adb", -- tests variable precision Newton + "ts_newcirc.adb" -- tests Newton on coefficient circuits + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end newton; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/READ_ME phcpack-2.4.85/src/Ada/Deformations/Newton/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Newton/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Root refining and a modified Newton's method in PHCv2.4.82 +Root refining and a modified Newton's method in PHCv2.4.85 This directory is entirely new in release 2.3. It contains the older root refiners, which were extended in the second release with @@ -9,6 +9,11 @@ Root refiners with double double and quad double complex arithmetic were added in v2.3.55. +Run "gprbuild newton.gpr" to make all test programs. +On windows, type "gprbuild newton.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean newton.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -33,7 +38,6 @@ dobldobl_complex_newton_steps : Newton/SVD in dobldobl complex arithmetic quaddobl_complex_newton_steps : Newton/SVD in quaddobl complex arithmetic multprec_complex_newton_steps : Newton/SVD in multprec complex arithmetic -standard_floating_newton_steps : Newton/SVD in standard real arithmetic standard_aitken_extrapolation : Aitken extrapolation in several variables ts_newton : interactive testing routine ts_realnewt : development of Newton for real numbers diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_floating_newton_steps.adb phcpack-2.4.85/src/Ada/Deformations/Newton/standard_floating_newton_steps.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_floating_newton_steps.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_floating_newton_steps.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; -with Standard_Complex_Norms_Equals; use Standard_Complex_Norms_Equals; -with Standard_Complex_Singular_Values; use Standard_Complex_Singular_Values; -with Standard_Numerical_Rank; use Standard_Numerical_Rank; - -package body Standard_Floating_Newton_Steps is - - procedure Silent_Newton_Step - ( n : in natural32; z : in out Vector; tol : double_float; - err,rco,res : out double_float; rank : out natural32 ) is - - y : Vector(1..integer32(n)) := f(z); - ejm : Matrix(y'range,z'range) := jm(z); - u : Matrix(y'range,y'range); - v : Matrix(z'range,z'range); - p : constant integer32 := z'length; - m : constant integer32 := Min0(integer32(n)+1,p); - e : Vector(1..p); - s : Vector(1..m); - info : integer32; - dz : Vector(z'range); - - begin - SVD(ejm,n,p,s,e,u,v,11,info); - rco := REAL_PART(s(s'last))/REAL_PART(s(s'first)); - rank := Numerical_Rank(s,tol); - dz := Solve(u,v,s,-y); - err := Max_Norm(dz); - Add(z,dz); - y := f(z); - res := Max_Norm(y); - end Silent_Newton_Step; - - procedure Reporting_Newton_Step - ( file : in file_type; - n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; rank : out natural32 ) is - - y : Vector(1..integer32(n)) := f(z); - ejm : Matrix(y'range,z'range) := jm(z); - u : Matrix(y'range,y'range); - v : Matrix(z'range,z'range); - p : constant natural := z'length; - m : constant natural := Min0(integer32(n)+1,p); - e : Vector(1..p); - s : Vector(1..m); - info : integer32; - dz : Vector(z'range); - - begin - SVD(ejm,n,p,s,e,u,v,11,info); - put_line(file,"The singular values : "); - put_line(file,s); - rco := REAL_PART(s(s'last))/REAL_PART(s(s'first)); - rank := Numerical_Rank(s,tol); - dz := Solve(u,v,s,-y); - err := Max_Norm(dz); - Add(z,dz); - y := f(z); - res := Max_Norm(y); - end Reporting_Newton_Step; - - procedure Silent_Newton_Step_with_Singular_Values - ( n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; - s : out Vector; rank : out natural32 ) is - - y : Vector(1..integer32(n)) := f(z); - ejm : Matrix(y'range,z'range) := jm(z); - u : Matrix(y'range,y'range); - v : Matrix(z'range,z'range); - p : constant integer32 := z'length; - m : constant integer32 := Min0(integer32(n)+1,p); - e : Vector(1..p); - info : integer; - dz : Vector(z'range); - - begin - SVD(ejm,n,p,s,e,u,v,11,info); - rco := REAL_PART(s(s'last))/REAL_PART(s(s'first)); - rank := Numerical_Rank(s,tol); - dz := Solve(u,v,s,-y); - err := Max_Norm(dz); - Add(z,dz); - y := f(z); - res := Max_Norm(y); - end Silent_Newton_Step_with_Singular_Values; - - procedure Reporting_Newton_Step_with_Singular_Values - ( file : in file_type; - n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; - s : out Vector; rank : out natural32 ) is - - y : Vector(1..integer32(n)) := f(z); - ejm : Matrix(y'range,z'range) := jm(z); - u : Matrix(y'range,y'range); - v : Matrix(z'range,z'range); - p : constant integer32 := z'length; - m : constant integer32 := Min0(integer32(n)+1,p); - e : Vector(1..p); - info : integer; - dz : Vector(z'range); - - begin - SVD(ejm,n,p,s,e,u,v,11,info); - put_line(file,"The singular values : "); - put_line(file,s); - rco := REAL_PART(s(s'last))/REAL_PART(s(s'first)); - rank := Numerical_Rank(s,tol); - dz := Solve(u,v,s,-y); - err := Max_Norm(dz); - Add(z,dz); - y := f(z); - res := Max_Norm(y); --- exception --- when others --- => put_line("exception caught by " --- & "Reporting_Newton_Step_with_Singular_Values"); --- raise; - end Reporting_Newton_Step_with_Singular_Values; - -end Standard_Floating_Newton_Steps; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_floating_newton_steps.ads phcpack-2.4.85/src/Ada/Deformations/Newton/standard_floating_newton_steps.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_floating_newton_steps.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_floating_newton_steps.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -with text_io; use text_io; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Vectors; use Standard_Floating_Vectors; -with Standard_Floating_Matrices; use Standard_Floating_Matrices; - -package Standard_Floating_Newton_Steps is - --- DESCRIPTION : --- This package provides two generic routines to execute one step --- of Newton's method, using a singular value decomposition on the --- Jacobian matrix, all in standard real floating-point arithmetic. - - generic - - with function f ( x : Vector ) return Vector; -- returns function value - with function jm ( x : Vector ) return Matrix; -- returns Jacobi matrix - - procedure Silent_Newton_Step - ( n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; rank : out natural32 ); - - -- DESCRIPTION : - -- Applies one step with Newton's method on the system f(x) = 0, - -- using standard machine precision real floating-point arithmetic. - - -- ON ENTRY : - -- n number of equations, may be larger than z'length; - -- z initial approximation for the root of f; - -- tol tolerance to decide the numerical rank. - - -- ON RETURN : - -- z refined approximation for the root of f; - -- err maximum norm of the correction vector; - -- rco estimate for the inverse condition number; - -- rank numerical rank of Jacobian matrix at root. - - generic - - with function f ( x : Vector ) return Vector; -- returns function value - with function jm ( x : Vector ) return Matrix; -- returns Jacobi matrix - - procedure Reporting_Newton_Step - ( file : in file_type; - n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; rank : out natural32 ); - - -- DESCRIPTION : - -- Applies one step with Newton's method on the system f(x) = 0, - -- using standard machine precision real floating-point arithmetic. - - -- ON ENTRY : - -- file for intermediate output and diagnostics; - -- n number of equations, may be larger than z'length; - -- z initial approximation for the root of f; - -- tol tolerance to decide the numerical rank. - - -- ON RETURN : - -- z refined approximation for the root of f; - -- err maximum norm of the correction vector; - -- rco estimate for the inverse condition number; - -- res maximum norm of the residual vector; - -- rank numerical rank of the Jacobian matrix. - - generic - - with function f ( x : Vector ) return Vector; -- returns function value - with function jm ( x : Vector ) return Matrix; -- returns Jacobi matrix - - procedure Silent_Newton_Step_with_Singular_Values - ( n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; - s : out Vector; rank : out natural32 ); - - -- DESCRIPTION : - -- Applies one step with Newton's method on the system f(x) = 0, - -- using standard machine precision real floating-point arithmetic. - -- This version returns the vector of singular values computed by the - -- SVD algorithm on the Jacobi matrix at z. - - -- ON ENTRY : - -- n number of equations, may be larger than z'length; - -- z initial approximation for the root of f; - -- tol tolerance to decide the numerical rank. - - -- ON RETURN : - -- z refined approximation for the root of f; - -- err maximum norm of the correction vector; - -- rco estimate for the inverse condition number; - -- res maximum norm of the residual vector; - -- s vector of range min0(n+1,z'last) with singular values, - -- of the Jacobian matrix at the z on input; - -- rank numerical rank of the Jacobian matrix. - - generic - - with function f ( x : Vector ) return Vector; -- returns function value - with function jm ( x : Vector ) return Matrix; -- returns Jacobi matrix - - procedure Reporting_Newton_Step_with_Singular_Values - ( file : in file_type; - n : in natural32; z : in out Vector; tol : in double_float; - err,rco,res : out double_float; - s : out Vector; rank : out natural32 ); - - -- DESCRIPTION : - -- Applies one step with Newton's method on the system f(x) = 0, - -- using standard machine precision real floating-point arithmetic. - -- This version returns the vector of singular values computed by the - -- SVD algorithm on the Jacobi matrix at z. - - -- ON ENTRY : - -- file for intermediate output and diagnostics; - -- n number of equations, may be larger than z'length; - -- z initial approximation for the root of f; - -- tol tolerance to decide the numerical rank. - - -- ON RETURN : - -- z refined approximation for the root of f; - -- err maximum norm of the correction vector; - -- rco estimate for the inverse condition number; - -- res maximum norm of the residual vector; - -- s vector of range min0(n+1,z'last) with singular values, - -- of the Jacobian matrix at the z on input; - -- rank numerical rank of Jacobian matrix. - -end Standard_Floating_Newton_Steps; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_multiple_deflation.adb phcpack-2.4.85/src/Ada/Deformations/Newton/standard_multiple_deflation.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_multiple_deflation.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_multiple_deflation.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,5 @@ with Communications_with_User; use Communications_with_User; with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; with Standard_Complex_Numbers; use Standard_Complex_Numbers; @@ -35,33 +34,33 @@ begin for i in 1..integer32(nq) loop if a(i,1) /= Null_Poly - then res(i) := Add_Variables(a(i,1),nm); + then res(i) := Add_Variables(a(i,1),natural32(nm)); end if; end loop; mt.cf := Create(1.0); - mt.dg := new Standard_Natural_Vectors.Vector'(1..nv+nm => 0); + mt.dg := new Standard_Natural_Vectors.Vector'(1..integer32(nv)+nm => 0); for i in a'range(1) loop - res(nq+i) := Null_Poly; + res(integer32(nq)+i) := Null_Poly; for j in 1..nm loop if a(i,j+1) /= Null_Poly then - mt.dg(nv+j) := 1; - acc := Add_Variables(a(i,j+1),nm); + mt.dg(integer32(nv)+j) := 1; + acc := Add_Variables(a(i,j+1),natural32(nm)); Mul(acc,mt); - Add(res(nq+i),acc); + Add(res(integer32(nq)+i),acc); Clear(acc); - mt.dg(nv+j) := 0; + mt.dg(integer32(nv)+j) := 0; end if; end loop; end loop; - offset := nq+a'last(1); + offset := integer32(nq)+a'last(1); for i in h'range(1) loop mt.cf := h(i,1); res(offset+i) := Create(mt); for j in 1..nm loop - mt.dg(nv+j) := 1; + mt.dg(integer32(nv)+j) := 1; mt.cf := h(i,j+1); Add(res(offset+i),mt); - mt.dg(nv+j) := 0; + mt.dg(integer32(nv)+j) := 0; end loop; end loop; Clear(mt); @@ -91,8 +90,8 @@ declare a : constant Standard_Complex_Poly_Matrices.Matrix(1..nr,1..nc) := Create_Nullity_Matrix(nq,nv,natural32(nr),natural32(nc),d,p); - h : constant Standard_Complex_Matrices.Matrix(1..r,1..nc) - := Random_Matrix(r,nc); + h : constant Standard_Complex_Matrices.Matrix(1..integer32(r),1..nc) + := Random_Matrix(r,natural32(nc)); begin return Symbolic_Deflate(nq,nv,a,h); end; @@ -101,7 +100,7 @@ procedure Predict_Order ( p : in Eval_Poly_Sys; A : in out Standard_Complex_Matrices.Matrix; - z : in Vector; tol : in double_float; max_d : in natural32; + z : in Vector; tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ) is U : Standard_Complex_Matrices.Matrix(A'range(1),A'range(1)); @@ -111,7 +110,7 @@ rco : double_float; rank : natural32; w : Vector(z'range); - t,y,c : Vector(0..integer32(max_d)); + t,y,c : Vector(0..max_d); begin Numerical_Rank(A,tol,S,U,V,rco,rank); @@ -120,7 +119,7 @@ d := 0; else w := Random_Vector_in_Kernel(V,corank); - t := Random_Vector(0,integer32(max_d)); + t := Random_Vector(0,max_d); y := Sample_Sum_on_Line(p,z,w,t); c := Interpolation_Coefficients(t,y); d := Numerical_Order(c,tol); @@ -132,8 +131,8 @@ procedure Predict_Order ( file : in file_type; p : in Eval_Poly_Sys; - A : in Standard_Complex_Matrices.Matrix; - z : in Vector; tol : in double_float; max_d : in natural32; + A : in out Standard_Complex_Matrices.Matrix; + z : in Vector; tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ) is use Standard_Complex_Matrices; @@ -147,7 +146,7 @@ rank : natural32; w : Vector(z'range); r : Vector(A'range(1)); - t,y,c : Vector(0..integer32(max_d)); + t,y,c : Vector(0..max_d); begin -- put_line(file,"The approximate zero : "); put_line(file,z); @@ -155,7 +154,7 @@ put_line(file,"The singular values :"); put_line(file,S); put(file,"The numerical rank : "); put(file,rank,1); - if rank = A'last(2) + if integer32(rank) = A'last(2) then put(file," = "); else put(file," < "); end if; @@ -200,7 +199,7 @@ jm : Jaco_Mat(p'range,z'range) := Create(p); A : Matrix(p'range,z'range) := Eval(jm,z); f : Eval_Poly_Sys(p'range) := Create(p); - max_d : constant natural32 := Standard_Probe_Kernel.Maximal_Degree(p)+1; + max_d : constant integer32 := Standard_Probe_Kernel.Maximal_Degree(p)+1; begin Predict_Order(f,A,z,tol,max_d,corank,d); @@ -217,7 +216,7 @@ jm : Jaco_Mat(p'range,z'range) := Create(p); A : Matrix(p'range,z'range) := Eval(jm,z); f : Eval_Poly_Sys(p'range) := Create(p); - max_d : constant natural32 := Standard_Probe_Kernel.Maximal_Degree(p)+1; + max_d : constant integer32 := Standard_Probe_Kernel.Maximal_Degree(p)+1; begin put(file,"Bound for the maximal order : "); put(file,max_d,1); @@ -242,7 +241,7 @@ := Create_Nullity_Matrix(nq,nv,natural32(nr),natural32(nc),d,p); y : constant Standard_Complex_Matrices.Matrix(1..nr,1..nc-1) := Eval1(a,z); - rank : constant natural := Numerical_Rank(y,tol); + rank : constant natural32 := Numerical_Rank(y,tol); begin r := natural32(nc) - rank; dp := new Poly_Sys'(Symbolic_Deflate(nq,nv,r,a)); diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_multiple_deflation.ads phcpack-2.4.85/src/Ada/Deformations/Newton/standard_multiple_deflation.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_multiple_deflation.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_multiple_deflation.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,6 @@ with text_io; use text_io; with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Complex_Vectors; use Standard_Complex_Vectors; with Standard_Complex_Matrices; @@ -59,12 +60,12 @@ procedure Predict_Order ( p : in Eval_Poly_sys; A : in out Standard_Complex_Matrices.Matrix; - z : in Vector; tol : in double_float; max_d : in natural32; + z : in Vector; tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ); procedure Predict_Order ( file : in file_type; p : in Eval_Poly_Sys; A : in out Standard_Complex_Matrices.Matrix; - z : in Vector; tol : in double_float; max_d : in natural32; + z : in Vector; tol : in double_float; max_d : in integer32; corank : out natural32; d : out natural32 ); procedure Predict_Order ( p : in Poly_Sys; z : in Vector; tol : in double_float; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_probe_kernel.adb phcpack-2.4.85/src/Ada/Deformations/Newton/standard_probe_kernel.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_probe_kernel.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_probe_kernel.adb 2021-06-30 23:22:40.000000000 +0000 @@ -5,10 +5,10 @@ package body Standard_Probe_Kernel is - function Maximal_Degree ( p : Poly_Sys ) return integer is + function Maximal_Degree ( p : Poly_Sys ) return integer32 is - res : integer := Degree(p(p'first)); - dpi : integer; + res : integer32 := Degree(p(p'first)); + dpi : integer32; begin for i in p'first+1..p'last loop @@ -21,7 +21,7 @@ end Maximal_Degree; function Random_Vector_in_Kernel - ( V : Matrix; corank : positive ) return Vector is + ( V : Matrix; corank : natural32 ) return Vector is res : Vector(V'range(1)); r : Complex_Number; @@ -30,8 +30,8 @@ for i in res'range loop -- initialize with last column in V res(i) := V(i,V'last(2)); end loop; - for j in 1..corank-1 loop -- add the (j+1)-to-last column of V - r := Random1; -- multiplied with a random number + for j in 1..integer32(corank)-1 loop -- add the (j+1)-to-last column of V + r := Random1; -- multiplied with a random number for i in res'range loop res(i) := res(i) + r*V(i,V'last(2)-j); end loop; @@ -64,14 +64,14 @@ end Interpolation_Coefficients; function Numerical_Order - ( c : Vector; tol : double_float ) return natural is + ( c : Vector; tol : double_float ) return natural32 is begin for i in c'range loop if AbsVal(c(i)) > tol - then return i; + then return natural32(i); end if; end loop; - return c'last+1; + return natural32(c'last)+1; end Numerical_Order; end Standard_Probe_Kernel; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/standard_probe_kernel.ads phcpack-2.4.85/src/Ada/Deformations/Newton/standard_probe_kernel.ads --- phcpack-2.4.84/src/Ada/Deformations/Newton/standard_probe_kernel.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/standard_probe_kernel.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Complex_Vectors; use Standard_Complex_Vectors; with Standard_Complex_Matrices; use Standard_Complex_Matrices; @@ -10,14 +12,14 @@ -- This package provides primitive operations used to determine -- the minimal deflation order needed to recondition a singular root. - function Maximal_Degree ( p : Poly_Sys ) return integer; + function Maximal_Degree ( p : Poly_Sys ) return integer32; -- DESCRIPTION : -- Returns the maximal degree of the polynomials in p, -- as the natural upper bound for the order of the deflation. function Random_Vector_in_Kernel - ( V : Matrix; corank : positive ) return Vector; + ( V : Matrix; corank : natural32 ) return Vector; -- DESCRIPTION : -- Returns a random vector in the kernel of a matrix, @@ -59,7 +61,7 @@ -- coefficients of the interpolating polynomial of degree d, -- in a vector of range 0..d. - function Numerical_Order ( c : Vector; tol : double_float ) return natural; + function Numerical_Order ( c : Vector; tol : double_float ) return natural32; -- DESCRIPTION : -- Returns the index of the first element in c whose magnitude diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/ts_muldef.adb phcpack-2.4.85/src/Ada/Deformations/Newton/ts_muldef.adb --- phcpack-2.4.84/src/Ada/Deformations/Newton/ts_muldef.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/ts_muldef.adb 2021-06-30 23:22:40.000000000 +0000 @@ -248,7 +248,7 @@ procedure Multprec_Execute_Multiple_Deflation ( p : in Multprec_Complex_Poly_Systems.Poly_Sys; sols : in out Multprec_Complex_Solutions.Solution_List; - size : in natural ) is + size : in natural32 ) is use Multprec_Multiple_Deflation; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Newton/UPDATES phcpack-2.4.85/src/Ada/Deformations/Newton/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Newton/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Newton/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,13 @@ +Thu 17 Jun 2021 : removed the obsolete standard_floating_newton_steps. + +Tue 15 Jun 2021 : fixed ts_muldef.adb and {standard,multprec}_probe_kernel, + {standard,multprec}_multiple_deflation, multprec_nullity_polynomials, + and multprec_nullity_matrices.adb. Updated newton.gpr. + +Thu 10 Jun 2021 : added the exec_dir attribute to newton.gpr. + +Wed 9 Jun 2021 : defined newton.gpr to build the test procedures. + Sun 22 Nov 2020 : moved bablvali, bablvali2, bablvali4 into the package black_box_root_refiners. diff -Nru phcpack-2.4.84/src/Ada/Deformations/READ_ME phcpack-2.4.85/src/Ada/Deformations/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,9 @@ -Homotopies, Newton's method and path trackers in PHCv2.4.82 +Homotopies, Newton's method and path trackers in PHCv2.4.85 + +Run "gprbuild deformations.gpr" to make all test programs. +On windows, type "gprbuild deformations.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean deformations.gpr" removes all files created by gprbuild. This directory was newly created in version 2.3.75, collecting the directories Homotopy, Newton, and Continuation. The directory Continuation @@ -9,9 +14,12 @@ Deformations : 2. homotopies, Newton's method & path trackers |-- Solutions : 2.1. solutions of systems and homotopies |-- Homotopy : 2.2. homotopies, scaling and reduction - |-- Newton : 2.3. root refining and modified Newton's method - |-- Curves : 2.4. univariate solving and plane algebraic curves - |-- End_Games : 2.5. extrapolation end games with Puiseux series - |-- Trackers : 2.6. path-tracking routines + |-- Newton : 2.3. Newton's method, deflation, verification + |-- Curves : 2.4. univariate solving and algebraic curves + |-- End_Games : 2.5. polyhedral end games + |-- Trackers : 2.6. the path trackers |-- Sweep : 2.7. sweeping for singularities - |-- Continuation : 2.8. drivers and data management + |-- Continuation : 2.8. main continuation + +All programs defined by the code in Deformations require the homotopy +and the start solutions on input. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/mergesols.adb phcpack-2.4.85/src/Ada/Deformations/Solutions/mergesols.adb --- phcpack-2.4.84/src/Ada/Deformations/Solutions/mergesols.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/mergesols.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Communications_with_User; use Communications_with_User; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; - -procedure mergesols is - --- DESCRIPTION : --- Reads two solution lists from file. --- Writes all different solutions to file. - - function Pointer_to_Last ( l : Solution_List ) return Solution_List is - - begin - if Is_Null(l) - then return l; - elsif Is_Null(Tail_Of(l)) - then return l; - else return Pointer_to_Last(Tail_Of(l)); - end if; - end Pointer_to_Last; - - function Merge_Solutions ( l1,l2 : Solution_List; tol : double_float ) - return Solution_List is - - res,res_last,tmp : Solution_List; - sol : Link_to_Solution; - - begin - Copy(l1,res); - res_last := Pointer_to_Last(res); - tmp := l2; - while not Is_Null(tmp) loop - sol := Head_Of(tmp); - if not Is_In(l1,sol.all,tol) - then Append(res,res_last,sol.all); - end if; - tmp := Tail_Of(tmp); - end loop; - return res; - end Merge_Solutions; - - procedure Main is - - infile,outfile : file_type; - sols1,sols2 : Solution_List; - tol : double_float; - - begin - new_line; - put_line("Merging two lists of solutions."); - new_line; - put_line("Reading the name of the file for the first list."); - Read_Name_and_Open_File(infile); - get(infile,sols1); - Close(infile); - new_line; - put_line("Reading the name of the file for the second list."); - Read_Name_and_Open_File(infile); - get(infile,sols2); - Close(infile); - new_line; - put_line("Reading the name of the output file."); - Read_Name_and_Create_File(outfile); - new_line; - put("Give the clustering tolerance : "); get(tol); - declare - sols : Solution_List := Merge_Solutions(sols1,sols2,tol); - begin - put("There are "); put(Length_Of(sols),1); - put_line(" distinct solutions."); - put(outfile,Length_Of(sols),Head_Of(sols).n,sols); - end; - Close(outfile); - end Main; - -begin - Main; -end mergesols; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/READ_ME phcpack-2.4.85/src/Ada/Deformations/Solutions/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Solutions/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Solutions of systems and homotopies in PHCv2.4.84 +Solutions of systems and homotopies in PHCv2.4.85 The second release introduced the solution vectors with multiprecision. Version 2.3 has an improved Maple interface. @@ -15,6 +15,11 @@ (2) solution filters, as available in option #0 of phc -f; (3) various utilities to manipulate solutions. +Run "gprbuild solutions.gpr" to make all test programs. +On windows, type "gprbuild solutions.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean solutions.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -117,7 +122,7 @@ ts_contab : test on frequency tables for solutions ------------------------------------------------------------------------------ solution_drops : drop a coordinate of a solution -ts_drops : interactive tests on solution drops +ts_soldrop : interactive tests on solution drops varbprec_complex_solutions : variable precision solutions ------------------------------------------------------------------------------ standard_mixed_residuals : residuals in standard double precision @@ -131,7 +136,3 @@ The standard and multiprecision solutions lists are two separate packages, not implemented by means of generics, because of the difficulties with mixed real-complex numbers. - -Note: some little tools have been added to manipulate lists of solutions. - -mergesols : merge the list of solutions diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/solutions.gpr phcpack-2.4.85/src/Ada/Deformations/Solutions/solutions.gpr --- phcpack-2.4.84/src/Ada/Deformations/Solutions/solutions.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/solutions.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,55 @@ +project solutions is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_sols.adb", -- tests i/o of solutions + "ts_ddsols.adb", -- tests double double complex solutions + "ts_qdsols.adb", -- tests quad double complex solutions + "ts_solstr.adb", -- tests string representations + "ts_getstart.adb", -- tests the extract the start system + "ts_solfilt.adb", -- tests the solution filters + "ts_grepsols.adb", -- tests the selection of solutions + "ts_mapsols_io.adb", -- tests the Maple output format + "ts_dicsols_io.adb", -- tests the dictionary solutions + "ts_solar.adb", -- tests lists of solution arrays + "ts_ptlists.adb", -- tests sorting point lists + "ts_quadpart.adb", -- tests the partitioning with quad tree + "ts_quad.adb", -- tests the quad tree development + "ts_selsol.adb", -- tests selecting solutions from file + "ts_trasols_io.adb", -- tests processing output files of trackers + "ts_contab.adb", -- tests frequency tables for solutions + "ts_soldrop.adb", -- interactive tests on solution drops + "ts_mixres.adb" -- tests the residual computations + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end solutions; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/standard_select_solutions.adb phcpack-2.4.85/src/Ada/Deformations/Solutions/standard_select_solutions.adb --- phcpack-2.4.84/src/Ada/Deformations/Solutions/standard_select_solutions.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/standard_select_solutions.adb 2021-06-30 23:22:40.000000000 +0000 @@ -29,7 +29,7 @@ begin new_line; - put("Are the solutions preceeded by a system ? (y/n) "); + put("Are the solutions preceded by a system ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'y' then bannered := true; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/ts_quad.adb phcpack-2.4.85/src/Ada/Deformations/Solutions/ts_quad.adb --- phcpack-2.4.84/src/Ada/Deformations/Solutions/ts_quad.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/ts_quad.adb 2021-06-30 23:22:40.000000000 +0000 @@ -405,7 +405,7 @@ put_line("Reading solution list first into memory..."); Read_Name_and_Open_File(infile); new_line; - put("Is the solution list preceeded by a system ? (y/n) "); + put("Is the solution list preceded by a system ? (y/n) "); Ask_Yes_or_No(ans); if ans = 'n' then get(infile,sols); fail := false; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Solutions/UPDATES phcpack-2.4.85/src/Ada/Deformations/Solutions/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Solutions/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Solutions/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Fri 15 Jun 2021 : removed the obsolete mergesols.adb. + +Thu 10 Jun 2021 : added the exec_dir attribute to solutions.gpr. + +Wed 9 Jun 2021 : defined solutions.gpr to build the test procedures. + Mon 22 Feb 2021 : to standard_system_and_solutions_io added a main procedure. Wed 17 Feb 2021 : moved the scan_for_start_system from ts_getstart diff -Nru phcpack-2.4.84/src/Ada/Deformations/Sweep/READ_ME phcpack-2.4.85/src/Ada/Deformations/Sweep/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Sweep/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Sweep/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,8 +1,13 @@ -Sweeping for singularities and parameter continuation in PHCv2.4.82 +Sweeping for singularities and parameter continuation in PHCv2.4.85 For clarity, this directory was isolated from Continuation in v2.3.75. The path trackers in this directory rely on natural parameter homotopies. +Run "gprbuild sweep.gpr" to make all test programs. +On windows, type "gprbuild sweep.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean sweep.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Deformations/Sweep/sweep.gpr phcpack-2.4.85/src/Ada/Deformations/Sweep/sweep.gpr --- phcpack-2.4.84/src/Ada/Deformations/Sweep/sweep.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Sweep/sweep.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,45 @@ +project sweep is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Trackers", "../Continuation"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Trackers", "../Continuation"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_parcon.adb", -- stand-alone calling program + "ts_realcont.adb" -- development of real path tracking + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end sweep; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Sweep/UPDATES phcpack-2.4.85/src/Ada/Deformations/Sweep/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Sweep/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Sweep/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to sweep.gpr. + +Wed 9 Jun 2021 : defined sweep.gpr to build the test procedures. + Sun 8 Nov 2020 : updated parameter_homotopy_continuation.adb for the renaming of drivers_for_poly_continuation into main_poly_continuation. diff -Nru phcpack-2.4.84/src/Ada/Deformations/Trackers/READ_ME phcpack-2.4.85/src/Ada/Deformations/Trackers/READ_ME --- phcpack-2.4.84/src/Ada/Deformations/Trackers/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Trackers/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Predictors, correctors, and path trackers in PHCv2.4.84 +Predictors, correctors, and path trackers in PHCv2.4.85 This directory is newly created in version 2.3.75 to focus on the predictors, correctors, and path trackers. Higher-order extrapolators @@ -23,6 +23,11 @@ Version 2.3.84 offers a basic version of a path tracker with a get_next method, i.e.: with a generator, for use in phcpy. +Run "gprbuild trackers.gpr" to make all test programs. +On windows, type "gprbuild trackers.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean trackers.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Deformations/Trackers/standard_monomial_correctors.adb phcpack-2.4.85/src/Ada/Deformations/Trackers/standard_monomial_correctors.adb --- phcpack-2.4.84/src/Ada/Deformations/Trackers/standard_monomial_correctors.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Trackers/standard_monomial_correctors.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -with Standard_Natural_Vectors; -with Standard_Complex_Norms_Equals; use Standard_Complex_Norms_Equals; -with Standard_Complex_Linear_Solvers; use Standard_Complex_Linear_Solvers; -with Handle_Underflow_Gracefully; use Handle_Underflow_Gracefully; -with Process_io; use Process_io; - -package body Standard_Monomial_Correctors is - - procedure Affine_Single_Severe_Normal_Silent_Corrector - ( s : in out Solu_Info; c : in Corr_Pars ) is - - vx : constant Vector := V(s.sol.v,s.sol.t); - y : Vector(s.sol.v'range) := F(vx); - A : Matrix(y'range,y'range); - ipvt : Standard_Natural_Vectors.Vector(y'range); - info : integer; - nit : natural := 0; - ncora,nresa,rcorr,nresr : double_float; - - begin - while nit < c.maxit loop -- stop when max #iterations reached - A := J(vx); - lufac(A,A'last(1),ipvt,info); - exit when (info /= 0); -- stop when singular Jacobian - Min(y); - lusolve(A,A'last(1),ipvt,y); ncora := Norm(y); - Add(s.sol.v,y); s.length_path := s.length_path + s.cora; - end loop; - exception - when others => Underflow_to_Zero(s.sol.v); return; - end Affine_Single_Severe_Normal_Silent_Corrector; - - procedure Affine_Single_Severe_Conditioned_Silent_Corrector - ( s : in out Solu_Info; c : in Corr_Pars ) is - begin - null; - end Affine_Single_Severe_Conditioned_Silent_Corrector; - - procedure Affine_Single_Severe_Normal_Reporting_Corrector - ( file : in file_type; - s : in out Solu_Info; c : in Corr_Pars ) is - begin - null; - end Affine_Single_Severe_Normal_Reporting_Corrector; - - procedure Affine_Single_Severe_Conditioned_Reporting_Corrector - ( file : in file_type; - s : in out Solu_Info; c : in Corr_Pars ) is - begin - null; - end Affine_Single_Severe_Conditioned_Reporting_Corrector; - -end Standard_Monomial_Correctors; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Trackers/standard_monomial_correctors.ads phcpack-2.4.85/src/Ada/Deformations/Trackers/standard_monomial_correctors.ads --- phcpack-2.4.84/src/Ada/Deformations/Trackers/standard_monomial_correctors.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Trackers/standard_monomial_correctors.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -with text_io; use text_io; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Complex_Vectors; use Standard_Complex_Vectors; -with Standard_Complex_Matrices; use Standard_Complex_Matrices; -with Standard_Continuation_Data; use Standard_Continuation_Data; - -package Standard_Monomial_Correctors is - --- DESCRIPTION : --- This package offers implementation of a corrector method for use in --- an increment-and-fix continuation method. --- To evaluate the polynomials and their derivatives, a flattened sparse --- monomial representation is expected to instantiate the routines. --- The generic parameters of all correctors are --- Norm : a vector norm, --- V : evaluates the monomial vector of the homotopy; --- F : given the monomial vector, evaluates the polynomials; --- J : given the monomial vector, evaluates the derivatives. --- Four different flavors of the correctors are currently implemented: --- (normal,conditioned) : a normal corrector does not estimate the --- inverse of the condition number, but a conditioned one does; --- (silent,reporting) : a reporting corrector writes intermediate output --- to file, whereas a silent one stays silent. --- The other qualifiers mean the following : --- affine : instead of projective space; --- single : corrects only one solution; --- severe : aborts as soon as divergence is observed. - - generic - with function Norm ( x : Vector ) return double_float; - with function V ( x : Vector; t : Complex_Number ) return Vector; - with function F ( vxt : Vector ) return Vector; - with function J ( vxt : Vector ) return Matrix; - procedure Affine_Single_Severe_Normal_Silent_Corrector - ( s : in out Solu_Info; c : in Corr_Pars ); - - generic - with function Norm ( x : Vector ) return double_float; - with function V ( x : Vector; t : Complex_Number ) return Vector; - with function F ( vxt : Vector ) return Vector; - with function J ( vxt : Vector ) return Matrix; - procedure Affine_Single_Severe_Conditioned_Silent_Corrector - ( s : in out Solu_Info; c : in Corr_Pars ); - - generic - with function Norm ( x : Vector ) return double_float; - with function V ( x : Vector; t : Complex_Number ) return Vector; - with function F ( vxt : Vector ) return Vector; - with function J ( vxt : Vector ) return Matrix; - procedure Affine_Single_Severe_Normal_Reporting_Corrector - ( file : in file_type; - s : in out Solu_Info; c : in Corr_Pars ); - - generic - with function Norm ( x : Vector ) return double_float; - with function V ( x : Vector; t : Complex_Number ) return Vector; - with function F ( vxt : Vector ) return Vector; - with function J ( vxt : Vector ) return Matrix; - procedure Affine_Single_Severe_Conditioned_Reporting_Corrector - ( file : in file_type; - s : in out Solu_Info; c : in Corr_Pars ); - - -- DESCRIPTION : - -- Corrects the solution to the homotopy defined by F - -- and Jacobian matrix at J. - - -- ON ENTRY : - -- file for intermediate output and diagnostics; - -- s current solution; - -- c numerical settings for the parameters. - - -- ON RETURN : - -- s corrected solution. - -end Standard_Monomial_Correctors; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Trackers/trackers.gpr phcpack-2.4.85/src/Ada/Deformations/Trackers/trackers.gpr --- phcpack-2.4.84/src/Ada/Deformations/Trackers/trackers.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Trackers/trackers.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,51 @@ +project trackers is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Continuation", + "../../Root_Counts/Product"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Supports", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../Solutions", "../Homotopy", "../Newton", "../Curves", + "../End_Games", "../Continuation", + "../../Root_Counts/Product"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_correct.adb", -- tests correctors + "ts_ortocor.adb", -- tests orthogonal correctors + "ts_preco.adb", -- tests predictor and corrector + "ts_path.adb", -- tests path trackers + "ts_nxtsol.adb", -- tests path tracker with generator + "ts_track.adb" -- tests path tracking with increment read/write + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end trackers; diff -Nru phcpack-2.4.84/src/Ada/Deformations/Trackers/UPDATES phcpack-2.4.85/src/Ada/Deformations/Trackers/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/Trackers/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/Trackers/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribut to trackers.gpr. + +Wed 9 Jun 2021 : defined trackers.gpr to build the test procedures. + Tue 23 Feb 2021 : updated ts_correct.adb, ts_ortocor.adb, ts_path.adb for the renaming of drivers_for_polynomial_continuation. diff -Nru phcpack-2.4.84/src/Ada/Deformations/UPDATES phcpack-2.4.85/src/Ada/Deformations/UPDATES --- phcpack-2.4.84/src/Ada/Deformations/UPDATES 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Deformations/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,10 @@ +Tue 15 Jun 2021 : added deformations.gpr to build all test procedures. + +Tue 14 May 2013 : new directory curves for solving univariate polynomials + and working with plane algebraic curves. + +Mon 21 Jan 2013 : the Continuation directory in Deformation was split into + End_Games, Sweep, Trackers, and Continuation. + +Sun 20 Jan 2013 : new directory "Deformations" houses Homotopy, Newton, + and Continuation. The directory Differentials moves to Experiments. diff -Nru phcpack-2.4.84/src/Ada/Main/convert_formats.adb phcpack-2.4.85/src/Ada/Main/convert_formats.adb --- phcpack-2.4.84/src/Ada/Main/convert_formats.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/convert_formats.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -with text_io; use text_io; -with Communications_with_User; use Communications_with_User; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Tableau_Formats; - -procedure convert_formats is - --- DESCRIPTION : --- This program allows to convert between formats of polynomial systems. --- --- SYMBOLIC FORMAT : --- --- 2 --- x*y**2 - x**2 + 3; --- x + 2; --- --- TABLEAU FORMAT : --- --- 2 --- x y --- 3 --- 1 2 --- 2 0 --- 0 0 --- 2 --- 1 0 --- 0 0 --- 1.0 0.0 --- -1.0 0.0 --- 3.0 0.0 --- 1.0 0.0 --- 2.0 0.0 - - procedure Tableau_to_Symbolic ( infile,outfile : in file_type; - flt : in boolean ) is - - lp : Link_to_Poly_Sys; - - begin - Tableau_Formats.get(infile,flt,lp); - put(outfile,lp'last,lp.all); - end Tableau_to_Symbolic; - - procedure Symbolic_to_Tableau ( infile,outfile : in file_type; - flt : in boolean ) is - - lp : Link_to_Poly_Sys; - - begin - get(infile,lp); - Tableau_Formats.put(outfile,flt,lp.all); - end Symbolic_to_Tableau; - - procedure Main is - - infile,outfile : file_type; - ans : character; - flt,sym2tab : boolean; - lp : Link_to_Poly_Sys; - - begin - new_line; - put_line("Conversion between symbolic and tableau formats."); - new_line; - put_line("Choose one of the following : "); - put_line(" 1. Convert from symbolic to tableau format"); - put_line(" 2. Convert from tableau to symbolic format"); - put("Type 1 or 2 to select : "); Ask_Alternative(ans,"12"); - sym2tab := (ans = '1'); - new_line; - put_line("Reading the name of the input file."); - Read_Name_and_Open_File(infile); - new_line; - put_line("Reading the name of the output file."); - Read_Name_and_Create_File(outfile); - new_line; - put("Are the coefficients real or complex ? (r/c) "); - Ask_Alternative(ans,"rc"); - flt := (ans = 'r'); - if sym2tab - then Symbolic_to_Tableau(infile,outfile,flt); - else Tableau_to_Symbolic(infile,outfile,flt); - end if; - end Main; - -begin - Main; -end convert_formats; diff -Nru phcpack-2.4.84/src/Ada/Main/greeting_banners.adb phcpack-2.4.85/src/Ada/Main/greeting_banners.adb --- phcpack-2.4.84/src/Ada/Main/greeting_banners.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/greeting_banners.adb 2021-06-30 23:22:40.000000000 +0000 @@ -4,7 +4,7 @@ function Version return string is - res : constant string := "PHCv2.4.84 released 2020-02-26"; + res : constant string := "PHCv2.4.85 released 2020-06-30"; begin return res; diff -Nru phcpack-2.4.84/src/Ada/Main/greeting_banners.ads phcpack-2.4.85/src/Ada/Main/greeting_banners.ads --- phcpack-2.4.84/src/Ada/Main/greeting_banners.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/greeting_banners.ads 2021-06-30 23:22:40.000000000 +0000 @@ -5,7 +5,7 @@ -- Exports the version string. welcome : constant string := - "Welcome to PHC (Polynomial Homotopy Continuation) v2.4.84 26 Feb 2021"; + "Welcome to PHC (Polynomial Homotopy Continuation) v2.4.85 30 Jun 2021"; compban : constant string := "a numerical irreducible decomposition for solution sets"; diff -Nru phcpack-2.4.84/src/Ada/Main/main.gpr phcpack-2.4.85/src/Ada/Main/main.gpr --- phcpack-2.4.84/src/Ada/Main/main.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/main.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,189 @@ +project main is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../System", "../System/Unix_Timer", + "../Math_Lib/Numbers", "../Math_Lib/QD", + "../Math_Lib/Vectors", "../Math_Lib/Matrices", + "../Math_Lib/Reduction", "../Math_Lib/Divisors", + "../Math_Lib/Polynomials", "../Math_Lib/Functions", + "../Math_Lib/Supports", "../Math_Lib/Series", + "../Math_Lib/Circuits", "../Math_Lib/Laurent", + "../Deformations/Solutions", "../Deformations/Homotopy", + "../Deformations/Newton", "../Deformations/Curves", + "../Deformations/End_Games", + "../Deformations/Trackers", "../Deformations/Sweep", + "../Deformations/Continuation", + "../Root_Counts/Product", "../Root_Counts/Binomials", + "../Root_Counts/Implift", "../Root_Counts/Stalift", + "../Root_Counts/Dynlift", "../Root_Counts/Symmetry", + "../Root_Counts/MixedVol", "../Root_Counts/Puiseux", + "../Root_Counts/DEMiCs", + "../Schubert/SAGBI", "../Schubert/Pieri", + "../Schubert/Induction", + "../Components/Samplers", "../Components/Interpolators", + "../Components/Factorization", "../Components/Decomposition", + "../Components/Solver", "../Components/Tropical", + "../CtoPHC/Types", "../CtoPHC/Structures", + "../CtoPHC/Funky", "../CtoPHC/State", "../Tasking", + "../../Feedback" + ); + for Excluded_Source_Files use + ( + "ts_use_syscon.c", + "corecount.c", "corecountwindows.c", + "ts_smith.c", "ts_roots.c", "ts_timer.c", "ts_gcd.c", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb" + ); + for Languages use ("Ada", "C++", "C"); + when "windows" => + for Source_Dirs use + ( + ".", "../System", "../System/Basic_Timer", + "../Math_Lib/Numbers", "../Math_Lib/QD", + "../Math_Lib/Vectors", "../Math_Lib/Matrices", + "../Math_Lib/Reduction", "../Math_Lib/Divisors", + "../Math_Lib/Polynomials", "../Math_Lib/Functions", + "../Math_Lib/Supports", "../Math_Lib/Series", + "../Math_Lib/Circuits", "../Math_Lib/Laurent", + "../Deformations/Solutions", "../Deformations/Homotopy", + "../Deformations/Newton", "../Deformations/Curves", + "../Deformations/End_Games", + "../Deformations/Trackers", "../Deformations/Sweep", + "../Deformations/Continuation", + "../Root_Counts/Product", "../Root_Counts/Binomials", + "../Root_Counts/Implift", "../Root_Counts/Stalift", + "../Root_Counts/Dynlift", "../Root_Counts/Symmetry", + "../Root_Counts/MixedVol", "../Root_Counts/Puiseux", + "../Root_Counts/DEMiCs", + "../Schubert/SAGBI", "../Schubert/Pieri", + "../Schubert/Induction", + "../Components/Samplers", "../Components/Interpolators", + "../Components/Factorization", "../Components/Decomposition", + "../Components/Solver", "../Components/Tropical", + "../CtoPHC/Types", "../CtoPHC/Structures", + "../CtoPHC/Funky", "../CtoPHC/State", "../Tasking", + "../../Feedback" + ); + for Excluded_Source_Files use + ( + "corecount.c", + "ts_smith.c", "ts_roots.c", "ts_timer.c", "ts_gcd.c", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb" + ); + for Languages use ("Ada", "C", "C++"); + end case; + + for Object_Dir use "../../Objects"; + for Exec_Dir use "../../bin"; + + for Main use + ( + "phctop.adb" -- the main program + ); + + package Compiler is + + -- for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + for Default_Switches ("Ada") use ("-O3", "-gnatv", "-gnatp", "-gnatf"); + + for Switches ("use_c2phc.adb") use ("-c"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + end Compiler; + + package Binder is + + for Switches ("use_c2phc.adb") use ("-n"); + + for Switches ("pieri_solver.adb") use ("-n"); + + end Binder; + + package Linker is + + for Switches ("main.cpp") use ("-o demics"); + + for Switches ("phctop.ada") use ("pieri_sols.o"); + + end Linker; + +end main; diff -Nru phcpack-2.4.84/src/Ada/Main/option_handlers.adb phcpack-2.4.85/src/Ada/Main/option_handlers.adb --- phcpack-2.4.84/src/Ada/Main/option_handlers.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/option_handlers.adb 2021-06-30 23:22:40.000000000 +0000 @@ -25,7 +25,7 @@ with Main_Homotopy_Continuation; with Main_Trackers; with Main_Pade_Trackers; -with Main_ADE_Trackers; +-- with Main_ADE_Trackers; with Main_Factorization; with Main_Decomposition; with Main_Output_Feedback; @@ -519,7 +519,7 @@ Greeting_Banners.help4adepath; else put_line(welcome); put_line(adepban); - Main_ADE_Trackers.Main(vrblvl); + -- Main_ADE_Trackers.Main(vrblvl); end if; end Algorithmic_Differentiation_Handler; diff -Nru phcpack-2.4.84/src/Ada/Main/phctop.adb phcpack-2.4.85/src/Ada/Main/phctop.adb --- phcpack-2.4.84/src/Ada/Main/phctop.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/phctop.adb 2021-06-30 23:22:40.000000000 +0000 @@ -7,6 +7,8 @@ with String_Splitters; use String_Splitters; with Actions_and_Options; with Option_Handlers; +with use_c2phc; -- to force compilation on Windows +with pieri_solver; -- to force compilation procedure phctop is diff -Nru phcpack-2.4.84/src/Ada/Main/READ_ME phcpack-2.4.85/src/Ada/Main/READ_ME --- phcpack-2.4.84/src/Ada/Main/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Main interactive drivers and top level procedure in PHCv2.4.84 +Main interactive drivers and top level procedure in PHCv2.4.85 New in release 2.1 in this directory is the conversion between symbolic and tableau formats, plus the interface of the solutions in Maple format. @@ -22,6 +22,12 @@ 3. PHCpack as server package and how to use it 4. the top level procedure +Run "gprbuild main.gpr" to make phctop, phc without -j. +On windows, type "gprbuild main.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean main.gpr" removes all files created by gprbuild. +On windows, add the "-Xos=windows" at the end of the gprclean command. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Main/tableau_formats.adb phcpack-2.4.85/src/Ada/Main/tableau_formats.adb --- phcpack-2.4.84/src/Ada/Main/tableau_formats.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/tableau_formats.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,257 +0,0 @@ -with integer_io; use integer_io; -with Communications_with_User; use Communications_with_User; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; -with Standard_Natural_Vectors; -with Standard_Integer_Vectors; -with Standard_Complex_Vectors; -with Standard_Complex_VecVecs; use Standard_Complex_VecVecs; -with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; -with Lists_of_Integer_Vectors_io; use Lists_of_Integer_Vectors_io; -with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; -with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; -with Symbol_Table,Symbol_Table_io; use Symbol_Table; -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Power_Lists; use Power_Lists; - -package body Tableau_Formats is - --- AUXILIARIES : - - procedure Read_Symbols ( file : in file_type; n : in natural ) is - - -- DESCRIPTION : - -- Reads n symbols from file. - - begin - Symbol_Table.Init(n); - for i in 1..n loop - declare - s : Symbol; - begin - Symbol_Table_io.get(file,s); - Symbol_Table.Add(s); - end; - end loop; - end Read_Symbols; - - procedure Write_Symbols ( file : in file_type ) is - - -- DESCRIPTION : - -- Writes the content of the symbol table on file. - - n : constant natural := Symbol_Table.Number; - - begin - put(file,n,1); new_line(file); - for i in 1..n loop - declare - s : Symbol := Symbol_Table.Get(i); - begin - put(file," "); - Symbol_Table_io.put(file,s); - end; - end loop; - new_line(file); - end Write_Symbols; - - procedure Read_Exponents ( file : in file_type; - exp : in out Array_of_Lists ) is - - -- DESCRIPTION : - -- Reads exponent vectors from file. - -- Each list of exponent vectors should be preceded by the number - -- of elements in the list. - - n : constant natural := exp'length; - m : natural; - - begin - for i in exp'range loop - get(file,m); - get(file,n,m,exp(i)); - end loop; - end Read_Exponents; - - procedure Write_Exponents ( file : in file_type; p : in Poly_Sys ) is - - -- DESCRIPTION : - -- Writes the supports of p on file. - - exp : Array_of_Lists(p'range) := Create(p); - - begin - for i in exp'range loop - put(file,Length_Of(exp(i)),1); new_line(file); - put(file,exp(i)); - end loop; - Deep_Clear(exp); - end Write_Exponents; - - procedure Read_Coefficients - ( file : in file_type; - exp : in Array_of_Lists; flt : in boolean; - cff : in out VecVec ) is - - -- DESCRIPTION : - -- Reads the coefficient from file, given the supports. - - f : double_float; - - begin - for i in cff'range loop - cff(i) := new Standard_Complex_Vectors.Vector(1..Length_Of(exp(i))); - for j in cff(i)'range loop - if flt - then get(file,f); cff(i)(j) := Create(f); - else get(file,cff(i)(j)); - end if; - end loop; - end loop; - end Read_Coefficients; - - procedure Write_Coefficients ( file : in file_type; flt : in boolean; - p : in Poly ) is - - -- DESCRIPTION : - -- Writes the coefficients of the polynomial on file. - -- If flt, then the imaginary parts will be omitted. - - procedure Write_Coefficient_of_Term ( t : in Term; cont : out boolean ) is - begin - if flt - then put(file,REAL_PART(t.cf)); - else put(file,t.cf); - end if; - new_line(file); - cont := true; - end Write_Coefficient_of_Term; - - procedure Write_Coefficients_of_Terms is - new Visiting_Iterator(Write_Coefficient_of_Term); - - begin - Write_Coefficients_of_Terms(p); - end Write_Coefficients; - - procedure Write_Coefficients ( file : in file_type; flt : in boolean; - p : in Poly_Sys ) is - - -- DESCRIPTION : - -- Writes the coefficients of the polynomial system on file. - -- If flt, then the imaginary parts will be omitted. - - begin - for i in p'range loop - Write_Coefficients(file,flt,p(i)); - end loop; - end Write_Coefficients; - - function Create ( exp : Standard_Integer_Vectors.Vector; - cff : Complex_Number ) return Term is - - -- DESCRIPTION : - -- Creates a term from exponent vector and coefficient. - - res : Term; - - begin - res.cf := cff; - res.dg := new Standard_Natural_Vectors.Vector(exp'range); - for i in exp'range loop - res.dg(i) := exp(i); - end loop; - return res; - end Create; - - function Create ( exp : List; cff : Standard_Complex_Vectors.Vector ) - return Poly is - - -- DESCRIPTION : - -- Creates a polynomial from the exponents and the coefficients. - - res : Poly; - tmp : List := exp; - lpt : Standard_Integer_Vectors.Link_to_Vector; - - begin - for i in cff'range loop - lpt := Head_Of(tmp); - declare - t : Term := Create(lpt.all,cff(i)); - begin - Add(res,t); - end; - tmp := Tail_Of(tmp); - end loop; - return res; - end Create; - - function Create ( exp : Array_of_Lists; cff : VecVec ) return Poly_Sys is - - -- DESCRIPTION : - -- Creates the polynomial system from the supports and coefficients. - - res : Poly_Sys(exp'range); - - begin - for i in res'range loop - res(i) := Create(exp(i),cff(i).all); - end loop; - return res; - end Create; - --- TARGET ROUTINES : - - procedure get ( file : in file_type; realcoeff : in boolean; - p : out Link_to_Poly_Sys ) is - - n : natural; - - begin - get(file,n); - new_line; - put("Dimension : "); put(n,1); new_line; - Read_Symbols(file,n); - put("Symbols :"); - for i in 1..n loop - put(" "); put(Symbol_Table.get(i)); - end loop; - new_line; - declare - exp : Array_of_Lists(1..n); - cff : VecVec(1..n); - sys : Poly_Sys(1..n); - begin - Read_Exponents(file,exp); - put_line("The exponents : "); - put(exp); - Read_Coefficients(file,exp,realcoeff,cff); - put_line("The coefficients : "); - for i in cff'range loop - for j in cff(i)'range loop - put(cff(i)(j)); new_line; - end loop; - new_line; - end loop; - sys := Create(exp,cff); - put_line("The polynomial system : "); put(sys); - p := new Poly_Sys'(sys); - end; - end get; - - procedure put ( file : in file_type; realcoeff : in boolean; - p : in Poly_Sys ) is - - begin - if not Symbol_Table.Empty - then Write_Symbols(file); - end if; - Write_Exponents(file,p); - Write_Coefficients(file,realcoeff,p); - end put; - -end Tableau_Formats; diff -Nru phcpack-2.4.84/src/Ada/Main/tableau_formats.ads phcpack-2.4.85/src/Ada/Main/tableau_formats.ads --- phcpack-2.4.84/src/Ada/Main/tableau_formats.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/tableau_formats.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -with text_io; use text_io; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; - -package Tableau_Formats is - --- DESCRIPTION : --- Conversion between tableau and symbolic formats of polynomial systems. --- --- SYMBOLIC FORMAT : --- --- 2 --- x*y**2 - x**2 + 3; --- x + 2; --- --- TABLEAU FORMAT : --- --- 2 --- x y --- 3 --- 1 2 --- 2 0 --- 0 0 --- 3 --- 1 0 --- 0 0 --- 1.0 0.0 --- -1.0 0.0 --- 3.0 0.0 --- 1.0 0.0 --- 2.0 0.0 - - procedure get ( file : in file_type; realcoeff : in boolean; - p : out Link_to_Poly_Sys ); - - -- DESCRIPTION : - -- Reads a polynomial system in tableau format from file. - -- If realcoeff, then the imaginary part must be omitted. - - procedure put ( file : in file_type; realcoeff : in boolean; - p : in Poly_Sys ); - - -- DESCRIPTION : - -- Writes a polynomial system in tableau format on file. - -- If realcoeff, then the imaginary part is not written. - -end Tableau_Formats; diff -Nru phcpack-2.4.84/src/Ada/Main/UPDATES phcpack-2.4.85/src/Ada/Main/UPDATES --- phcpack-2.4.84/src/Ada/Main/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Main/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,17 @@ +Wed 30 Jun 2021 : fixed feedback so main.gpr can build also the -k option, + after uncommenting out the proper code in option_handlers. + The main.gpr now builds phc almost entirely, except for phc -j. + To phctop.adb, added with pieri_solver to force its compilation. + Excluded ts_use_syscon.c in main.gpr for the build of phctop on macOS. + +Tue 29 Jun 2021 : in option_handlers.adb commented out the code for phc -j + and phc -k so the main.gpr works on Linux to build phctop. + Updated phctop.adb to force the compilation of use_c2phc on Windows. + Updated greeting_banners for version 2.4.85. + +Sun 13 Jun 2021 : removed obsolete tableau_formats package and the + convert_formats.adb. + Fri 26 Feb 2021 : fixed the dates in greeting_banners. Wed 24 Feb 2021 : updated greeting_banners for version 2.4.84. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/AD/ad.gpr phcpack-2.4.85/src/Ada/Math_Lib/AD/ad.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/AD/ad.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/AD/ad.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,39 @@ +project ad is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_monom.adb", -- tests the monomials + "ts_monvec.adb", -- tests the monomial vectors + "ts_polvec.adb", -- tests the polynomial vectors + "ts_sys2vec.adb" -- tests system to polynomial vector converts + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end ad; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/AD/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/AD/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/AD/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/AD/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,8 +1,12 @@ -Algorithmic differentation from the Path library for PHCv2.4.63 +Algorithmic differentation from the Path library for PHCv2.4.85 The packages in this folder are based on the reference code on the host of the GPU library Path, developed by Xiangcheng Yu. +Run "gprbuild ad.gpr" to make all test programs. +On windows, type "gprbuild ad.gpr -Xos=windows" at the PowerShell prompt. +The "gprclean ad.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/AD/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/AD/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/AD/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/AD/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to ad.gpr. + +Tue 8 Jun 2021 : defined ad.gpr to build the test procedures. + Fri 21 Dec 2018 : new type system in generic_polynomial_vectors to hold maximal exponents, which extended random_polynomial_vectors, all *polynomial_vectors_io, system_vector_convertors, and the diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Circuits/circuits.gpr phcpack-2.4.85/src/Ada/Math_Lib/Circuits/circuits.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Circuits/circuits.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Circuits/circuits.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,53 @@ +project circuits is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions", "../Series", "../../Deformations/Solutions" ); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions", "../Series", "../../Deformations/Solutions" ); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_vmpeval.adb", -- tests variable precision evaluation + "ts_vmpdiff.adb", -- tests variable precision differentiation + "ts_cffsup.adb", -- tests coefficient supported polynomials + "ts_speel.adb", -- development of Speelpenning product + "ts_speelsys.adb", -- tests eval and diff of systems + "ts_cycfun.adb", -- tests the cyclic n-roots problems + "ts_gradcirc.adb", -- tests on eval & diff circuits + "ts_speelser.adb", -- tests reverse mode on power series + "ts_speelcnv.adb", -- tests convolutions for series polynomials + "ts_fabry.adb", -- tests the Fabry ratio theorem + "ts_evalcnv.adb", -- tests plain evaluation + "ts_hesscnv.adb", -- tests plain Hessian computation + "ts_jacocnv.adb", -- tests plain Jacobian computation + "ts_shiftcnv.adb", -- tests shifting coefficients + "ts_perfconv.adb", -- tests performance and convolutions + "ts_perfcirc.adb", -- tests performance of splitted circuits + "ts_perfade.adb", -- tests performance of algo diff eval + "ts_perfhess.adb" -- tests Hessian circuits + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end circuits; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Circuits/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Circuits/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Circuits/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Circuits/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Algorithmic differentiation and arithmetic circuits in PHCv2.4.83 +Algorithmic differentiation and arithmetic circuits in PHCv2.4.85 This directory was created new in v2.3.98, with code that had been building up in the directory Functions. In Functions, polynomials are evaluated by @@ -16,6 +16,11 @@ Since the different ways to evaluate polynomials use different orders of computation, the results may differ when multiprecision arithmetic is used. +Run "gprbuild circuits.gpr" to make all test programs. +On windows, type "gprbuild circuits.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean circuits.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Circuits/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Circuits/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Circuits/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Circuits/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to circuits.gpr. + +Tue 8 Jun 2021 : defined circuits.gpr to build the test procedures. + Sat 5 Dec 2020 : added wrappers to convergence_radius_estimates. Sat 24 Oct 2020 : to decadobl_circuit_makers added functions to convert diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Divisors/divisors.gpr phcpack-2.4.85/src/Ada/Math_Lib/Divisors/divisors.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Divisors/divisors.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Divisors/divisors.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,38 @@ +project divisors is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Polynomials", "../Supports"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Polynomials", "../Supports"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_gcd.adb", -- tests greatest common divisors + "ts_intlina.adb", -- tests integer linear solvers + "ts_smith.adb", -- tests normal forms + "ts_intinv.adb", -- tests the inverse of integer matrix + "ts_circuit.adb" -- tests circuit computation + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end divisors; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Divisors/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Divisors/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Divisors/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Divisors/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Integer Linear Algebra in PHCv2.4.80 +Integer Linear Algebra in PHCv2.4.85 This "Divisors" directory implements the greatest common divisors method to perform fraction-free row reduction on linear systems of integer numbers, @@ -14,6 +14,11 @@ In version 2.4.80, the test procedures were organized in test packages. +Run "gprbuild divisors.gpr" to make all test programs. +On windows, type "gprbuild divisors.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean divisors.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Divisors/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Divisors/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Divisors/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Divisors/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to divisors.gpr. + +Tue 8 Jun 2021 : defined divisors.gpr to build the test procedures. + Sun 6 Sep 2020 : moved the test procedures from ts_gcd, ts_intlina, ts_smith, ts_intinv, ts_circuit into new packages test_greatest_common_divisors, test_integer_linear_solvers, test_normal_forms, test_integer_inverse, diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Functions/functions.gpr phcpack-2.4.85/src/Ada/Math_Lib/Functions/functions.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Functions/functions.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Functions/functions.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,41 @@ +project functions is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Circuits"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Circuits"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_evaline.adb", -- calls the evaluator package + "ts_evalpoly.adb", -- development of nested Horner scheme + "ts_expvec.adb", -- tests exponent vector extraction + "ts_polyflat.adb", -- tests the flattening + "ts_perfeval.adb", -- performance testing on poly evaluation + "ts_evddpol.adb" -- evaluation of double double polynomials + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end functions; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Functions/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Functions/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Functions/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Functions/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Polynomial evaluation and differentiation algorithms in PHCv2.4.80 +Polynomial evaluation and differentiation algorithms in PHCv2.4.85 This directory was created new in v2.3.69, collecting the former nested Horner scheme algorithms of the directory polynomials, and with the new @@ -14,6 +14,11 @@ Since the different ways to evaluate polynomials use different orders of computation, the results may differ when multiprecision arithmetic is used. +Run "gprbuild functions.gpr" to make all test programs. +On windows, type "gprbuild functions.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean functions.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Functions/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Functions/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Functions/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Functions/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to functions.gpr. + +Tue 8 Jun 2021 : defined functions.gpr to build the test procedures. + Wed 23 Sep 2020 : defined {trip,pent,octo,deca}dobl_complex_poly_functions and {trip,pent,octo,deca}dobl_complex_poly_sysfun. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_laurent_series.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_laurent_series.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_laurent_series.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_laurent_series.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,229 @@ +with text_io; use text_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Numbers; use Standard_Complex_Numbers; +with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; + +package body Double_Laurent_Series is + + procedure Write ( e : in integer32; + c : in Standard_Complex_Vectors.Vector ) is + begin + Write(standard_output,e,c); + end Write; + + procedure Write ( file : in file_type; e : in integer32; + c : in Standard_Complex_Vectors.Vector ) is + begin + for i in c'range loop + if i > c'first + then put(file," + ("); + else put(file," ("); + end if; + put(file,c(i)); put(file,")*t^"); put(file,e+i,1); + new_line(file); + end loop; + end Write; + + procedure Multiply ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector ) is + begin + ze := xe + ye; + for i in 0..d loop + zc(i) := xc(0)*yc(i); + for j in 1..i loop + zc(i) := zc(i) + xc(j)*yc(i-j); + end loop; + end loop; + end Multiply; + + procedure Inverse ( d,xe : in integer32; + xc : in Standard_Complex_Vectors.Vector; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector ) is + begin + ye := -xe; + yc(0) := 1.0/xc(0); + for i in 1..d loop + yc(i) := -xc(1)*yc(i-1); + for j in 2..i loop + yc(i) := yc(i) - xc(j)*yc(i-j); + end loop; + yc(i) := yc(i)/xc(0); + end loop; + end Inverse; + + procedure Divide ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + iyc : out Standard_Complex_Vectors.Vector ) is + + iye : integer32; + + begin + Inverse(d,ye,yc,iye,iyc); + Multiply(d,xe,iye,xc,iyc,ze,zc); + end Divide; + + function Is_Zero ( d : integer32; + c : Standard_Complex_Vectors.Vector; + tol : double_float := 1.0E-15 ) return boolean is + + begin + for i in 0..d loop + if (AbsVal(c(0)) > tol) + then return false; + end if; + end loop; + return true; + end Is_Zero; + + procedure Normalize ( d : in integer32; e : in out integer32; + c : in out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ) is + + allzero : boolean := true; + + begin + for i in 0..d loop + if (AbsVal(c(0)) > tol) + then allzero := false; exit; + end if; + e := e + 1; + for k in 1..d-i loop -- shift the coefficients + c(k-1) := c(k); + end loop; + for k in (d-i)..d loop -- must insert zeros at the end + c(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + if allzero + then e := 0; + end if; + end Normalize; + + function Exponent_Gap ( a,b : integer32 ) return integer32 is + + result : integer32 := 0; + + begin + if a <= b then + -- if a >= 0 then -- 0 <= a <= b + -- result := b - a; + -- else -- a < 0 + -- if b <= 0 then -- a <= b <= 0 + -- result := b - a; -- a is more negative than b, so result >= 0 + -- else -- a < 0 and b > 0 + -- result := b - a; + -- end if; + -- end if; + result := b - a; -- in all the above case, the same formula + else -- a > b + result := a - b; -- by symmetry with above case analysis + end if; + return result; + end Exponent_Gap; + + procedure Add ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ) is + + gap : integer32; -- gap between the leading coefficients + + begin + if Is_Zero(d,xc,tol) then -- z is a copy of y + ze := ye; + for i in 0..d loop + zc(i) := yc(i); + end loop; + elsif Is_Zero(d,yc,tol) then -- z is a copy of x + ze := xe; + for i in 0..d loop + zc(i) := xc(i); + end loop; + else + if xe < ye then + ze := xe; + gap := Exponent_Gap(xe,ye); + for i in 0..gap-1 loop + exit when (i > zc'last); + zc(i) := xc(i); + end loop; + for i in gap..d loop + zc(i) := xc(i) + yc(i-gap); + end loop; + elsif xe > ye then + ze := ye; + gap := Exponent_Gap(xe,ye); + for i in 0..gap-1 loop + exit when (i > zc'last); + zc(i) := yc(i); + end loop; + for i in gap..d loop + zc(i) := yc(i) + xc(i-gap); + end loop; + else -- xe = ye + ze := xe; + for i in 0..d loop + zc(i) := xc(i) + yc(i); + end loop; + Normalize(d,ze,zc,tol); + end if; + end if; + end Add; + + procedure Subtract ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ) is + + gap : integer32; -- gap between the leading coefficients + + begin + if Is_Zero(d,xc,tol) then -- z equals -y + ze := ye; + for i in 0..d loop + zc(i) := -yc(i); + end loop; + elsif Is_Zero(d,yc,tol) then -- z is a copy of x + ze := xe; + for i in 0..d loop + zc(i) := xc(i); + end loop; + else + if xe < ye then + ze := xe; + gap := Exponent_Gap(xe,ye); + for i in 0..gap-1 loop + exit when (i > zc'last); + zc(i) := xc(i); + end loop; + for i in gap..d loop + zc(i) := xc(i) - yc(i-gap); + end loop; + elsif xe > ye then + ze := ye; + gap := Exponent_Gap(xe,ye); + for i in 0..gap-1 loop + exit when (i > zc'last); + zc(i) := -yc(i); + end loop; + for i in gap..d loop + zc(i) := xc(i-gap) - yc(i); + end loop; + else -- xe = ye + ze := xe; + for i in 0..d loop + zc(i) := xc(i) - yc(i); + end loop; + Normalize(d,ze,zc,tol); + end if; + end if; + end Subtract; + +end Double_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_laurent_series.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_laurent_series.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_laurent_series.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_laurent_series.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,183 @@ +with text_io; use text_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Complex_Vectors; + +package Double_Laurent_Series is + +-- DESCRIPTION : +-- Defines operations on Laurent series with complex coefficients, +-- in double precision. +-- A Laurent series is defined by a leading exponent and a coefficient +-- vector, with a typical range from 0 to some degree d, d > 0. +-- In this intermediate proof-of-concept package, +-- the data are not encapsulated by types. + + procedure Write ( e : in integer32; + c : in Standard_Complex_Vectors.Vector ); + procedure Write ( file : in file_type; e : in integer32; + c : in Standard_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Writes the power series with leading exponent e + -- and coefficients in c, to standard output or to file. + + procedure Multiply ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Multiplies two Laurent series. + + -- REQUIRED : + -- All coefficient vectors range between 0 and d, + -- where d is the same constant for all series. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- xe leading exponent of the first series x; + -- ye leading exponent of the second series y; + -- xc coefficient vector of the first series x; + -- yc coefficient vector of the second series y. + + -- ON RETURN : + -- ze leading exponent of the product of x with y; + -- zc coefficient vector of the product of x with y. + + procedure Inverse ( d,xe : in integer32; + xc : in Standard_Complex_Vectors.Vector; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Computes the inverse of a Laurent series. + -- Any nonzero Laurent series has a nonzero leading coefficient. + + -- REQUIRED : xc'first = 0 = yc'first and xc'last = yc'last. + + -- ON ENTRY : + -- d truncation degree of the series; + -- xe leading exponent of a nonzero series x; + -- xc coefficient vector of the series x. + + -- ON RETURN : + -- ye leading exponent of the inverse of x; + -- yc coefficient vector of the inverse of x. + + procedure Divide ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + iyc : out Standard_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Divides two Laurent series. + + -- REQUIRED : + -- All coefficient vectors range between 0 and d, + -- where d is the same constant for all series. + -- The second series y should be nonzero. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- xe leading exponent of the first series x; + -- ye leading exponent of the second series y; + -- xc coefficient vector of the first series x; + -- yc coefficient vector of the second series y; + + -- ON RETURN : + -- ze leading exponent of the product of x with y; + -- zc coefficient vector of the product of x with y; + -- iyc coefficient vector of the inverse of y, as work space. + + function Is_Zero ( d : integer32; + c : Standard_Complex_Vectors.Vector; + tol : double_float := 1.0E-15 ) return boolean; + + -- DESCRIPTION : + -- Returns true if for all i in 0..d, + -- the magnitude of c(i) is less than the tolerance tol. + + procedure Normalize ( d : in integer32; e : in out integer32; + c : in out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ); + + -- DESCRIPTION : + -- Normalizes the representation of the Laurent series + -- so that the leading coefficient is larger than tol. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- e leading exponent of the series; + -- c coefficient vector of the series; + -- tol tolerance to decide the leading degree + -- when the first coefficient becomes too small. + + -- ON RETURN : + -- e augmented exponent for each shift, + -- if all coefficients are zero, then e is zero as well; + -- c shifted coefficient vector so the leading coefficient + -- is nonzero, or zero for a zero series. + + function Exponent_Gap ( a,b : integer32 ) return integer32; + + -- DESCRIPTION : + -- Returns the gap beween a and b, + -- viewed as the leading exponents of two Laurent power series. + + procedure Add ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ); + + -- DESCRIPTION : + -- Adds two Laurent series, with a tolerance to determine + -- the leading degree when the leading coefficient is too small. + + -- REQUIRED : + -- All coefficient vectors range between 0 and d, + -- where d is the same constant for all series. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- xe leading exponent of the first series x; + -- ye leading exponent of the second series y; + -- xc coefficient vector of the first series x; + -- yc coefficient vector of the second series y; + -- tol tolerance to decide the leading degree + -- when the first coefficient becomes too small. + + -- ON RETURN : + -- ze leading exponent of the sum of x and y; + -- zc coefficient vector of the sum of x and y. + + procedure Subtract ( d,xe,ye : in integer32; + xc,yc : in Standard_Complex_Vectors.Vector; + ze : out integer32; + zc : out Standard_Complex_Vectors.Vector; + tol : in double_float := 1.0E-15 ); + + -- DESCRIPTION : + -- Subtracts two Laurent series, with a tolerance to determine + -- the leading degree when the leading coefficient is too small. + + -- REQUIRED : + -- All coefficient vectors range between 0 and d, + -- where d is the same constant for all series. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- xe leading exponent of the first series x; + -- ye leading exponent of the second series y; + -- xc coefficient vector of the first series x; + -- yc coefficient vector of the second series y; + -- tol tolerance to decide the leading degree + -- when the first coefficient becomes too small. + + -- ON RETURN : + -- ze leading exponent of the difference x - y; + -- zc coefficient vector of the difference x - y. + +end Double_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,295 @@ +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Complex_Numbers; +with Standard_Complex_Vectors; +with Double_Laurent_Series; + +package body Double_Linear_Laurent_Solvers is + + procedure Allocate_Series_Coefficients + ( dim,deg : in integer32; + cff : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + res : Standard_Complex_VecVecs.VecVec(1..dim); + zero : constant Standard_Complex_Numbers.Complex_Number + := Standard_Complex_Numbers.Create(0.0); + + begin + for i in 1..dim loop + declare + val : constant Standard_Complex_Vectors.Vector(0..deg) + := (0..deg => zero); + begin + res(i) := new Standard_Complex_Vectors.Vector'(val); + end; + end loop; + cff := new Standard_Complex_VecVecs.VecVec'(res); + end Allocate_Series_Coefficients; + + procedure Write ( e : in Standard_Integer_Matrices.Matrix; + c : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + s : in string := "A" ) is + begin + for i in e'range(1) loop + for j in e'range(2) loop + put(s & "("); put(i,1); put(","); put(j,1); put_line(") :"); + Double_Laurent_Series.Write(e(i,j),c(i)(j).all); + end loop; + end loop; + end Write; + + procedure Write ( e : in Standard_Integer_Vectors.Vector; + c : in Standard_Complex_VecVecs.Link_to_VecVec; + s : in string := "v" ) is + begin + Write(standard_output,e,c,s); + end Write; + + procedure Write ( file : in file_type; + e : in Standard_Integer_Vectors.Vector; + c : in Standard_Complex_VecVecs.Link_to_VecVec; + s : in string := "v" ) is + begin + for i in e'range loop + put(file,s & "("); put(file,i,1); put_line(file,") :"); + Double_Laurent_Series.Write(file,e(i),c(i).all); + end loop; + end Write; + + procedure Matrix_Vector_Product + ( d : in integer32; + eA : in Standard_Integer_Matrices.Matrix; + cA : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + ex : in Standard_Integer_Vectors.Vector; + cx : in Standard_Complex_VecVecs.Link_to_VecVec; + ey : out Standard_Integer_Vectors.Vector; + cy : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + ze,ewrk : integer32; + zc,cwrk : Standard_Complex_Vectors.Vector(0..d); + + begin + for i in eA'range(1) loop + declare + cAi : constant Standard_Complex_VecVecs.Link_to_VecVec := cA(i); + cyi : constant Standard_Complex_Vectors.Link_to_Vector := cy(i); + begin -- initialize with first product instead of with zero + Double_Laurent_Series.Multiply + (d,eA(i,eA'first(2)),ex(ex'first),cAi(cAi'first).all, + cx(cx'first).all,ey(i),cyi.all); + for j in eA'first(2)+1..eA'last(2) loop + Double_Laurent_Series.Multiply + (d,eA(i,j),ex(j),cAi(j).all,cx(j).all,ze,zc); + Double_Laurent_Series.Add(d,ey(i),ze,cyi.all,zc,ewrk,cwrk); + ey(i) := ewrk; + for k in 0..d loop + cyi(k) := cwrk(k); + end loop; + end loop; + end; + end loop; + end Matrix_Vector_Product; + + procedure Forward_Substitution + ( d : in integer32; + eL : in Standard_Integer_Matrices.Matrix; + cL : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + eb : in Standard_Integer_Vectors.Vector; + cb : in Standard_Complex_VecVecs.Link_to_VecVec; + ex : out Standard_Integer_Vectors.Vector; + cx : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + ze,ewrk : integer32; + zc,cwrk : Standard_Complex_Vectors.Vector(0..d); + + begin + for i in eb'range loop + ex(i) := eb(i); + declare + cbi : constant Standard_Complex_Vectors.Link_to_Vector := cb(i); + cLi : constant Standard_Complex_VecVecs.Link_to_VecVec := cL(i); + cxi : constant Standard_Complex_Vectors.Link_to_Vector := cx(i); + begin + for k in 0..d loop + cxi(k) := cbi(k); + end loop; + for j in ex'first..(i-1) loop + Double_Laurent_Series.Multiply + (d,eL(i,j),ex(j),cLi(j).all,cx(j).all,ze,zc); + -- put("L("); put(i,1); put(","); put(j,1); + -- put(")*x("); put(j,1); put_line(") :"); + -- Double_Laurent_Series.Write(ze,zc); + Double_Laurent_Series.Subtract(d,ex(i),ze,cxi.all,zc,ewrk,cwrk); + ex(i) := ewrk; + for k in 0..d loop + cxi(k) := cwrk(k); + end loop; + -- put("x("); put(i,1); put_line(") after the update :"); + -- Double_Laurent_Series.Write(ex(i),cxi.all); + end loop; + end; + end loop; + end Forward_Substitution; + + procedure Backward_Substitution + ( d : in integer32; + eU : in Standard_Integer_Matrices.Matrix; + cU : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + eb : in Standard_Integer_Vectors.Vector; + cb : in Standard_Complex_VecVecs.Link_to_VecVec; + ex : out Standard_Integer_Vectors.Vector; + cx : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + ze,ewrk : integer32; + zc,cwrk : Standard_Complex_Vectors.Vector(0..d); + cbi,cxi : Standard_Complex_Vectors.Link_to_Vector; + cUi : Standard_Complex_VecVecs.Link_to_VecVec; + + begin + cbi := cb(cb'last); cxi := cx(cx'last); cUi := cU(cU'last); + Double_Laurent_Series.Divide + (d,eb(eb'last),eU(eU'last(1),eU'last(2)),cbi.all,cUi(cUi'last).all, + ex(ex'last),cxi.all,cwrk); + for i in reverse eb'first..eb'last-1 loop + ex(i) := eb(i); + cbi := cb(i); cxi := cx(i); cUi := cU(i); + for k in 0..d loop + cxi(k) := cbi(k); + end loop; + for j in (i+1)..ex'last loop + Double_Laurent_Series.Multiply + (d,eU(i,j),ex(j),cUi(j).all,cx(j).all,ze,zc); + -- put("U("); put(i,1); put(","); put(j,1); + -- put(")*x("); put(j,1); put_line(") :"); + -- Double_Laurent_Series.Write(ze,zc); + Double_Laurent_Series.Subtract(d,ex(i),ze,cxi.all,zc,ewrk,cwrk); + ex(i) := ewrk; + for k in 0..d loop + cxi(k) := cwrk(k); + end loop; + -- put("x("); put(i,1); put_line(") after the update :"); + -- Double_Laurent_Series.Write(ex(i),cxi.all); + end loop; + Double_Laurent_Series.Divide + (d,ex(i),eU(i,i),cxi.all,cUi(i).all,ze,zc,cwrk); + ex(i) := ze; + for k in 0..d loop + cxi(k) := zc(k); + end loop; + end loop; + end Backward_Substitution; + + function Pivot_Row + ( nrows,row : in integer32; + lead : in Standard_Integer_Matrices.Matrix; + column : in Standard_Complex_VecVecs.Link_to_VecVec ) + return integer32 is + + res : integer32 := row; + leadval : integer32 := lead(row,row); + cff : Standard_Complex_Vectors.Link_to_Vector := column(row); + themax : double_float := Standard_Complex_Numbers.AbsVal(cff(0)); + valmax : double_float; + + begin + for i in (row+1)..nrows loop + cff := column(i); + if lead(i,row) > leadval then + null; -- higher leading exponents cannot be pivots + else + valmax := Standard_Complex_Numbers.AbsVal(cff(0)); + if lead(i,row) < leadval then -- lower exponents must be pivots + themax := valmax; + leadval := lead(i,row); + res := i; + else -- if lead(i,row) = leadval, then compare coefficients + if valmax > themax then + themax := valmax; + res := i; + end if; + end if; + end if; + end loop; + return res; + end Pivot_Row; + + procedure Swap_Rows + ( ncols,row,pivrow : in integer32; + lead : in out Standard_Integer_Matrices.Matrix; + cffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : in out Standard_Integer_Vectors.Vector ) is + + itmp : integer32; + vtmp : Standard_Complex_VecVecs.Link_to_VecVec; + + begin + itmp := pivots(row); + pivots(row) := pivots(pivrow); + pivots(pivrow) := itmp; + vtmp := cffs(row); + cffs(row) := cffs(pivrow); + cffs(pivrow) := vtmp; + for j in 1..ncols loop + itmp := lead(row,j); + lead(row,j) := lead(pivrow,j); + lead(pivrow,j) := itmp; + end loop; + end Swap_Rows; + + procedure LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : out Standard_Integer_Vectors.Vector ) is + + irow,jrow,Acol : Standard_Complex_VecVecs.Link_to_VecVec; + icff,jcff : Standard_Complex_Vectors.Link_to_Vector; + ze,ewrk,eprd,idx : integer32; + zc,cwrk,cprd : Standard_Complex_Vectors.Vector(0..deg); + + begin + for i in pivots'range loop + pivots(i) := i; + end loop; + for j in 1..ncols loop + Acol := Acffs(j); + idx := Pivot_Row(nrows,j,Alead,Acol); + if idx /= j + then Swap_Rows(ncols,j,idx,Alead,Acffs,pivots); + end if; + for i in (j+1)..nrows loop + irow := Acffs(i); icff := irow(j); -- icff is A(i,j) + jrow := Acffs(j); jcff := jrow(j); -- jcff is A(j,j) + Double_Laurent_Series.Divide + (deg,Alead(i,j),Alead(j,j),icff.all,jcff.all,ze,zc,cwrk); + Alead(i,j) := ze; -- leading exponent of A(i,j)/A(j,j) + for k in 0..deg loop -- zc has coefficients of A(i,j)/A(j,j) + icff(k) := zc(k); -- A(i,j) := A(i,j)/A(j,j) + end loop; + ewrk := 0; + for k in 0..deg loop + cwrk(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + for k in (j+1)..nrows loop -- A(i,k) := A(i,k) - A(i,j)*A(j,k) + irow := Acffs(i); icff := irow(j); -- icff is A(i,j) + jrow := Acffs(j); jcff := jrow(k); -- jcff is A(j,k) + Double_Laurent_Series.Multiply + (deg,Alead(i,j),Alead(j,k),icff.all,jcff.all,eprd,cprd); + -- eprd is the leading exponent of A(i,j)*A(j,k) + -- cprd has the coefficients of A(i,j)*A(j,k) + icff := irow(k); -- icff is A(i,k) + ewrk := Alead(i,k); + for L in 0..deg loop + cwrk(L) := icff(L); + end loop; + Double_Laurent_Series.Subtract(deg,ewrk,eprd,cwrk,cprd,ze,zc); + Alead(i,k) := ze; + for L in 0..deg loop + icff(L) := zc(L); + end loop; + end loop; + end loop; + end loop; + end LU_Factorization; + +end Double_Linear_Laurent_Solvers; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_linear_laurent_solvers.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,193 @@ +with text_io; use text_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Integer_Matrices; +with Standard_Complex_VecVecs; +with Standard_Complex_VecVecVecs; + +package Double_Linear_Laurent_Solvers is + +-- DESCRIPTION : +-- Linear systems defined by coefficient matrices and right hand side +-- vectors of Laurent series can be solved by an LU factorization. +-- All computations happen in double precision. + + procedure Allocate_Series_Coefficients + ( dim,deg : in integer32; + cff : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns in cff the coefficients of dim series of degree deg, + -- all equal to zero. + + procedure Write ( e : in Standard_Integer_Matrices.Matrix; + c : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + s : in string := "A" ); + + -- DESCRIPTION : + -- Writes the matrix of Laurent series, defined by + -- the leading exponents in e and coefficients in c. + -- The string is used as the name of the matrix. + + -- REQUIRED : + -- e'range(1) = c'range(1) and e'range(2) = c'range(2). + + procedure Write ( e : in Standard_Integer_Vectors.Vector; + c : in Standard_Complex_VecVecs.Link_to_VecVec; + s : in string := "v" ); + procedure Write ( file : in file_type; + e : in Standard_Integer_Vectors.Vector; + c : in Standard_Complex_VecVecs.Link_to_VecVec; + s : in string := "v" ); + + -- DESCRIPTION : + -- Writes the vector of Laurent series to standard output, + -- or to file. The vector of Laurent series is defined by + -- the leading exponents in e and coefficients in c. + -- The string s is used as the name of the vector. + + -- REQUIRED : e'range = c'range. + + procedure Matrix_Vector_Product + ( d : in integer32; + eA : in Standard_Integer_Matrices.Matrix; + cA : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + ex : in Standard_Integer_Vectors.Vector; + cx : in Standard_Complex_VecVecs.Link_to_VecVec; + ey : out Standard_Integer_Vectors.Vector; + cy : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns the product of a matrix of Laurent series + -- with a vector of Laurent series. + + -- REQUIRED : + -- eA'range(1) = ey'range and eA'range(2) = ex'range, + -- cA'range(1) = cy'range and cA'range(2) = cx'range. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- eA leading exponents of the series in the matrix A; + -- cA coefficients of the series in the matrix A; + -- ex leading exponents of the series in the vector x; + -- cx coefficients of the series in the vector x; + -- cy space allocated for the coefficients of the product. + + -- ON RETURN : + -- ey leading exponents of the series of the product; + -- cy leading coefficients of the series of the product. + + procedure Forward_Substitution + ( d : in integer32; + eL : in Standard_Integer_Matrices.Matrix; + cL : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + eb : in Standard_Integer_Vectors.Vector; + cb : in Standard_Complex_VecVecs.Link_to_VecVec; + ex : out Standard_Integer_Vectors.Vector; + cx : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Applies forward substitution to solve a lower triangular system + -- with ones on the diagonal. + + -- REQUIRED : + -- The matrix is square and all ranges are compatible. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- eL leading exponents in the lower triangular matrix L; + -- cL coefficients of the series in the matrix L; + -- eb leading exponents of the right hand side vector b; + -- cb coefficients of the series in the vector b; + -- cx space allocated for the coefficients of the solution. + + -- ON RETURN : + -- ex leading exponents of the series of the solution; + -- cx leading coefficients of the series of the solution. + + procedure Backward_Substitution + ( d : in integer32; + eU : in Standard_Integer_Matrices.Matrix; + cU : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + eb : in Standard_Integer_Vectors.Vector; + cb : in Standard_Complex_VecVecs.Link_to_VecVec; + ex : out Standard_Integer_Vectors.Vector; + cx : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Applies forward substitution to solve an upper triangular system + -- with general, nonzero elements on the diagonal. + + -- REQUIRED : + -- The matrix is square and all ranges are compatible. + + -- ON ENTRY : + -- d only coefficients in the range 0 to d are considered; + -- eU leading exponents in the upper triangular matrix U; + -- cU coefficients of the series in the matrix U; + -- eb leading exponents of the right hand side vector b; + -- cb coefficients of the series in the vector b; + -- cx space allocated for the coefficients of the solution. + + -- ON RETURN : + -- ex leading exponents of the series of the solution; + -- cx leading coefficients of the series of the solution. + + function Pivot_Row + ( nrows,row : in integer32; + lead : in Standard_Integer_Matrices.Matrix; + column : in Standard_Complex_VecVecs.Link_to_VecVec ) + return integer32; + + -- DESCRIPTION : + -- Returns the row of the pivot in the current column. + -- The pivot is determined first by the smallest leading exponent. + -- If the leading exponents agree, then the largest coefficient + -- determines the pivot row. + + -- ON ENTRY : + -- nrows number of rows; + -- row index of the current row; + -- lead leading exponents of the series; + -- column coefficients of the series in the current column. + + procedure Swap_Rows + ( ncols,row,pivrow : in integer32; + lead : in out Standard_Integer_Matrices.Matrix; + cffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : in out Standard_Integer_Vectors.Vector ); + + -- DESCRIPTION : + -- Swaps the rows, as defined by the index of the pivot row. + + -- ON ENTRY : + -- ncols number of columns; + -- row index of the current row; + -- pivrow index of the pivot row, different from row; + -- lead leading exponents of the series; + -- cffs coefficients of the series; + -- pivots current values of the pivots. + + procedure LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : out Standard_Integer_Vectors.Vector ); + + -- DESCRIPTION : + -- An inplace LU factorization with pivoting. + + -- ON ENTRY : + -- nrows number of rows of the matrix; + -- ncols number of columns of the matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series; + -- pivots space for the pivots. + + -- ON RETURN : + -- Alead contains the leading exponents of the factors; + -- Acffs the coefficients of the factors L and U; + -- pivots are the pivots used. + +end Double_Linear_Laurent_Solvers; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,230 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; +with Standard_Complex_Numbers; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Complex_Vector_Norms; +with Double_Laurent_Series; +with Double_Linear_Laurent_Solvers; use Double_Linear_Laurent_Solvers; +with Test_Double_Lseries_Matrices; + +package body Double_Lseries_Newton_Steps is + + procedure Make_Series + ( sol : in Standard_Complex_Vectors.Vector; + deg : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + xcffs : Standard_Complex_VecVecs.VecVec(sol'range); + + begin + lead := (sol'range => 0); + for i in sol'range loop + declare + cff : Standard_Complex_Vectors.Vector(0..deg); + begin + cff(0) := sol(i); + for k in 1..deg loop + cff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + xcffs(i) := new Standard_Complex_Vectors.Vector'(cff); + end; + end loop; + cffs := new Standard_Complex_VecVecs.VecVec'(xcffs); + end Make_Series; + + procedure Make_Series + ( sol : in Laur_Sys; deg : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + xcffs : Standard_Complex_VecVecs.VecVec(sol'range); + dg : constant Standard_Integer_Vectors.Vector(1..1) := (1..1 => 0); + ldg : Standard_Complex_Laurentials.Degrees + := new Standard_Integer_Vectors.Vector'(dg); + + begin + lead := (sol'range => 0); + for i in sol'range loop + put("Number of variables : "); + put(integer32(Number_of_Unknowns(sol(i))),1); new_line; + declare + cff : Standard_Complex_Vectors.Vector(0..deg); + begin + for k in 0..deg loop + ldg(1) := k; + cff(k) := Standard_Complex_Laurentials.Coeff(sol(i),ldg); + end loop; + Double_Laurent_Series.Normalize(deg,lead(i),cff); + xcffs(i) := new Standard_Complex_Vectors.Vector'(cff); + end; + end loop; + cffs := new Standard_Complex_VecVecs.VecVec'(xcffs); + Standard_Complex_Laurentials.Clear(ldg); + end Make_Series; + + procedure Set_Leading_Exponents + ( lead : in out Standard_Integer_Vectors.Vector ) is + + ans : character; + + begin + put("Leading exponents : "); put(lead); new_line; + for i in lead'range loop + new_line; + loop + put("-> the leading degree of series "); put(i,1); + put(" : "); put(lead(i)); new_line; + put(" Change the leading degree ? (y/n) "); + Ask_Yes_or_No(ans); + exit when (ans /= 'y'); + put("Give the new leading degree : "); get(lead(i)); + end loop; + end loop; + end Set_Leading_Exponents; + + function Max_Norm ( v : Standard_Complex_VecVecs.Link_to_VecVec ) + return double_float is + + res : double_float + := Standard_Complex_Vector_Norms.Max_Norm(v(v'first).all); + val : double_float; + + begin + for k in v'first+1..v'last loop + val := Standard_Complex_Vector_Norms.Max_Norm(v(k).all); + if val > res + then res := val; + end if; + end loop; + return res; + end Max_Norm; + + procedure Newton_Step + ( deg : in integer32; + p : in Table_Vector; jp : in Table_Vector_Array; + xlead : in out Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : in out Standard_Integer_Vectors.Vector; + ycffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in out Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + dxlead : in out Standard_Integer_Vectors.Vector; + dxcffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + rlead : in out Standard_Integer_Vectors.Vector; + rcffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : out double_float; + verbose : in boolean := true ) is + + pivots : Standard_Integer_Vectors.Vector(xlead'range); + acff,bcff : Standard_Complex_Vectors.Link_to_Vector; + + use Standard_Complex_Numbers; + + begin + if verbose + then put_line("Evaluating the table vector ..."); + end if; + Eval(deg,p,xlead,xcffs,ylead,ycffs.all,verbose); + if verbose + then Double_Linear_Laurent_Solvers.Write(ylead,ycffs,"y"); + end if; + if verbose + then put_line("Evaluating the table vector array ..."); + end if; + Eval(deg,jp,xlead,xcffs,Alead,Acffs,verbose); + if verbose then + Test_Double_Lseries_Matrices.Copy + (p.nbt,p.nbt,deg,Alead,Acffs,Blead,Bcffs); + Double_Linear_Laurent_Solvers.Write(Blead,Bcffs,"B"); + end if; + LU_Factorization(p.nbt,p.nbt,deg,Alead,Acffs,pivots); + if verbose + then put("The pivots : "); put(pivots); new_line; + end if; + for i in pivots'range loop + dxlead(i) := ylead(i); + acff := ycffs(pivots(i)); + bcff := dxcffs(i); + for k in 0..deg loop + bcff(k) := -acff(k); + end loop; + end loop; + if verbose + then Double_Linear_Laurent_Solvers.Write(dxlead,dxcffs,"b"); + end if; + Forward_Substitution(deg,Alead,Acffs,dxlead,dxcffs,ylead,ycffs); + Backward_Substitution(deg,Alead,Acffs,ylead,ycffs,dxlead,dxcffs); + dxnrm := Max_Norm(dxcffs); + pxnrm := Max_Norm(rcffs); + if verbose then + Double_Linear_Laurent_Solvers.Write(dxlead,dxcffs,"dx"); + Matrix_Vector_Product(deg,Blead,Bcffs,dxlead,dxcffs,rlead,rcffs); + Double_Linear_Laurent_Solvers.Write(rlead,rcffs,"r"); + put("Maximum |dx| :"); put(dxnrm,3); + put(" residual :"); put(pxnrm,3); new_line; + end if; + for i in dxlead'range loop + Double_Laurent_Series.Add(deg, + xlead(i),dxlead(i),xcffs(i).all,dxcffs(i).all,ylead(i),ycffs(i).all); + xlead(i) := ylead(i); + acff := ycffs(i); + bcff := xcffs(i); + for k in 0..deg loop + bcff(k) := acff(k); + end loop; + end loop; + end Newton_Step; + + procedure Run_Newton_Steps + ( deg : in integer32; + tv : in Table_Vector; tva : in Table_Vector_Array; + xlead : in out Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : out double_float; + numit : out integer32; maxit : in integer32 := 4; + dxtol : in double_float := 1.0E-8; + pxtol : in double_float := 1.0E-8; + verbose : in boolean := true ) is + + neq : constant integer32 := tva'last; + nvr : constant integer32 := xlead'last; + ylead,dxlead,rlead : Standard_Integer_Vectors.Vector(1..nvr); + ycffs,dxcffs,rcffs : Standard_Complex_VecVecs.Link_to_VecVec; + Alead,Blead : Standard_Integer_Matrices.Matrix(1..neq,1..nvr); + Acffs,Bcffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + stepcnt : integer32 := 1; + + begin + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,ycffs); + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,dxcffs); + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,rcffs); + Standard_Complex_VecVecVecs.Allocate(Acffs,1,neq,1,nvr,0,deg); + Standard_Complex_VecVecVecs.Allocate(Bcffs,1,neq,1,nvr,0,deg); + loop + if verbose + then put("Step "); put(stepcnt,1); put_line(" ..."); + end if; + Double_Lseries_Newton_Steps.Newton_Step + (deg,tv,tva,xlead,xcffs,ylead,ycffs,Alead,Acffs,Blead,Bcffs, + dxlead,dxcffs,rlead,rcffs,dxnrm,pxnrm,verbose); + if verbose + then Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + end if; + exit when (stepcnt = maxit); + exit when ((dxnrm < dxtol) and (pxnrm < pxtol)); + stepcnt := stepcnt + 1; + end loop; + numit := stepcnt; + Standard_Complex_VecVecs.Deep_Clear(ycffs); + Standard_Complex_VecVecs.Deep_Clear(dxcffs); + Standard_Complex_VecVecs.Deep_Clear(rcffs); + Standard_Complex_VecVecVecs.Clear(Acffs); + Standard_Complex_VecVecVecs.Clear(Bcffs); + end Run_Newton_Steps; + +end Double_Lseries_Newton_Steps; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_newton_steps.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,131 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Integer_Vectors; +with Standard_Complex_Vectors; +with Standard_Complex_VecVecs; +with Standard_Integer_Matrices; +with Standard_Complex_VecVecVecs; +with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; +with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; +with Double_Lseries_Polynomials; use Double_Lseries_Polynomials; + +package Double_Lseries_Newton_Steps is + +-- DESCRIPTION : +-- Runs Newton's method on Laurent series in double precision. + + procedure Make_Series + ( sol : in Standard_Complex_Vectors.Vector; + deg : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns a regular power series of degree deg, + -- with as leading coefficients the coordinates in sol. + -- Allocates all space for cffs. + + -- REQUIRED : + -- lead'range = sol'range. + + procedure Make_Series + ( sol : in Laur_Sys; deg : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns a regular power series of degree deg, + -- with as leading terms the coordinates in sol. + -- Allocates all space for cffs. + + -- REQUIRED : + -- lead'range = sol'range. + + procedure Set_Leading_Exponents + ( lead : in out Standard_Integer_Vectors.Vector ); + + -- DESCRIPTION : + -- Interactive setup of the leading exponents. + -- Prompts for every element of lead. + + function Max_Norm ( v : Standard_Complex_VecVecs.Link_to_VecVec ) + return double_float; + + -- DESCRIPTION : + -- Returns the maximum of all max norms of the vectors in v. + + procedure Newton_Step + ( deg : in integer32; + p : in Table_Vector; jp : in Table_Vector_Array; + xlead : in out Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : in out Standard_Integer_Vectors.Vector; + ycffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in out Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + dxlead : in out Standard_Integer_Vectors.Vector; + dxcffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + rlead : in out Standard_Integer_Vectors.Vector; + rcffs : in out Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : out double_float; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Does one step with Newton's method. + + -- REQUIRED : ycffs, dxcffs, Acffs, and Bcffs are allocated. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- p table representation of a series system; + -- jp table representation of the Jacobian matrix; + -- xlead leading exponents of the current solution series; + -- xcffs coefficient vector of the current solution series; + -- verbose flag for the verbosity. + + -- ON RETURN : + -- dxlead leading exponents of the update to the solution series; + -- dxcffs coefficient vector of the update to the solution series; + -- Alead leading exponents of the LU factorization + -- Acffs factors of the Jacobian matrix evaluated at (xlead, xcffs); + -- Blead leading exponents of the evaluated Jacobian matrix; + -- Bcffs Jacobian matrix evaluated at (xlead, xcffs). + -- dxnrm maximum norm of the update, forward error estimate; + -- pxnrm maximum norm of the residual, backward error estimate. + + procedure Run_Newton_Steps + ( deg : in integer32; + tv : in Table_Vector; tva : in Table_Vector_Array; + xlead : in out Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : out double_float; + numit : out integer32; maxit : in integer32 := 4; + dxtol : in double_float := 1.0E-8; + pxtol : in double_float := 1.0E-8; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Wraps the allocation of the coefficients + -- and runs a number of Newton steps. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- p table representation of a series system; + -- jp table representation of the Jacobian matrix; + -- xlead leading exponents of the current solution series; + -- xcffs coefficient vector of the current solution series; + -- maxit maximum number of steps; + -- dxtol tolerance on the forward error, on the update; + -- pxtol tolerance on the backward error, on the residual; + -- verbose flag for the verbosity. + + -- ON RETURN : + -- xlead leading exponents of the current solution series; + -- xcffs coefficient vector of the current solution series; + -- dxnrm maximum of the max norms of the update vectors; + -- pxnrm maximum of the residual vectors; + -- numit number of steps done. + +end Double_Lseries_Newton_Steps; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,490 @@ +with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Characters_and_Numbers; +with Standard_Complex_Numbers; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Random_Vectors; +with Symbol_Table; +with Double_Laurent_Series; +with Random_Laurent_Series; use Random_Laurent_Series; + +package body Double_Lseries_Polynomials is + + procedure Write ( plead : in Standard_Integer_Vectors.Vector; + pcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + pmons : in Standard_Integer_VecVecs.VecVec; + s : in string := "p" ) is + begin + for k in plead'range loop + put(s & "("); put(k,1); put(") :"); put(pmons(k)); new_line; + Double_Laurent_Series.Write(plead(k),pcffs(k).all); + end loop; + end Write; + + procedure Write ( tab : in Table; s : in string := "p" ) is + begin + Write(tab.lead.all,tab.cffs,tab.mons.all,s); + end Write; + + procedure Write ( tab : in Table_Vector; s : in string := "p" ) is + begin + for i in 1..tab.nbt loop + declare + stri : constant string := Characters_and_Numbers.Convert(i); + begin + Write(tab.lead(i).all,tab.cffs(i),tab.mons(i).all,s & stri); + end; + end loop; + end Write; + + procedure Write ( tva : in Table_Vector_Array; s : in string := "p" ) is + + ltv : Link_to_Table_Vector; + + begin + for i in tva'range loop + ltv := tva(i); + for j in 1..ltv.nbt loop + declare + stri : constant string := Characters_and_Numbers.Convert(i); + strj : constant string := Characters_and_Numbers.Convert(j); + tab : Table; + begin + tab.nvr := ltv.nvr; + tab.lead := ltv.lead(j); + tab.cffs := ltv.cffs(j); + tab.mons := ltv.mons(j); + tab.nbt := tab.lead'last; + Write(tab,s & stri & "," & strj); + end; + end loop; + end loop; + end Write; + +-- BASIC OPERATIONS : + + procedure Make_Random_Polynomial + ( dim,nbr,deg,pwr,low,upp : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec; + mons : out Standard_Integer_VecVecs.VecVec ) is + begin + for k in 1..nbr loop + declare + mon : constant Standard_Integer_Vectors.Vector(1..dim) + := Standard_Random_Vectors.Random_Vector(1,dim,0,pwr); + begin + mons(k) := new Standard_Integer_Vectors.Vector'(mon); + end; + end loop; + Random_Vector(nbr,deg,low,upp,lead,cffs); + end Make_Random_Polynomial; + + function Random_Table ( dim,nbr,deg,pwr,low,upp : integer32 ) return Table is + + res : Table; + lead : Standard_Integer_Vectors.Vector(1..nbr); + mons : Standard_Integer_VecVecs.VecVec(1..nbr); + + begin + res.nbt := nbr; + res.nvr := dim; + Make_Random_Polynomial(dim,nbr,deg,pwr,low,upp,lead,res.cffs,mons); + res.lead := new Standard_Integer_Vectors.Vector'(lead); + res.mons := new Standard_Integer_VecVecs.VecVec'(mons); + return res; + end Random_Table; + +-- EVALUATORS : + + procedure Eval ( deg,mlead : in integer32; + cff : in Standard_Complex_Vectors.Link_to_Vector; + mon : in Standard_Integer_Vectors.Link_to_Vector; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector ) is + + ze : integer32; + zc : Standard_Complex_Vectors.Vector(0..deg); + + begin + ye := mlead; + for k in 0..deg loop -- initialize result with monomial coefficient + yc(k) := cff(k); + end loop; + for i in mon'range loop -- mon(i) is the power of the i-th variable + if mon(i) > 0 then + for j in 1..mon(i) loop + Double_Laurent_Series.Multiply + (deg,ye,xlead(i),yc,xcffs(i).all,ze,zc); + ye := ze; + for k in 0..deg loop + yc(k) := zc(k); + end loop; + end loop; + end if; + end loop; + end Eval; + + procedure Eval ( deg : in integer32; + plead : in Standard_Integer_Vectors.Vector; + pcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + pmons : in Standard_Integer_VecVecs.VecVec; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector; + verbose : in boolean := true ) is + + ze,ewrk : integer32; + zc,cwrk : Standard_Complex_Vectors.Vector(0..deg); + + begin + if plead'last < plead'first then + ye := 0; + for k in 0..deg loop + yc(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + else + Eval(deg,plead(1),pcffs(1),pmons(1),xlead,xcffs,ye,yc); + if verbose then + put_line("After evaluating the first monomial :"); + Double_Laurent_Series.Write(ye,yc); + end if; + for i in 2..plead'last loop + Eval(deg,plead(i),pcffs(i),pmons(i),xlead,xcffs,ze,zc); + if verbose then + put("The value of monomial : "); put(i,1); put_line(" :"); + Double_Laurent_Series.Write(ze,zc); + end if; + Double_Laurent_Series.Add(deg,ye,ze,yc,zc,ewrk,cwrk); + ye := ewrk; + for k in 0..deg loop + yc(k) := cwrk(k); + end loop; + if verbose then + put("After update with the value of monomial "); + put(i,1); put_line(" :"); + Double_Laurent_Series.Write(ye,yc); + end if; + end loop; + end if; + end Eval; + + procedure Eval ( deg : in integer32; tab : in Table; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector; + verbose : in boolean := true ) is + + begin + Eval(deg,tab.lead.all,tab.cffs,tab.mons.all,xlead,xcffs,ye,yc,verbose); + end Eval; + + procedure Eval ( deg : in integer32; tab : in Table_Vector; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : out Standard_Integer_Vectors.Vector; + ycffs : out Standard_Complex_VecVecs.VecVec; + verbose : in boolean := true ) is + + use Standard_Complex_Vectors; + cff : Standard_Complex_Vectors.Link_to_Vector; + zero : constant Standard_Complex_Numbers.Complex_Number + := Standard_Complex_Numbers.Create(0.0); + + begin + for i in 1..tab.nbt loop + if ycffs(i) /= null then + cff := ycffs(i); + else + declare + v : constant Standard_Complex_Vectors.Vector(0..deg) + := (0..deg => zero); + begin + ycffs(i) := new Standard_Complex_Vectors.Vector'(v); + cff := ycffs(i); + end; + end if; + Eval(deg,tab.lead(i).all,tab.cffs(i),tab.mons(i).all, + xlead,xcffs,ylead(i),cff.all,verbose); + end loop; + end Eval; + + procedure Eval ( deg : in integer32; tab : in Table_Vector_Array; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + verbose : in boolean := true ) is + + ltv : Link_to_Table_Vector; + row : Standard_Complex_VecVecs.Link_to_VecVec; + cff : Standard_Complex_Vectors.Link_to_Vector; + + use Standard_Complex_Vectors; + + begin + for i in tab'range loop + ltv := tab(i); + row := Acffs(i); + for j in 1..ltv.nbt loop + cff := row(j); + Eval(deg,ltv.lead(j).all,ltv.cffs(j),ltv.mons(j).all, + xlead,xcffs,Alead(i,j),cff.all,verbose); + end loop; + end loop; + end Eval; + + function tsymbol_index return integer32 is + + res : integer32 := 0; + nbr : constant natural32 := Symbol_Table.Number; + + begin + for k in 1..nbr loop + declare + sb : constant Symbol_Table.Symbol := Symbol_Table.get(k); + begin + if sb(1) = 't' + then res := integer32(k); exit; + end if; + end; + end loop; + return res; + end tsymbol_index; + + function Index_of_Degrees + ( mons : Standard_Integer_VecVecs.VecVec; + idx : integer32; + degs : Standard_Integer_Vectors.Vector ) return integer32 is + + monexp : Standard_Integer_Vectors.Link_to_Vector; + allequal : boolean; + + begin + for k in mons'first..(idx-1) loop + monexp := mons(k); + allequal := true; + for i in monexp'range loop + allequal := (monexp(i) = degs(i)); + exit when not allequal; + end loop; + if allequal + then return k; + end if; + end loop; + return idx; + end Index_of_Degrees; + + function Minimum_Laurent_Series_Degree + ( p : Poly; tdx : integer32 ) return integer32 is + + maxdegt : constant integer32 := Maximal_Degree(p,tdx); + mindegt : constant integer32 := Minimal_Degree(p,tdx); + + begin + return (maxdegt - mindegt - 1); + end Minimum_Laurent_Series_Degree; + + function Minimum_Laurent_Series_Degree + ( p : Laur_Sys; tdx : integer32 ) return integer32 is + + res : integer32 := Minimum_Laurent_Series_Degree(p(p'first),tdx); + deg : integer32; + + begin + for k in p'first+1..p'last loop + deg := Minimum_Laurent_Series_Degree(p(k),tdx); + if deg > res + then res := deg; + end if; + end loop; + return res; + end Minimum_Laurent_Series_Degree; + + procedure Make_Series_Polynomial + ( p : in Poly; dim,nvr,tdx,deg : in integer32; + lead : out Standard_Integer_Vectors.Link_to_Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec; + mons : out Standard_Integer_VecVecs.Link_to_VecVec ) is + + nbr : constant integer32 := integer32(Number_of_Terms(p)); + plead : Standard_Integer_Vectors.Vector(1..nbr); + wcffs : Standard_Complex_VecVecs.VecVec(1..nbr); + pmons : Standard_Integer_VecVecs.VecVec(1..nbr); + cnt : integer32 := 0; + + procedure Visit_Term ( t : in Term; continue : out boolean ) is + + -- DESCRIPTION : + -- If tdx is zero, then the monomial is just copied, + -- otherwise the terms in the Laurent series need to be + -- collected from the expanded form. + + mon : Standard_Integer_Vectors.Vector(1..nvr); + cff : Standard_Complex_Vectors.Vector(0..deg); + located,newlead,gap : integer32; + cfflocated : Standard_Complex_Vectors.Link_to_Vector; + + begin + cnt := cnt + 1; + if tdx = 0 then -- constant Laurent series + plead(cnt) := 0; + for k in 1..dim loop + mon(k) := integer32(t.dg(k)); + end loop; + pmons(cnt) := new Standard_Integer_Vectors.Vector'(mon); + cff(0) := t.cf; + for k in 1..deg loop + cff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + wcffs(cnt) := new Standard_Complex_Vectors.Vector'(cff); + else + for k in 1..(tdx-1) loop + mon(k) := integer32(t.dg(k)); + end loop; + for k in (tdx+1)..dim loop + mon(k-1) := integer32(t.dg(k)); + end loop; + located := Index_of_Degrees(pmons,cnt,mon); + if located = cnt then -- a new monomial + plead(cnt) := integer32(t.dg(tdx)); + pmons(cnt) := new Standard_Integer_Vectors.Vector'(mon); + cff(0) := t.cf; + for k in 1..deg loop + cff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + wcffs(cnt) := new Standard_Complex_Vectors.Vector'(cff); + else + cnt := cnt-1; -- no new monomial + newlead := integer32(t.dg(tdx)); + cfflocated := wcffs(located); -- fit in new t-term + if newlead = plead(located) then + Standard_Complex_Numbers.Add(cfflocated(0),t.cf); + elsif newlead > plead(located) then + gap := newlead - plead(located); -- keep leading exponent + if gap <= deg then + Standard_Complex_Numbers.Add(cfflocated(gap),t.cf); + -- else the new coefficient will be ignored ... + end if; + else -- newlead < plead(located) + gap := plead(located) - newlead; -- leading exponent changes! + for k in reverse 0..deg-gap loop -- shift coefficients + cfflocated(gap+k) := cfflocated(k); + end loop; + for k in 1..(gap-1) loop + exit when (k > deg); + cfflocated(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + cfflocated(0) := t.cf; + plead(located) := newlead; + end if; + end if; + end if; + continue := true; + end Visit_Term; + procedure Visit_Terms is new Visiting_Iterator(Visit_Term); + + begin + Visit_Terms(p); + lead := new Standard_Integer_Vectors.Vector'(plead(1..cnt)); + cffs := new Standard_Complex_VecVecs.VecVec'(wcffs(1..cnt)); + mons := new Standard_Integer_VecVecs.VecVec'(pmons(1..cnt)); + end Make_Series_Polynomial; + + function Make_Table ( p : Poly; dim,nvr,tdx,deg : integer32 ) return Table is + + res : Table; + + begin + res.nbt := dim; + res.nvr := nvr; + Make_Series_Polynomial(p,dim,nvr,tdx,deg,res.lead,res.cffs,res.mons); + return res; + end Make_Table; + + procedure Make_Series_System + ( p : in Laur_Sys; dim,nvr,tdx,deg : in integer32; + lead : out Standard_Integer_VecVecs.VecVec; + cffs : out Standard_Complex_VecVecs.Array_of_VecVecs; + mons : out Standard_Integer_VecVecs.Array_of_VecVecs ) is + begin + for k in p'range loop + Make_Series_Polynomial(p(k),dim,nvr,tdx,deg,lead(k),cffs(k),mons(k)); + end loop; + end Make_Series_System; + + function Make_Table_Vector + ( p : Laur_Sys; dim,nvr,tdx,deg : integer32 ) + return Table_Vector is + + neq : constant integer32 := p'last; + res : Table_Vector(neq); + + begin + res.nvr := nvr; + Make_Series_System(p,dim,nvr,tdx,deg,res.lead,res.cffs,res.mons); + return res; + end Make_Table_Vector; + + function Make_Table_Vector_Array + ( jp : Jaco_Mat; tdx,deg : integer32 ) + return Table_Vector_Array is + + res : Table_Vector_Array(jp'range(1)); + dim : constant integer32 := jp'length(2); + nbt,nvr : integer32; + + begin + if tdx = 0 + then nbt := dim; + else nbt := dim-1; + end if; + nvr := nbt; + for i in jp'range(1) loop + declare + tv : Table_Vector(nbt); + begin + tv.nvr := nvr; + if tdx = 0 then + for j in jp'range(2) loop + declare + tab : constant Table := Make_Table(jp(i,j),dim,nvr,tdx,deg); + begin + tv.lead(j) := new Standard_Integer_Vectors.Vector'(tab.lead.all); + tv.cffs(j) := tab.cffs; + tv.mons(j) := tab.mons; + end; + end loop; + else + for j in jp'first(2)..(tdx-1) loop + declare + tab : constant Table := Make_Table(jp(i,j),dim,nvr,tdx,deg); + begin + tv.lead(j) := new Standard_Integer_Vectors.Vector'(tab.lead.all); + tv.cffs(j) := tab.cffs; + tv.mons(j) := tab.mons; + end; + end loop; + for j in (tdx+1)..jp'last(2) loop + declare + tab : constant Table := Make_Table(jp(i,j),dim,nvr,tdx,deg); + k : constant integer32 := j-1; + begin + tv.lead(k) := new Standard_Integer_Vectors.Vector'(tab.lead.all); + tv.cffs(k) := tab.cffs; + tv.mons(k) := tab.mons; + end; + end loop; + end if; + res(i) := new Table_Vector'(tv); + end; + end loop; + return res; + end Make_Table_Vector_Array; + +end Double_Lseries_Polynomials; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/double_lseries_polynomials.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,360 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Integer_VecVecs; +with Standard_Integer_Matrices; +with Standard_Complex_Vectors; +with Standard_Complex_VecVecs; +with Standard_Complex_VecVecVecs; +with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; +with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; +with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; + +package Double_Lseries_Polynomials is + +-- DESCRIPTION : +-- A Laurent series polynomial is a polynomial in several variables +-- where the coefficients are Laurent series, represented by +-- (1) a vector of leading exponents of the Laurent series coefficients, +-- (2) coefficient vectors of the Laurent series for each monomial; +-- (3) exponent vectors of the monomials in the polynomial. + +-- DATA STRUCTURES : + + type Table is record + nbt : integer32; -- number of terms + nvr : integer32; -- number of variables + lead : Standard_Integer_Vectors.Link_to_Vector; -- leading exponents + cffs : Standard_Complex_VecVecs.Link_to_VecVec; -- coefficient vectors + mons : Standard_Integer_VecVecs.Link_to_VecVec; -- monomial exponents + end record; + + type Table_Vector ( nbt : integer32 ) is record -- nbt is number of tables + nvr : integer32; -- number of variables in each table + lead : Standard_Integer_VecVecs.VecVec(1..nbt); -- leading exponents + cffs : Standard_Complex_VecVecs.Array_of_VecVecs(1..nbt); -- coefficients + mons : Standard_Integer_VecVecs.Array_of_VecVecs(1..nbt); -- monomials + end record; + + type Link_to_Table_Vector is access Table_Vector; + + type Table_Vector_Array is + array ( integer32 range <> ) of Link_to_Table_Vector; + +-- CONSTRUCTORS : + + function Random_Table ( dim,nbr,deg,pwr,low,upp : integer32 ) return Table; + + -- DESCRIPTION : + -- Makes a random polynomial with Laurent series as coefficients. + -- Wraps the Make_Random_polynomial procedure. + + -- ON ENTRY : + -- dim the dimension is the number of variables; + -- nbr number of monomials in the polynomial; + -- deg degree of the series; + -- pwr largest power for every variable; + -- low lower bound on leading exponents of the series; + -- upp upper bound on leading exponents of the series. + + function Make_Table ( p : Poly; dim,nvr,tdx,deg : integer32 ) return Table; + + -- DESCRIPTION : + -- Given a Laurent polynomial p and the index for t, + -- makes the data structures to represent p as a polynomial + -- with Laurent series coefficients in t. + -- Wraps the Make_Series_Polynomial procedure. + + -- ON ENTRY : + -- p a Laurent polynomial with possibly negative exponents in t; + -- dim total number of variables in p, including t, + -- nvr number of variables without t; + -- tdx index of t as one of the dim variables in p, + -- if tdx is zero, then dim must equal nvr, + -- otherwise nvr = dim - 1. + + function Make_Table_Vector + ( p : Laur_Sys; dim,nvr,tdx,deg : integer32 ) + return Table_Vector; + + -- DESCRIPTION : + -- Given a Laurent polynomial system p, returns the triplet of data + -- to represent p as a system with Laurent series coefficients. + -- Wraps the Make_Series_System procedure. + + -- ON ENTRY : + -- p a Laurent system with possibly negative exponents in t; + -- dim total number of variables in p, including t, + -- nvr number of variables without t; + -- tdx index of t as one of the dim variables in p, + -- if tdx is zero, then dim must equal nvr, + -- otherwise nvr = dim - 1. + + function Make_Table_Vector_Array + ( jp : Jaco_Mat; tdx,deg : integer32 ) + return Table_Vector_Array; + + -- DESCRIPTION : + -- Returns an array of table vectors for the symbolic Jacobian matrix, + -- skipping the column with index tdx. + -- The degree of the series equals deg. + +-- EVALUATORS : + + procedure Eval ( deg : in integer32; tab : in Table; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Evaluates a Laurent series polynomial at a Laurent series. + -- Wraps the Eval procedure. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- tab data for a Laurent series polynomial; + -- xlead leading exponents of the argument for the evaluation; + -- xcffs coefficient vectors of the argument for the evaluation; + -- verbose is the verbose flag. + + -- ON RETURN : + -- ye leading exponent of the result of the evaluation; + -- yc coefficient vector of the value of the polynomial. + + procedure Eval ( deg : in integer32; tab : in Table_Vector; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : out Standard_Integer_Vectors.Vector; + ycffs : out Standard_Complex_VecVecs.VecVec; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Evaluates a Laurent series polynomial vector at a Laurent series. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- tab data for a Laurent series polynomial; + -- xlead leading exponents of the argument for the evaluation; + -- xcffs coefficient vectors of the argument for the evaluation; + -- ylead must include the range for the number of tables; + -- ycffs must also include the range for the number of tables; + -- verbose is the verbose flag. + + -- ON RETURN : + -- ylead leading exponents of the result of the evaluation; + -- ycffs coefficient vectors of the evaluation result; + -- allocations will be made as needed. + + procedure Eval ( deg : in integer32; tab : in Table_Vector_Array; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Evaluates a Laurent series Jacobian matrix at a Laurent series. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- tab data for a Laurent series Jacobian matrix; + -- xlead leading exponents of the argument for the evaluation; + -- xcffs coefficient vectors of the argument for the evaluation; + -- Acffs allocated space for all rows and columns of Laurent + -- series of degree deg for the evaluated matrix; + -- verbose is the verbose flag. + + -- ON RETURN : + -- Alead leading exponents of the evaluated Jacobian matrix; + -- Acffs Jacobian matrix evaluated at (xlead, xcffs). + +-- OUTPUT : + + procedure Write ( tab : in Table; s : in string := "p" ); + procedure Write ( tab : in Table_Vector; s : in string := "p" ); + + -- DESCRIPTION : + -- Writes the table or table vector tab. + + procedure Write ( tva : in Table_Vector_Array; s : in string := "p" ); + + -- DESCRIPTION : + -- Writes the table vector array. + +-- BASIC OPERATIONS : + + procedure Write ( plead : in Standard_Integer_Vectors.Vector; + pcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + pmons : in Standard_Integer_VecVecs.VecVec; + s : in string := "p" ); + + -- DESCRIPTION : + -- Writes a Laurent series polynomial. + + -- ON ENTRY : + -- plead leading exponents for the Laurent series coeffficients; + -- pcffs coefficient vectors of the Laurent series for each monomial; + -- pmons exponent vectors of the monomials; + -- s string used as the name of the polynomial. + + procedure Make_Random_Polynomial + ( dim,nbr,deg,pwr,low,upp : in integer32; + lead : out Standard_Integer_Vectors.Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec; + mons : out Standard_Integer_VecVecs.VecVec ); + + -- DESCRIPTION : + -- Makes a random polynomial with Laurent series as coefficients. + + -- ON ENTRY : + -- dim the dimension is the number of variables; + -- nbr number of monomials in the polynomial; + -- deg degree of the series; + -- pwr largest power for every variable; + -- low lower bound on leading exponents of the series; + -- upp upper bound on leading exponents of the series. + + -- ON RETURN : + -- lead an array of range 1..nbr with the leading exponents + -- of the power series coefficients; + -- cffs coefficient vectors of the power series coefficients; + -- mons exponents of the monomials in the polynomial. + + procedure Eval ( deg,mlead : in integer32; + cff : in Standard_Complex_Vectors.Link_to_Vector; + mon : in Standard_Integer_Vectors.Link_to_Vector; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector ); + + -- DESCRIPTION : + -- Evaluates a monomial at a Laurent series. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- mlead leading exponent of the Laurent series coefficient + -- of the monomial; + -- cff Laurent series coefficient of the monomial; + -- mon exponents of the monomial; + -- xlead leading exponents of the argument for the evaluation; + -- xcffs coefficient vectors of the argument for the evaluation. + + -- ON RETURN : + -- ye leading exponent of the result of the evaluation; + -- yc coefficient vector of the value of the monomial. + + procedure Eval ( deg : in integer32; + plead : in Standard_Integer_Vectors.Vector; + pcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + pmons : in Standard_Integer_VecVecs.VecVec; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ye : out integer32; + yc : out Standard_Complex_Vectors.Vector; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Evaluates a polynomial at a Laurent series. + + -- ON ENTRY : + -- deg only coefficients in the range 0..deg are considered; + -- plead leading exponents of the Laurent series coefficients; + -- pcffs coefficient vectors of the Laurent series coefficients; + -- pmons exponents of the monomials in the polynomial; + -- xlead leading exponents of the argument for the evaluation; + -- xcffs coefficient vectors of the argument for the evaluation; + -- verbose if true, then the value of every monomial is written, + -- and also the value after each update. + + -- ON RETURN : + -- ye leading exponent of the result of the evaluation; + -- yc coefficient vector of the value of the polynomial. + + function tsymbol_index return integer32; + + -- DESCRIPTION : + -- Returns the index of the symbol t used in the Laurent series + -- in the input Laurent polynomials from the symbol table contents. + -- Returns 0 if the symbol table does not contain the symbol t. + + function Index_of_Degrees + ( mons : Standard_Integer_VecVecs.VecVec; + idx : integer32; + degs : Standard_Integer_Vectors.Vector ) return integer32; + + -- DESCRIPTION : + -- Returns the index where to place the degrees respective + -- to the first exponents in the range 1..idx. + -- This function is needed in case tdx /= 0. + + -- ON ENTRY : + -- mons exponents of monomials processed from 1 to idx-1; + -- idx current free index in mons; + -- degs exponents of a new monomial. + + -- ON RETURN : + -- idx is returned if the exponents in degs do not occur in mons, + -- otherwise returns the index in mons where degs exponents occur. + + function Minimum_Laurent_Series_Degree + ( p : Poly; tdx : integer32 ) return integer32; + function Minimum_Laurent_Series_Degree + ( p : Laur_Sys; tdx : integer32 ) return integer32; + + -- DESCRIPTION : + -- Given a nonzero index tdx for the position of t in p, + -- returns the smallest value for the degree in the range of coefficients + -- so no coefficient of p is lost. + + -- REQUIRED : tdx /= 0. + + procedure Make_Series_Polynomial + ( p : in Poly; dim,nvr,tdx,deg : in integer32; + lead : out Standard_Integer_Vectors.Link_to_Vector; + cffs : out Standard_Complex_VecVecs.Link_to_VecVec; + mons : out Standard_Integer_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Given a Laurent polynomial p and the index for t, + -- makes the data structures to represent p as a polynomial + -- with Laurent series coefficients in t. + + -- ON ENTRY : + -- p a Laurent polynomial with possibly negative exponents in t; + -- dim total number of variables in p, including t, + -- nvr number of variables without t; + -- tdx index of t as one of the dim variables in p, + -- if tdx is zero, then dim must equal nvr, + -- otherwise nvr = dim - 1. + + -- ON RETRUN : + -- lead leading exponents of the Laurent series coefficients; + -- cffs coefficients in the Laurent series for each monomial; + -- mons exponents of the monomials. + + procedure Make_Series_System + ( p : in Laur_Sys; dim,nvr,tdx,deg : in integer32; + lead : out Standard_Integer_VecVecs.VecVec; + cffs : out Standard_Complex_VecVecs.Array_of_VecVecs; + mons : out Standard_Integer_VecVecs.Array_of_VecVecs ); + + -- DESCRIPTION : + -- Given a Laurent polynomial system p, returns the triplet of data + -- to represent p as a system with Laurent series coefficients. + + -- ON ENTRY : + -- p a Laurent system with possibly negative exponents in t; + -- dim total number of variables in p, including t, + -- nvr number of variables without t; + -- tdx index of t as one of the dim variables in p, + -- if tdx is zero, then dim must equal nvr, + -- otherwise nvr = dim - 1. + + -- ON RETRUN : + -- lead leading exponents of the Laurent series coefficients; + -- cffs coefficients in the Laurent series for each monomial; + -- mons exponents of the monomials. + +end Double_Lseries_Polynomials; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/laurent.gpr phcpack-2.4.85/src/Ada/Math_Lib/Laurent/laurent.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/laurent.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/laurent.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,26 @@ +project Laurent is + + for Source_Dirs + use (".", "../../System", "../Numbers", "../QD", + "../Vectors", "../Matrices", "../Reduction", + "../Polynomials", "../Functions", + "../../Deformations/Solutions"); + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_pslaur.adb", -- tests Laurent power series + "ts_laurmat.adb", -- tests matrices of Laurent series + "ts_lserpol.adb", -- tests Laurent series polynomials + "ts_lsernew.adb" -- tests Newton's method on Laurent series + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end Laurent; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,229 @@ +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; +with Standard_Integer_Vectors; +with Standard_Complex_VecVecs; +with Symbol_Table; +with Standard_Complex_Laurentials; +with Standard_Complex_Laur_Systems_io; use Standard_Complex_Laur_Systems_io; +with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; +with Standard_Complex_Solutions; +with Standard_System_and_Solutions_io; +with Double_Linear_Laurent_Solvers; +with Double_Lseries_Polynomials; +with Double_Lseries_Newton_Steps; + +package body Main_Laurent_Series_Newton is + + procedure Run_Regular_Newton + ( file : in file_type; + p : in Standard_Complex_Laur_Systems.Laur_Sys; + x : in Standard_Complex_Vectors.Vector; + tdx,deg : in integer32; verbose : in boolean ) is + + use Double_Lseries_Polynomials; + + neq : constant integer32 := p'last; + dim : constant integer32 := neq + 1; + nvr : constant integer32 := neq; -- number of variables minus t + tv : constant Table_Vector(neq) := Make_Table_Vector(p,dim,nvr,tdx,deg); + jp : constant Jaco_Mat(1..neq,1..dim) := Create(p); + tva : constant Table_Vector_Array(1..neq) + := Make_Table_Vector_Array(jp,tdx,deg); + xlead : Standard_Integer_Vectors.Vector(1..nvr); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : double_float; + numit : integer32 := 0; + + begin + Double_Lseries_Newton_Steps.Make_Series(x,deg,xlead,xcffs); + Double_Lseries_Newton_Steps.Set_Leading_Exponents(xlead); + Double_Lseries_Newton_Steps.Run_Newton_Steps + (deg,tv,tva,xlead,xcffs,dxnrm,pxnrm,numit,verbose=>verbose); + new_line(file); + Double_Linear_Laurent_Solvers.Write(file,xlead,xcffs,"x"); + put(file,"Maximum |dx| :"); put(file,dxnrm,3); + put(file," residual :"); put(file,pxnrm,3); new_line(file); + end Run_Regular_Newton; + + procedure Run_Singular_Newton + ( file : in file_type; + p,x : in Standard_Complex_Laur_Systems.Laur_Sys; + tdx,deg : in integer32; verbose : in boolean ) is + + use Double_Lseries_Polynomials; + + neq : constant integer32 := p'last; + dim : constant integer32 := neq + 1; + nvr : constant integer32 := neq; -- number of variables minus t + tv : constant Table_Vector(neq) := Make_Table_Vector(p,dim,nvr,tdx,deg); + jp : constant Jaco_Mat(1..neq,1..dim) := Create(p); + tva : constant Table_Vector_Array(1..neq) + := Make_Table_Vector_Array(jp,tdx,deg); + xlead : Standard_Integer_Vectors.Vector(1..nvr); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + dxnrm,pxnrm : double_float; + numit : integer32 := 0; + + begin + Double_Lseries_Newton_Steps.Make_Series(x,deg,xlead,xcffs); + Double_Lseries_Newton_Steps.Set_Leading_Exponents(xlead); + Double_Lseries_Newton_Steps.Run_Newton_Steps + (deg,tv,tva,xlead,xcffs,dxnrm,pxnrm,numit,verbose=>verbose); + new_line(file); + Double_Linear_Laurent_Solvers.Write(file,xlead,xcffs,"x"); + put(file,"Maximum |dx| :"); put(file,dxnrm,3); + put(file," residual :"); put(file,pxnrm,3); new_line(file); + end Run_Singular_Newton; + + procedure Start_at_Constant + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ) is + + use Standard_Complex_Laurentials; + use Standard_Complex_Laur_Systems; + use Standard_Complex_Solutions; + + infile,outfile : file_type; + lp : Link_to_Laur_Sys; + nq,nv,idx,deg : integer32 := 0; + sols,ptr : Solution_List; + ls : Link_to_Solution; + verbose : boolean; + ans : character; + + begin + if vrb > 0 then + put_line("-> in main_laurent_series_newton.Start_at_Constant"); + end if; + if infilename = "" then + new_line; + put_line("Reading the file name for a system and solutions ..."); + Standard_System_and_Solutions_io.get(lp,sols); + else + Open_Input_File(infile,infilename); + Standard_System_and_Solutions_io.get(infile,lp,sols); + close(infile); + end if; + new_line; + nq := lp'last; + nv := integer32(Number_of_Unknowns(lp(lp'first))); + put("Read a system of "); put(nq,1); + put(" equations in "); put(nv,1); put_line(" unknowns."); + put("Read "); put(integer32(Length_Of(sols)),1); put_line(" solutions."); + if outfilename = "" then + new_line; + put_line("Reading the name of the output file ..."); + Read_Name_and_Create_File(outfile); + else + Create_Output_File(outfile,outfilename); + end if; + put(outfile,natural32(nq),natural32(nv),lp.all); + idx := Double_Lseries_Polynomials.tsymbol_index; + if idx = 0 then + new_line; + put_line("Warning: no parameter t found ... will exit now."); + else + new_line; + put("The index of the parameter : "); put(idx,1); new_line; + put("Give the truncation degree : "); get(deg); + new_line; + put("Verbose ? (y/n) "); Ask_Yes_or_No(ans); + verbose := (ans = 'y'); + ptr := sols; + while not Is_Null(ptr) loop + ls := Head_Of(ptr); + Run_Regular_Newton(outfile,lp.all,ls.v,idx,deg,verbose); + ptr := Tail_Of(ptr); + exit when Is_Null(ptr); + new_line; + put("Continue with the next solution ? (y/n) "); + Ask_Yes_or_No(ans); + exit when (ans /= 'y'); + end loop; + end if; + end Start_at_Constant; + + procedure Start_at_Series + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ) is + + use Standard_Complex_Laurentials; + use Standard_Complex_Laur_Systems; + + infile,outfile : file_type; + lp,lsol : Link_to_Laur_Sys; + neq,nvr,dim,tdx,deg : integer32 := 0; + ans : character; + verbose : boolean; + + begin + if vrb > 0 then + put_line("-> in main_laurent_series_newton.Start_at_Series"); + end if; + if infilename = "" then + new_line; + put_line("Reading a Laurent polynomial system ..."); + get(lp); + else + Open_Input_File(infile,infilename); + get(infile,lp); + close(infile); + end if; + neq := lp'last; + nvr := integer32(Number_of_Unknowns(lp(lp'first))); + new_line; + put("Read "); put(neq,1); put(" polynomials in "); + put(nvr,1); put_line(" variables ..."); + tdx := Double_Lseries_Polynomials.tsymbol_Index; + put("-> index of t : "); put(tdx,1); new_line; + if tdx = 0 then + put_line("The polynomials must contain t as a variable!"); + else + if outfilename = "" then + new_line; + put_line("Reading the name of the output file ..."); + Read_Name_and_Create_File(outfile); + else + Create_Output_File(outfile,outfilename); + end if; + new_line; + put_line("Reading initial terms of a series ..."); + Symbol_Table.Clear; + get(lsol); + dim := lsol'last; + new_line; + put("Read "); put(dim,1); put_line(" polynomials ..."); + deg := Degree(lsol(lsol'first)); + put("The degree of the first polynomial : "); put(deg,1); new_line; + new_line; + put("Give the truncation degree : "); get(deg); + new_line; + put("Verbose ? (y/n) "); Ask_Yes_or_No(ans); + verbose := (ans = 'y'); + Run_Singular_Newton(outfile,lp.all,lsol.all,tdx,deg,verbose); + end if; + end Start_at_Series; + + procedure Run_Laurent_Series_Newton + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ) is + + ans : character; + + begin + if vrb > 0 then + put("-> in main_laurent_series_newton."); + put_line("Run_Laurent_Series_Newton ..."); + end if; + put("Start Newton's method at a constant term ? (y/n) "); + Ask_Yes_or_No(ans); + if ans = 'y' + then Start_at_Constant(infilename,outfilename,vrb-1); + else Start_at_Series(infilename,outfilename,vrb-1); + end if; + end Run_Laurent_Series_Newton; + +end Main_Laurent_Series_Newton; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/main_laurent_series_newton.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,78 @@ +with text_io; use text_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_Vectors; +with Standard_Complex_Laur_Systems; + +package Main_Laurent_Series_Newton is + +-- DESCRIPTION : +-- The main procedures for phc -u to run Newton's method on Laurent series. +-- Only double precision is currently supported. + + procedure Run_Regular_Newton + ( file : in file_type; + p : in Standard_Complex_Laur_Systems.Laur_Sys; + x : in Standard_Complex_Vectors.Vector; + tdx,deg : in integer32; verbose : in boolean ); + + -- DESCRIPTION : + -- Runs Newton's method on the system p, + -- with series starting at the constants in x. + + -- ON ENTRY : + -- file must be open for output; + -- p system with one parameter t; + -- x solution for t = 0; + -- tdx index of t as a variable in p; + -- deg truncation degree of the series; + -- verbose is the verbose flag. + + procedure Run_Singular_Newton + ( file : in file_type; + p,x : in Standard_Complex_Laur_Systems.Laur_Sys; + tdx,deg : in integer32; verbose : in boolean ); + + -- DESCRIPTION : + -- Runs Newton's method on the system p, + -- with series starting at the constants in x. + + -- ON ENTRY : + -- file must be open for output; + -- p system with one parameter t; + -- x initial terms of a power series; + -- tdx index of t as a variable in p; + -- deg truncation degree of the series; + -- verbose is the verbose flag. + + procedure Start_at_Constant + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ); + + -- DESCRIPTION : + -- Starts Newton's method at constant terms. + -- Reads the polynomial system with start solutions from the file + -- defined by infilename, or prompts for a system and solutions. + -- The name of the output file is in outfilename. + + procedure Start_at_Series + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ); + + -- DESCRIPTION : + -- Starts Newton's method at some series. + -- Reads the polynomial system from the file defined by infilename, + -- or prompts for a system. + + procedure Run_Laurent_Series_Newton + ( infilename,outfilename : in string; + vrb : in integer32 := 0 ); + + -- DESCRIPTION : + -- Runs Newton's method at Laurent series, + -- after prompting whether to start at a constant or at a series. + -- The file name for the input system may be given in infilename. + -- The file name for the output may be given in outfilename. + -- If empty strings are passed, then the user is prompted. + -- The value of the verbose level is in vrb. + +end Main_Laurent_Series_Newton; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/random_laurent_series.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/random_laurent_series.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/random_laurent_series.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/random_laurent_series.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,135 @@ +with Standard_Random_Numbers; +with Standard_Random_Vectors; +with Standard_Random_Matrices; +with Standard_Complex_Numbers; +with Standard_Complex_Vectors; + +package body Random_Laurent_Series is + + procedure Random_Series_Coefficients + ( dim,deg : in integer32; + cff : out Standard_Complex_VecVecs.Link_to_VecVec ) is + + res : Standard_Complex_VecVecs.VecVec(1..dim); + + begin + for i in 1..dim loop + declare + val : constant Standard_Complex_Vectors.Vector(0..deg) + := Standard_Random_Vectors.Random_Vector(0,deg); + begin + res(i) := new Standard_Complex_Vectors.Vector'(val); + end; + end loop; + cff := new Standard_Complex_VecVecs.VecVec'(res); + end Random_Series_Coefficients; + + procedure Random_Vector + ( dim,deg,low,upp : in integer32; + e : out Standard_Integer_Vectors.Vector; + c : out Standard_Complex_VecVecs.Link_to_VecVec ) is + begin + e := Standard_Random_Vectors.Random_Vector(1,dim,low,upp); + Random_Series_Coefficients(dim,deg,c); + end Random_Vector; + + procedure Random_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + for i in v'range loop + declare + vi : constant Standard_Complex_VecVecs.Link_to_VecVec := v(i); + begin + for j in vi'range loop + declare + vij : constant Standard_Complex_Vectors.Link_to_Vector := vi(j); + begin + for k in vij'range loop + vij(k) := Standard_Random_Numbers.Random1; + end loop; + end; + end loop; + end; + end loop; + end Random_VecVecVec; + + procedure Random_Lower_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + for i in v'range loop -- row i + declare + vi : constant Standard_Complex_VecVecs.Link_to_VecVec := v(i); + vii : constant Standard_Complex_Vectors.Link_to_Vector := vi(i); + begin + for j in vi'first..(i-1) loop -- column j + declare + vij : constant Standard_Complex_Vectors.Link_to_Vector := vi(j); + begin + for k in vij'range loop + vij(k) := Standard_Random_Numbers.Random1; + end loop; + end; + end loop; + vii(0) := Standard_Complex_Numbers.Create(1.0); + end; + end loop; + end Random_Lower_VecVecVec; + + procedure Random_Upper_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + for i in v'range loop -- row i + declare + vi : constant Standard_Complex_VecVecs.Link_to_VecVec := v(i); + begin + for j in i..vi'last loop -- column j + declare + vij : constant Standard_Complex_Vectors.Link_to_Vector := vi(j); + begin + for k in vij'range loop + vij(k) := Standard_Random_Numbers.Random1; + end loop; + end; + end loop; + end; + end loop; + end Random_Upper_VecVecVec; + + procedure Random_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + e := Standard_Random_Matrices.Random_Matrix(nbrows,nbcols,low,upp); + Random_VecVecVec(v); + end Random_Matrix; + + procedure Random_Lower_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + e := Standard_Random_Matrices.Random_Matrix(nbrows,nbcols,low,upp); + for i in e'range(1) loop + for j in i..e'last(2) loop + e(i,j) := 0; + end loop; + end loop; + Random_Lower_VecVecVec(v); + end Random_Lower_Matrix; + + procedure Random_Upper_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + begin + e := Standard_Random_Matrices.Random_Matrix(nbrows,nbcols,low,upp); + for i in e'range(1) loop + for j in e'first(2)..i loop + e(i,j) := 0; + end loop; + end loop; + Random_Upper_VecVecVec(v); + end Random_Upper_Matrix; + +end Random_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/random_laurent_series.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/random_laurent_series.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/random_laurent_series.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/random_laurent_series.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,140 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Integer_Matrices; +with Standard_Complex_VecVecs; +with Standard_Complex_VecVecVecs; + +package Random_Laurent_Series is + +-- DESCRIPTION : +-- A vector of Laurent series is represented by +-- (1) a vector of leading exponents; and +-- (2) a vector of vectors of complex number with the coefficients +-- of the Laurent series. +-- A matrix of Laurent series is represented by +-- (1) a matrix of leading exponents; and +-- (2) a vector of vector of complex numbers with the coefficients +-- of the Laurent series. +-- The procedures below generate coefficient vector for general, +-- lower triangular, and upper triangular matrices of Laurent series. + + procedure Random_Series_Coefficients + ( dim,deg : in integer32; + cff : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns in cff the coefficients of dim series of degree deg, + -- randomly generated on the complex unit circle. + -- Does all allocations for cff. + + procedure Random_Vector + ( dim,deg,low,upp : in integer32; + e : out Standard_Integer_Vectors.Vector; + c : out Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Returns in (e, c) a random vector of Laurent series. + + -- ON ENTRY : + -- dim the dimension of the vector; + -- deg the degree of the series; + -- low the lower bound on the leading exponents; + -- upp the upper bound on the leading exponents; + -- e a vector of range 1..dim; + -- c a vector of range 1..dim. + + -- ON RETURN : + -- e leading exponents of each series in the vector; + -- c coefficients of the Laurent series. + + procedure Random_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Given a fully allocated 3-dimensional v, + -- fills it up with random complex numbers on the unit circle. + + procedure Random_Lower_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Given a fully allocated 3-dimensional v, + -- fills it up with random complex numbers on the unit circle, + -- but only on the lower triangular part, below the diagonal. + -- The diagonal elements are set to one. + + procedure Random_Upper_VecVecVec + ( v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Given a fully allocated 3-dimensional v, + -- fills it up with random complex numbers on the unit circle, + -- but only on the diagonal and the upper triangular part. + + procedure Random_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns in (e, v) a random matrix of Laurent series. + + -- ON ENTRY : + -- nbrows the number of rows of the exponent matrix e; + -- nbcols the number of columns of the exponent matrix e; + -- low the lower bound on the leading exponents; + -- upp the upper bound on the leading exponents. + -- e e'range(1) = 1..rows and e'range(2) = 1..cols; + -- v a fully allocated 3-dimensional array, + -- compatible with e. + + -- ON RETURN : + -- e leading exponents in the range low..upp; + -- v coefficients of the Laurent series. + + procedure Random_Lower_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns in (e, v) a random lower triangular matrix of Laurent series, + -- with ones on the diagonal. + + -- ON ENTRY : + -- nbrows the number of rows of the exponent matrix e; + -- nbcols the number of columns of the exponent matrix e; + -- low the lower bound on the leading exponents; + -- upp the upper bound on the leading exponents. + -- e e'range(1) = 1..rows and e'range(2) = 1..cols; + -- v a fully allocated 3-dimensional array, + -- compatible with e. + + -- ON RETURN : + -- e leading exponents in the range low..upp; + -- v coefficients of the Laurent series. + + procedure Random_Upper_Matrix + ( nbrows,nbcols : in natural32; low,upp : in integer32; + e : out Standard_Integer_Matrices.Matrix; + v : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns in (e, v) a random upper triangular matrix of Laurent series, + -- with general, nonzero elements on the diagonal. + + -- ON ENTRY : + -- nbrows the number of rows of the exponent matrix e; + -- nbcols the number of columns of the exponent matrix e; + -- low the lower bound on the leading exponents; + -- upp the upper bound on the leading exponents. + -- e e'range(1) = 1..rows and e'range(2) = 1..cols; + -- v a fully allocated 3-dimensional array, + -- compatible with e. + + -- ON RETURN : + -- e leading exponents in the range low..upp; + -- v coefficients of the Laurent series. + +end Random_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Laurent/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/READ_ME 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,29 @@ +Laurent series with complex coefficients for PHCv2.4.85 + +Power series with leading nonzero coefficients work provide Taylor series +expansions of regular solutions of polynomial systems. +Laurent series allow for negative exponents and are arithmetically closed. + +Run "gprbuild laurent.gpr" to make all test programs. + +------------------------------------------------------------------------------ +file name : short description +------------------------------------------------------------------------------ +double_laurent_series : defines operations on Laurent series +test_double_laurent_series : basic tests on truncated Laurent series +ts_pslaur : call the main test on Laurent series +------------------------------------------------------------------------------ +random_laurent_series : random vectors/matrices of Laurent series +double_linear_laurent_solvers : solvers of linear Laurent series systems +test_double_lseries_matrices : tests matrices of Laurent series +ts_laurmat : the main test on Laurent series matrices +------------------------------------------------------------------------------ +double_lseries_polynomials : Laurent series polynomials +test_double_lseries_polynomials : tests on Laurent series polynomials +ts_lserpol : main test on Laurent series polynomials +------------------------------------------------------------------------------ +double_lseries_newton_steps : runs Newton's method on Laurent series +test_double_lseries_newton : tests Newton on Laurent series polynomials +ts_lsernew : main test on Laurent series Newton +main_laurent_series_newton : main procedure for phc -u +------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_laurent_series.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_laurent_series.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_laurent_series.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_laurent_series.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,79 @@ +with text_io; use text_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Vectors; +with Standard_Random_Vectors; +with Double_Laurent_Series; use Double_Laurent_Series; + +package body Test_Double_Laurent_Series is + + procedure Test_Multiply_Inverse_Divide ( deg : in integer32 ) is + + ale,ble,prodle,invble,quotle : integer32 := 0; + a : constant Standard_Complex_Vectors.Vector(0..deg) + := Standard_Random_Vectors.Random_Vector(0,deg); + b : constant Standard_Complex_Vectors.Vector(0..deg) + := Standard_Random_Vectors.Random_Vector(0,deg); + prod : Standard_Complex_Vectors.Vector(0..deg); + invb : Standard_Complex_Vectors.Vector(0..deg); + quot : Standard_Complex_Vectors.Vector(0..deg); + + begin + new_line; + put("Give the leading exponent of a : "); get(ale); + put("Give the leading exponent of b : "); get(ble); + new_line; + put_line("A random series a :"); Write(ale,a); + new_line; + put_line("A random series b :"); Write(ble,b); + Multiply(deg,ale,ble,a,b,prodle,prod); + new_line; + put_line("The product of a with b :"); Write(prodle,prod); + Divide(deg,prodle,ble,prod,b,quotle,quot,invb); + new_line; + put_line("The quotient of a*b with b :"); Write(quotle,quot); + invble := -ble; + Multiply(deg,ble,invble,b,invb,prodle,prod); + put_line("The product of b with 1/b :"); Write(prodle,prod); + end Test_Multiply_Inverse_Divide; + + procedure Test_Add_and_Subtract ( deg : in integer32 ) is + + ale,ble,sumle,difle : integer32 := 0; + a : constant Standard_Complex_Vectors.Vector(0..deg) + := Standard_Random_Vectors.Random_Vector(0,deg); + b : constant Standard_Complex_Vectors.Vector(0..deg) + := Standard_Random_Vectors.Random_Vector(0,deg); + sum : Standard_Complex_Vectors.Vector(0..deg); + dif : Standard_Complex_Vectors.Vector(0..deg); + + begin + new_line; + put("Give the leading exponent of a : "); get(ale); + put("Give the leading exponent of b : "); get(ble); + new_line; + put_line("A random series a :"); Write(ale,a); + new_line; + put_line("A random series b :"); Write(ble,b); + Add(deg,ale,ble,a,b,sumle,sum); + new_line; + put_line("The sum of a and b :"); Write(sumle,sum); + Subtract(deg,sumle,ble,sum,b,difle,dif); + new_line; + put_line("The result of (a + b) - b :"); Write(difle,dif); + Subtract(deg,ale,ale,a,a,difle,dif); + new_line; + put_line("The result of a - a :"); Write(difle,dif); + end Test_Add_and_Subtract; + + procedure Main is + + d : integer32 := 0; + + begin + new_line; + put("Give the truncation degree : "); get(d); + Test_Multiply_Inverse_Divide(d); + Test_Add_and_Subtract(d); + end Main; + +end Test_Double_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_laurent_series.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_laurent_series.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_laurent_series.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_laurent_series.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,28 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; + +package Test_Double_Laurent_Series is + +-- DESCRIPTION : +-- Performs some basic tests on truncated Laurent power series, +-- defined by a leading exponent (which may be negative) +-- and a complex coefficient vector, in double precision. + + procedure Test_Multiply_Inverse_Divide ( deg : in integer32 ); + + -- DESCRIPTION : + -- Generates coefficient vectors for truncated Laurent series + -- to degree deg, to test multiplication, inverse, and division. + + procedure Test_Add_and_Subtract ( deg : in integer32 ); + + -- DESCRIPTION : + -- Generates coefficient vectors for truncated Laurent series + -- to degree deg, to test addition and subtraction. + + procedure Main; + + -- DESCRIPTION : + -- Prompts for the degree of truncation, + -- and tests some basic arithmetical operations. + +end Test_Double_Laurent_Series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,625 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; +with Standard_Complex_Numbers; use Standard_Complex_Numbers; +with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; +with Standard_Random_Numbers; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Integer_Matrices_io; use Standard_Integer_Matrices_io; +with Standard_Complex_Vectors; +with Standard_Complex_VecVecs; +with Double_Laurent_Series; +with Random_Laurent_Series; use Random_Laurent_Series; +with Double_Linear_Laurent_Solvers; use Double_Linear_Laurent_Solvers; + +package body Test_Double_Lseries_Matrices is + + procedure Matrix_Matrix_Product + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Clead : out Standard_Integer_Matrices.Matrix; + Ccffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Arow,Brow,Crow : Standard_Complex_VecVecs.Link_to_VecVec; + Acff,Bcff,Ccff : Standard_Complex_Vectors.Link_to_Vector; + ze,ewrk,eprd : integer32; + zc,cwrk,cprd : Standard_Complex_Vectors.Vector(0..deg); + + begin + for i in 1..nrows loop -- initialize C to zero + Crow := Ccffs(i); + for j in 1..ncols loop + Clead(i,j) := 0; + Ccff := Crow(j); -- coefficients of C(i,j) + for k in 0..deg loop + Ccff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + end loop; + for i in 1..nrows loop + Arow := Acffs(i); + Crow := Ccffs(i); + for j in 1..ncols loop + ewrk := 0; -- accumulates leading exponent of C(i,j) + for k in 0..deg loop + cwrk(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + for k in 1..ncols loop + Acff := Arow(k); -- Acff is A(i,k) + Brow := Bcffs(k); Bcff := Brow(j); -- Bcff is B(k,j) + Double_Laurent_Series.Multiply + (deg,Alead(i,k),Blead(k,j),Acff.all,Bcff.all,eprd,cprd); + -- eprd is the leading exponent of A(i,k)*B(k,j) + -- cprd has the coefficients of A(i,k)*B(k,j) + Double_Laurent_Series.Add(deg,ewrk,eprd,cwrk,cprd,ze,zc); + ewrk := ze; -- leading exponent of accumulator + for L in 0..deg loop -- copy coefficients of accumulator + cwrk(L) := zc(L); + end loop; + end loop; + Clead(i,j) := ewrk; + Ccff := Crow(j); + for k in 0..deg loop + Ccff(k) := cwrk(k); + end loop; + end loop; + end loop; + end Matrix_Matrix_Product; + + procedure Write_Difference + ( deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Arow,Brow : Standard_Complex_VecVecs.Link_to_VecVec; + Acff,Bcff : Standard_Complex_Vectors.Link_to_Vector; + ze : integer32; + zc : Standard_Complex_Vectors.Vector(0..deg); + nrm : double_float := 0.0; + + begin + for i in Alead'range(1) loop + Arow := Acffs(i); + Brow := Bcffs(i); + for j in Alead'range(2) loop + Acff := Arow(j); + Bcff := Brow(j); + Double_Laurent_Series.Subtract + (deg,Alead(i,j),Blead(i,j),Acff.all,Bcff.all,ze,zc); + put("D("); put(i,1); put(","); put(j,1); put_line(") :"); + Double_Laurent_Series.Write(ze,zc); + for k in 0..deg loop + nrm := nrm + Standard_Complex_Numbers.AbsVal(zc(k)); + end loop; + end loop; + end loop; + put("The difference sum : "); put(nrm); new_line; + end Write_Difference; + + procedure Plain_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Llead : out Standard_Integer_Matrices.Matrix; + Lcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Ulead : out Standard_Integer_Matrices.Matrix; + Ucffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Lrow,Urow,Arow : Standard_Complex_VecVecs.Link_to_VecVec; + Lcff,Ucff,Acff : Standard_Complex_Vectors.Link_to_Vector; + ze,ewrk,eprd : integer32; + zc,cwrk,cprd : Standard_Complex_Vectors.Vector(0..deg); + + begin + for i in 1..nrows loop -- initialization of L and U + Urow := Ucffs(i); + for j in 1..(i-1) loop -- set the lower triangular part of U to zero + Ulead(i,j) := 0; + Ucff := Urow(j); -- coefficients of U(i,j) + for k in 0..deg loop + Ucff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + Llead(i,i) := 0; + Lrow := Lcffs(i); -- set the diagonal of L to one + Lcff := Lrow(i); -- coefficients of L(i,i) + Lcff(0) := Standard_Complex_Numbers.Create(1.0); + for k in 1..deg loop + Lcff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + for j in (i+1)..ncols loop -- make upper triangular part of L zero + Llead(i,j) := 0; + Lcff := Lrow(j); -- coefficients of L(i,j) + for k in 0..deg loop + Lcff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + end loop; + for j in 1..ncols loop + for i in 1..j loop -- row reduction assigns to U + Arow := Acffs(i); Acff := Arow(j); -- U(i,j) := A(i,j) + ewrk := Alead(i,j); + for k in 0..deg loop + cwrk(k) := Acff(k); -- accumulates U(i,j) + end loop; + for k in 1..(i-1) loop -- U(i,j) := U(i,j) - L(i,k)*U(k,j) + Lrow := Lcffs(i); Lcff := Lrow(k); -- Lcff is L(i,k) + Urow := Ucffs(k); Ucff := Urow(j); -- Ucff is U(k,j) + Double_Laurent_Series.Multiply + (deg,Llead(i,k),Ulead(k,j),Lcff.all,Ucff.all,eprd,cprd); + -- eprd is the leading exponent of L(i,k)*U(k,j) + -- cprd has the coefficients of L(i,k)*U(k,j) + Double_Laurent_Series.Subtract(deg,ewrk,eprd,cwrk,cprd,ze,zc); + ewrk := ze; -- leading exponent of U(i,j) - L(i,k)*U(k,j) + for L in 0..deg loop -- copy coefficients of U(i,j) - L(i,k)*U(k,j) + cwrk(L) := zc(L); + end loop; + end loop; + Ulead(i,j) := ewrk; -- copy accumulator to U(i,j) + Urow := Ucffs(i); Ucff := Urow(j); -- Ucff is U(i,j) + for k in 0..deg loop + Ucff(k) := cwrk(k); + end loop; + end loop; + for i in j+1..nrows loop -- row reduction assigns to L + Arow := Acffs(i); Acff := Arow(j); -- L(i,j) := A(i,j) + ewrk := Alead(i,j); + for k in 0..deg loop + cwrk(k) := Acff(k); -- accumulates L(i,j) + end loop; + for k in 1..(j-1) loop -- L(i,j) := L(i,j) - L(i,k)*U(k,j) + Lrow := Lcffs(i); Lcff := Lrow(k); -- Lcff is L(i,k) + Urow := Ucffs(k); Ucff := Urow(j); -- Ucff is U(k,j) + Double_Laurent_Series.Multiply + (deg,Llead(i,k),Ulead(k,j),Lcff.all,Ucff.all,eprd,cprd); + -- eprd is the leading exponent of L(i,k)*U(k,j) + -- cprd has the coefficients of L(i,k)*U(k,j) + Double_Laurent_Series.Subtract(deg,ewrk,eprd,cwrk,cprd,ze,zc); + ewrk := ze; -- leading exponent of L(i,j) - L(i,k)*U(k,j) + for L in 0..deg loop -- copy coefficients of L(i,j) - L(i,k)*U(k,j) + cwrk(L) := zc(L); + end loop; + end loop; + Llead(i,j) := ewrk; -- copy accumulator to L(i,j) + Lrow := Lcffs(i); Lcff := Lrow(j); -- Lcff is L(i,j) + for k in 0..deg loop + Lcff(k) := cwrk(k); + end loop; + Urow := Ucffs(j); Ucff := Urow(j); -- Ucff is U(j,j) + Double_Laurent_Series.Divide + (deg,Llead(i,j),Ulead(j,j),Lcff.all,Ucff.all,ze,zc,cwrk); + Llead(i,j) := ze; -- leading exponent of L(i,j)/U(j,j) + for k in 0..deg loop -- copy coefficients of L(i,j)/U(j,j) + Lcff(k) := zc(k); + end loop; + end loop; + end loop; + end Plain_LU_Factorization; + + procedure Test_Plain_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Llead,Ulead,Plead : Standard_Integer_Matrices.Matrix(1..nrows,1..ncols); + Lcffs,Ucffs,Pcffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + + begin + Standard_Complex_VecVecVecs.Allocate(Lcffs,1,nrows,1,ncols,0,deg); + Standard_Complex_VecVecVecs.Allocate(Ucffs,1,nrows,1,ncols,0,deg); + Standard_Complex_VecVecVecs.Allocate(Pcffs,1,nrows,1,ncols,0,deg); + put_line("Computing a plain LU factorization ..."); + Plain_LU_Factorization + (nrows,ncols,deg,Alead,Acffs,Llead,Lcffs,Ulead,Ucffs); + put_line("Computing the product of L with U ..."); + Matrix_Matrix_Product + (nrows,ncols,deg,Llead,Lcffs,Ulead,Ucffs,Plead,Pcffs); + Write(Llead,Lcffs,"L"); + Write(Ulead,Ucffs,"U"); + Write(Plead,Pcffs,"P"); + Write(Alead,Acffs,"A"); + Write_Difference(deg,Alead,Acffs,Plead,Pcffs); + end Test_Plain_LU_Factorization; + + procedure Lower_Triangular_Part + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Llead : out Standard_Integer_Matrices.Matrix; + Lcffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Lrow,Arow : Standard_Complex_VecVecs.Link_to_VecVec; + Lcff,Acff : Standard_Complex_Vectors.Link_to_Vector; + + begin + for i in 1..nrows loop + Lrow := Lcffs(i); + Arow := Acffs(i); + for j in 1..(i-1) loop + Llead(i,j) := Alead(i,j); + Lcff := Lrow(j); + Acff := Arow(j); + for k in 0..deg loop + Lcff(k) := Acff(k); + end loop; + end loop; + Llead(i,i) := 0; + Lcff := Lrow(i); + Lcff(0) := Standard_Complex_Numbers.Create(1.0); + for k in 1..deg loop + Lcff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + for j in (i+1)..ncols loop + Llead(i,j) := 0; + Lcff := Lrow(j); + for k in 0..deg loop + Lcff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + end loop; + end Lower_Triangular_Part; + + procedure Upper_Triangular_Part + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Ulead : out Standard_Integer_Matrices.Matrix; + Ucffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Urow,Arow : Standard_Complex_VecVecs.Link_to_VecVec; + Ucff,Acff : Standard_Complex_Vectors.Link_to_Vector; + + begin + for i in 1..nrows loop + Urow := Ucffs(i); + for j in 1..(i-1) loop + Ulead(i,j) := 0; + Ucff := Urow(j); + for k in 0..deg loop + Ucff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + Arow := Acffs(i); + for j in i..ncols loop + Ulead(i,j) := Alead(i,j); + Ucff := Urow(j); + Acff := Arow(j); + for k in 0..deg loop + Ucff(k) := Acff(k); + end loop; + end loop; + end loop; + end Upper_Triangular_Part; + + procedure Permute + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : in Standard_Integer_Vectors.Vector; + Blead : out Standard_Integer_Matrices.Matrix; + Bcffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Arow,Brow : Standard_Complex_VecVecs.Link_to_VecVec; + Acff,Bcff : Standard_Complex_Vectors.Link_to_Vector; + + begin + for i in 1..nrows loop + Arow := Acffs(pivots(i)); + Brow := Bcffs(i); + for j in 1..ncols loop + Acff := Arow(j); + Bcff := Brow(j); + for k in 0..deg loop + Bcff(k) := Acff(k); + end loop; + Blead(i,j) := Alead(pivots(i),j); + end loop; + end loop; + end Permute; + + procedure Copy + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : out Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Arow,Brow : Standard_Complex_VecVecs.Link_to_VecVec; + Acff,Bcff : Standard_Complex_Vectors.Link_to_Vector; + + begin + for i in 1..nrows loop + Arow := Acffs(i); + Brow := Bcffs(i); + for j in 1..ncols loop + Blead(i,j) := Alead(i,j); + Acff := Arow(j); + Bcff := Brow(j); + for k in 0..deg loop + Bcff(k) := Acff(k); + end loop; + end loop; + end loop; + end Copy; + + procedure Test_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ) is + + Llead,Ulead,Plead : Standard_Integer_Matrices.Matrix(1..nrows,1..ncols); + Lcffs,Ucffs,Pcffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : Standard_Integer_Vectors.Vector(1..ncols); + A2lead,Blead : Standard_Integer_Matrices.Matrix(1..nrows,1..ncols); + A2cffs,Bcffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + + begin + Standard_Complex_VecVecVecs.Allocate(A2cffs,1,nrows,1,ncols,0,deg); + Copy(nrows,ncols,deg,Alead,Acffs,A2lead,A2cffs); + Standard_Complex_VecVecVecs.Allocate(Lcffs,1,nrows,1,ncols,0,deg); + Standard_Complex_VecVecVecs.Allocate(Ucffs,1,nrows,1,ncols,0,deg); + Standard_Complex_VecVecVecs.Allocate(Pcffs,1,nrows,1,ncols,0,deg); + Standard_Complex_VecVecVecs.Allocate(Bcffs,1,nrows,1,ncols,0,deg); + put_line("Computing a LU factorization ..."); + LU_Factorization(nrows,ncols,deg,Alead,Acffs,pivots); + Lower_Triangular_Part(nrows,ncols,deg,Alead,Acffs,Llead,Lcffs); + Upper_Triangular_Part(nrows,ncols,deg,Alead,Acffs,Ulead,Ucffs); + put_line("Computing the product of L with U ..."); + Matrix_Matrix_Product + (nrows,ncols,deg,Llead,Lcffs,Ulead,Ucffs,Plead,Pcffs); + Write(Llead,Lcffs,"L"); + Write(Ulead,Ucffs,"U"); + Write(Plead,Pcffs,"P"); + put("The pivots : "); put(pivots); new_line; + Permute(nrows,ncols,deg,A2lead,A2cffs,pivots,Blead,Bcffs); + Write(Blead,Bcffs,"permutedA"); + Write_Difference(deg,Blead,Bcffs,Plead,Pcffs); + end Test_LU_Factorization; + + procedure Test ( nrows,ncols,deg,low,upp : in integer32; + lower,upper : in boolean ) is + + nbrows : constant natural32 := natural32(nrows); + nbcols : constant natural32 := natural32(ncols); + Alead : Standard_Integer_Matrices.Matrix(1..nrows,1..ncols); + xlead : Standard_Integer_Vectors.Vector(1..ncols); + Acffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + xcffs,ycffs : Standard_Complex_VecVecs.Link_to_VecVec; + ylead : Standard_Integer_Vectors.Vector(1..ncols); + blead : Standard_Integer_Vectors.Vector(1..nrows); + bcffs : Standard_Complex_VecVecs.Link_to_VecVec; + ans : character; + + begin + Standard_Complex_VecVecVecs.Allocate(Acffs,1,nrows,1,ncols,0,deg); + if not lower and not upper then + Random_Matrix(nbrows,nbcols,low,upp,Alead,Acffs); + elsif lower then + Random_Lower_Matrix(nbrows,nbcols,low,upp,Alead,Acffs); + else -- upper must be true + Random_Upper_Matrix(nbrows,nbcols,low,upp,Alead,Acffs); + end if; + put_line("The matrix of leading exponents :"); put(Alead,1); + put("A "); put(nrows,1); put("-by-"); put(ncols,1); + put_line(" matrix of Laurent series : "); Write(Alead,Acffs); + Random_Vector(ncols,deg,low,upp,xlead,xcffs); + put("The vector of leading exponents :"); put(xlead,1); new_line; + put("A "); put(ncols,1); put_line("-vector of Laurent series :"); + Write(xlead,xcffs,"x"); + Allocate_Series_Coefficients(nrows,deg,bcffs); + Matrix_Vector_Product(deg,Alead,Acffs,xlead,xcffs,blead,bcffs); + put_line("The product of the matrix with the vector :"); + Write(blead,bcffs,"b"); + Allocate_Series_Coefficients(ncols,deg,ycffs); + if lower then + Forward_Substitution(deg,Alead,Acffs,blead,bcffs,ylead,ycffs); + put_line("The computed solution :"); + Write(ylead,ycffs,"y"); + elsif upper then + Backward_Substitution(deg,Alead,Acffs,blead,bcffs,ylead,ycffs); + put_line("The computed solution :"); + Write(ylead,ycffs,"y"); + else + new_line; + put("Apply pivoting in the LU factorization ? "); + Ask_Yes_or_No(ans); + if ans = 'y' + then Test_LU_Factorization(nrows,ncols,deg,Alead,Acffs); + else Test_Plain_LU_Factorization(nrows,ncols,deg,Alead,Acffs); + end if; + end if; + end Test; + + procedure Specific_Test is + + deg : constant integer32 := 2; + Alead,Llead,Ulead : Standard_Integer_Matrices.Matrix(1..2,1..2); + Acffs,Lcffs,Ucffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Arow : Standard_Complex_VecVecs.Link_to_VecVec; + Acff : Standard_Complex_Vectors.Link_to_Vector; + pivots : Standard_Integer_Vectors.Vector(1..2); + + begin + Alead(1,1) := 1; Alead(1,2) := 0; + Alead(2,1) := 1; Alead(2,2) := 0; + Standard_Complex_VecVecVecs.Allocate(Acffs,1,2,1,2,0,deg); + Arow := Acffs(1); + Acff := Arow(1); -- Acff is A(1,1) = t + Acff(0) := Standard_Complex_Numbers.Create(1.0); + for k in 1..deg loop + Acff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + Acff := Arow(2); -- Acff is A(1,2) = 1 + Acff(0) := Standard_Complex_Numbers.Create(1.0); + for k in 1..deg loop + Acff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + Arow := Acffs(2); + Acff := Arow(1); -- Acff is A(2,1) = t + Acff(0) := Standard_Complex_Numbers.Create(1.0); + for k in 1..deg loop + Acff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + Acff := Arow(2); -- Acff is A(2,2) = 0 + Acff(0) := Standard_Complex_Numbers.Create(0.0); + for k in 1..deg loop + Acff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + Write(Alead,Acffs,"A"); + Standard_Complex_VecVecVecs.Allocate(Lcffs,1,2,1,2,0,deg); + Standard_Complex_VecVecVecs.Allocate(Ucffs,1,2,1,2,0,deg); + LU_Factorization(2,2,deg,Alead,Acffs,pivots); + put("The pivots :"); put(pivots); new_line; + Lower_Triangular_Part(2,2,deg,Alead,Acffs,Llead,Lcffs); + Upper_Triangular_Part(2,2,deg,Alead,Acffs,Ulead,Ucffs); + Write(Llead,Lcffs,"L"); + Write(Ulead,Ucffs,"U"); + end Specific_Test; + + function Seed_Prompt return integer32 is + + ans : character; + seed : integer32 := 0; + + begin + new_line; + put("Fixed seed ? (y/n) "); Ask_Yes_or_No(ans); + if ans /= 'y' then + seed := Standard_Random_Numbers.Get_Seed; + else + put("Give the seed : "); get(seed); + Standard_Random_Numbers.Set_Seed(natural32(seed)); + end if; + return seed; + end Seed_Prompt; + + procedure Determinant_Test is + + deg,low,upp,seed : integer32 := 0; + Alead,Llead,Ulead : Standard_Integer_Matrices.Matrix(1..2,1..2); + Acffs,Lcffs,Ucffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Arow1,Arow2 : Standard_Complex_VecVecs.Link_to_VecVec; + pivots : Standard_Integer_Vectors.Vector(1..2); + xdetlead,left,right : integer32 := 0; + xdetcff0 : Complex_Number; + + begin + new_line; + put("Give the truncation degree : "); get(deg); + put("Give the lower bound on the leading exponent : "); get(low); + put("Give the upper bound on the leading exponent : "); get(upp); + seed := Seed_Prompt; + Standard_Complex_VecVecVecs.Allocate(Acffs,1,2,1,2,0,deg); + Random_Matrix(2,2,low,upp,Alead,Acffs); + Write(Alead,Acffs,"A"); + put_line("The leading exponents : "); put(Alead); + -- xdetlead := min(Alead(1,1) + Alead(2,2),Alead(2,1) + Alead(1,2)); + left := Alead(1,1) + Alead(2,2); + right := Alead(2,1) + Alead(1,2); + put("Leading exponent of determinant : "); put(xdetlead,1); new_line; + Arow1 := Acffs(1); + Arow2 := Acffs(2); + if left = right then + xdetcff0 := Arow1(1)(0)*Arow2(2)(0) - Arow2(1)(0)*Arow1(2)(0); + xdetlead := left; + elsif left < right then + xdetcff0 := Arow1(1)(0)*Arow2(2)(0); + xdetlead := left; + else + xdetcff0 := -Arow2(1)(0)*Arow1(2)(0); + xdetlead := right; + end if; + Standard_Complex_VecVecVecs.Allocate(Lcffs,1,2,1,2,0,deg); + Standard_Complex_VecVecVecs.Allocate(Ucffs,1,2,1,2,0,deg); + LU_Factorization(2,2,deg,Alead,Acffs,pivots); + put_line("The matrix after the LU factorization :"); + Write(Alead,Acffs,"A"); + put("The pivots :"); put(pivots); new_line; + Lower_Triangular_Part(2,2,deg,Alead,Acffs,Llead,Lcffs); + Upper_Triangular_Part(2,2,deg,Alead,Acffs,Ulead,Ucffs); + Write(Llead,Lcffs,"L"); + Write(Ulead,Ucffs,"U"); + new_line; + put_line("Now we do the determinant test ..."); + declare + ydetlead : integer32 := 0; + ydetcff : Standard_Complex_Vectors.Vector(0..deg); + begin + Double_Laurent_Series.Multiply + (deg,Ulead(1,1),Ulead(2,2),Ucffs(1)(1).all,Ucffs(2)(2).all, + ydetlead,ydetcff); + put("xdetlead : "); put(xdetlead,1); new_line; + put("ydetlead : "); put(ydetlead,1); + if xdetlead /= ydetlead then + put_line(" mismatched leading exponents of determinant!"); + else + put_line(" matching leading exponents of determinant."); + put("xdet(0) : "); put(xdetcff0); new_line; + put("ydet(0) : "); put(ydetcff(0)); new_line; + end if; + end; + new_line; + put("The seed used : "); put(seed,1); new_line; + end Determinant_Test; + + procedure Random_Test is + + deg,nrows,ncols,low,upp,seed : integer32 := 0; + ans : character; + lower,upper : boolean; + + begin + new_line; + put("Give the truncation degree : "); get(deg); + put("Give the lower bound on the leading exponent : "); get(low); + put("Give the upper bound on the leading exponent : "); get(upp); + put("Give the number of rows : "); get(nrows); + put("Give the number of columns : "); get(ncols); + new_line; + if nrows /= ncols then + lower := false; + else + put("Lower triangular matrix ? (y/n) "); Ask_Yes_or_No(ans); + lower := (ans = 'y'); + if lower then + upper := false; + else + put("Upper triangular matrix ? (y/n) "); Ask_Yes_or_No(ans); + upper := (ans = 'y'); + end if; + end if; + seed := Seed_Prompt; + Test(nrows,ncols,deg,low,upp,lower,upper); + new_line; + put("The seed used : "); put(seed,1); new_line; + end Random_Test; + + procedure Main is + + ans : character; + + begin + new_line; + put_line("MENU for testing the Laurent matrix operations :"); + put_line(" 1. LU factorization of a specific 2-by-2 matrix"); + put_line(" 2. determinant of a random 2-by-2 matrix"); + put_line(" 3. LU factorization of a random general matrix"); + put("Type 1, 2, or 3 to select a test : "); + Ask_Alternative(ans,"123"); + case ans is + when '1' => Specific_Test; + when '2' => Determinant_Test; + when '3' => Random_Test; + when others => null; + end case; + end Main; + +end Test_Double_Lseries_Matrices; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_matrices.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,239 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Integer_Matrices; +with Standard_Complex_VecVecVecs; + +package Test_Double_Lseries_Matrices is + +-- DESCRIPTION : +-- A matrix of Laurent series is a tuple of +-- 1) a matrix of leading exponents, and +-- 2) a 3-dimensional vector of vector of vectors +-- with the coefficients of the power series. +-- The procedures in this package test the LU factorization +-- of a matrix of Laurent series, in double precision. + + procedure Matrix_Matrix_Product + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Clead : out Standard_Integer_Matrices.Matrix; + Ccffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns the product of two square matrices A and B in C. + + -- ON ENTRY : + -- nrows number of rows of all matrices; + -- ncols number of columns of all matrices; + -- deg degree of the series in all matrices; + -- Alead leading exponents of the series in the matrix A; + -- Acffs coefficients of the series in the matrix A; + -- Blead leading exponents of the series in the matrix B; + -- Bcffs coefficients of the series in the matrix B. + + -- ON RETURN : + -- Clead leading exponents of the product of A with B; + -- Ccffs coefficients of the product of A with B. + + procedure Write_Difference + ( deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : in Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Writes the difference between the matrices A and B. + + procedure Plain_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Llead : out Standard_Integer_Matrices.Matrix; + Lcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Ulead : out Standard_Integer_Matrices.Matrix; + Ucffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Applies the plain LU factorization, plain means without pivoting, + -- factoring the matrix A as a product of a lower triangular L with + -- an upper triangular matrix U. For testing purposes, the matrices + -- L and U are returned explicitly. + + -- ON ENTRY : + -- nrows number of rows of the matrix; + -- ncols number of columns of the matrix; + -- deg degree of the series in all matrices; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series. + + -- ON RETURN : + -- Llead leading exponents of the lower triangular factor L + -- that has ones on its diagonal; + -- Lcffs coefficients of the lower triangular factor L; + -- Ulead leading exponents of the upper triangular factor U; + -- Ucffs coefficients of the upper triangular factor U. + + procedure Test_Plain_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Tests the LU factorization on a general, random matrix. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series. + + procedure Lower_Triangular_Part + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Llead : out Standard_Integer_Matrices.Matrix; + Lcffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns the lower triangular part of A, with ones on the diagonal. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series in the matrix. + + -- ON RETURN : + -- Llead leading exponents of the lower triangular part of A; + -- Lcffs coefficients of the series in the lower triangular part. + + procedure Upper_Triangular_Part + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Ulead : out Standard_Integer_Matrices.Matrix; + Ucffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns the upper triangular part of A, + -- which includes the diagonal. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series in the matrix. + + -- ON RETURN : + -- Ulead leading exponents of the upper triangular part of A; + -- Ucffs coefficients of the series in the upper triangular part. + + procedure Permute + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + pivots : in Standard_Integer_Vectors.Vector; + Blead : out Standard_Integer_Matrices.Matrix; + Bcffs : out Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Returns in B the pivoting applied to A. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series in the matrix; + -- pivots pivots computed by the LU factorization. + + -- ON RETURN : + -- Blead leading exponents of the permuted matrix; + -- Bcffs coefficients of the matrix A, permuted with pivots. + + procedure Copy + ( nrows,ncols,deg : in integer32; + Alead : in Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec; + Blead : out Standard_Integer_Matrices.Matrix; + Bcffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Copies the matrix A into B. + + -- ON ENTRY : + -- nrows number of rows of the matrices; + -- ncols number of columns of the matrices; + -- deg degree of the series in the matrices; + -- Alead leading exponents of the series of the matrix A; + -- Acffs coefficients of the series in the matrix A; + -- Blead matrix of the same ranges as Alead; + -- Bcffs allocated space for the same dimensions as A. + + -- ON RETURN : + -- Blead copy of Alead; + -- Bcffs copy of Acffs. + + procedure Test_LU_Factorization + ( nrows,ncols,deg : in integer32; + Alead : in out Standard_Integer_Matrices.Matrix; + Acffs : in Standard_Complex_VecVecVecs.Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Tests the LU factorization with pivoting. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- Alead leading exponents of the series; + -- Acffs coefficients of the series in the matrix. + + procedure Test ( nrows,ncols,deg,low,upp : in integer32; + lower,upper : in boolean ); + + -- DESCRIPTION : + -- Generates a random linear system and runs a test. + + -- ON ENTRY : + -- nrows number of rows of the test matrix; + -- ncols number of columns of the test matrix; + -- deg degree of the series in the matrix; + -- low lower bound for the leading exponents; + -- upp upper bound for the leading exponents; + -- lower true if the test matrix is lower triangular; + -- upper true if the test matrix is upper triangular. + + procedure Specific_Test; + + -- DESCRIPTION : + -- Runs a specific test. + + function Seed_Prompt return integer32; + + -- DESCRIPTION : + -- Prompts for a fixed seed or a random seed. + + procedure Determinant_Test; + + -- DESCRIPTION : + -- Tests the determinant of a random 2-by-2 matrix. + + procedure Random_Test; + + -- DESCRIPTION : + -- Tests the LU factorization for a general random matrix. + + procedure Main; + + -- DESCRIPTION : + -- Prompts for the parameters of the tests and the runs tests. + +end Test_Double_Lseries_Matrices; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,233 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Complex_Numbers; +with Standard_Integer_VecVecs; +with Standard_Complex_VecVecs; +with Standard_Integer_Matrices; +with Standard_Complex_VecVecVecs; +with Symbol_Table; +with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; +with Standard_Complex_Laur_Systems_io; use Standard_Complex_Laur_Systems_io; +with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; +with Standard_Complex_Solutions; use Standard_Complex_Solutions; +with Standard_System_and_Solutions_io; +with Double_Linear_Laurent_Solvers; +with Double_Lseries_Newton_Steps; + +package body Test_Double_Lseries_Newton is + + procedure Add_Parameter ( tv : in Table_Vector ) is + + eqmons : Standard_Integer_VecVecs.Link_to_VecVec; + eqcffs : Standard_Complex_VecVecs.Link_to_VecVec; + mon : Standard_Integer_Vectors.Link_to_Vector; + cff : Standard_Complex_Vectors.Link_to_Vector; + allzero : boolean := false; + + begin + for i in tv.mons'range loop -- search for the constant term + eqmons := tv.mons(i); -- monomials of i-th equation + for j in eqmons'range loop + mon := eqmons(j); + allzero := true; + for k in mon'range loop + if mon(k) /= 0 + then allzero := false; + end if; + exit when not allzero; + end loop; + if allzero then + eqcffs := tv.cffs(i); + cff := eqcffs(j); + cff(1) := Standard_Complex_Numbers.Create(1.0); + end if; + exit when allzero; + end loop; + exit when allzero; + end loop; + if not allzero + then put_line("Warning: no constant term found."); + end if; + end Add_Parameter; + + procedure Interactive_Newton_Steps + ( deg : in integer32; + tv : in Table_Vector; tva : in Table_Vector_Array; + xlead : in out Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + verbose : in boolean := true ) is + + neq : constant integer32 := tva'last; + nvr : constant integer32 := xlead'last; + ylead,dxlead,rlead : Standard_Integer_Vectors.Vector(1..nvr); + ycffs,dxcffs,rcffs : Standard_Complex_VecVecs.Link_to_VecVec; + Alead,Blead : Standard_Integer_Matrices.Matrix(1..neq,1..nvr); + Acffs,Bcffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + ans : character; + stepcnt : integer32 := 1; + dxnrm,pxnrm : double_float; + + begin + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,ycffs); + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,dxcffs); + Double_Linear_Laurent_Solvers.Allocate_Series_Coefficients(nvr,deg,rcffs); + Standard_Complex_VecVecVecs.Allocate(Acffs,1,neq,1,nvr,0,deg); + Standard_Complex_VecVecVecs.Allocate(Bcffs,1,neq,1,nvr,0,deg); + loop + put("Step "); put(stepcnt,1); put_line(" ..."); + Double_Lseries_Newton_Steps.Newton_Step + (deg,tv,tva,xlead,xcffs,ylead,ycffs,Alead,Acffs,Blead,Bcffs, + dxlead,dxcffs,rlead,rcffs,dxnrm,pxnrm,verbose); + Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + put("Do another step ? (y/n) "); Ask_Yes_or_No(ans); + exit when (ans /= 'y'); + stepcnt := stepcnt + 1; + end loop; + Standard_Complex_VecVecs.Deep_Clear(ycffs); + Standard_Complex_VecVecs.Deep_Clear(dxcffs); + Standard_Complex_VecVecs.Deep_Clear(rcffs); + Standard_Complex_VecVecVecs.Clear(Acffs); + Standard_Complex_VecVecVecs.Clear(Bcffs); + end Interactive_Newton_Steps; + + procedure Test_Regular_Newton + ( p : in Laur_Sys; sol : in Standard_Complex_Vectors.Vector; + deg : in integer32; verbose : in boolean := true ) is + + neq : constant integer32 := p'last; + dim : constant integer32 := neq; + nvr : constant integer32 := sol'last; + tdx : constant integer32 := 0; + tv : constant Table_Vector(neq) := Make_Table_Vector(p,dim,nvr,tdx,deg); + jp : constant Jaco_Mat(1..neq,1..dim) := Create(p); + tva : constant Table_Vector_Array(1..neq) + := Make_Table_Vector_Array(jp,tdx,deg); + xlead : Standard_Integer_Vectors.Vector(1..nvr); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + + begin + put_line("The table representation :"); Write(tv); + Add_Parameter(tv); + put_line("After adding a parameter :"); Write(tv); + Double_Lseries_Newton_Steps.Make_Series(sol,deg,xlead,xcffs); + Double_Lseries_Newton_Steps.Set_Leading_Exponents(xlead); + put("A "); put(nvr,1); put_line("-vector of Laurent series :"); + Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + Interactive_Newton_Steps(deg,tv,tva,xlead,xcffs,verbose); + end Test_Regular_Newton; + + procedure Test_Singular_Newton + ( p,sol : in Laur_Sys; tdx,deg : in integer32; + verbose : in boolean := true ) is + + neq : constant integer32 := p'last; + dim : constant integer32 := neq + 1; + nvr : constant integer32 := neq; -- number of variables minus t + tv : constant Table_Vector(neq) := Make_Table_Vector(p,dim,nvr,tdx,deg); + jp : constant Jaco_Mat(1..neq,1..dim) := Create(p); + tva : constant Table_Vector_Array(1..neq) + := Make_Table_Vector_Array(jp,tdx,deg); + xlead : Standard_Integer_Vectors.Vector(1..nvr); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + + begin + put_line("The table representation :"); Write(tv); + Double_Lseries_Newton_Steps.Make_Series(sol,deg,xlead,xcffs); + Double_Lseries_Newton_Steps.Set_Leading_Exponents(xlead); + put("A "); put(nvr,1); put_line("-vector of Laurent series :"); + Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + Interactive_Newton_Steps(deg,tv,tva,xlead,xcffs,verbose); + end Test_Singular_Newton; + + procedure Test_Isolated_Start is + + lp : Link_to_Laur_Sys; + sols : Solution_List; + ls : Link_to_Solution; + neq,nvr,nbsols,dim,deg : integer32 := 0; + + begin + new_line; + put_line("Reading a Laurent polynomial system ..."); + Standard_System_and_Solutions_io.get(lp,sols); + neq := lp'last; + nvr := integer32(Number_of_Unknowns(lp(lp'first))); + new_line; + put("Read "); put(neq,1); put(" polynomials in "); + put(nvr,1); put_line(" variables ..."); + nbsols := integer32(Length_Of(sols)); + put("Read "); put(nbsols,1); put_line(" solutions."); + if nbsols > 0 then + ls := Head_Of(sols); + dim := ls.n; + if dim = nvr then + put_line("Solution dimension matches the number of variables."); + new_line; + put("Give the largest degree of the series parameter t : "); + get(deg); + Test_Regular_Newton(lp.all,ls.v,deg); + else + put("Solution dimension : "); put(dim,1); + put(" != "); put(nvr,1); put_line("."); + end if; + end if; + end Test_Isolated_Start; + + procedure Test_Series_Start is + + lp,lsol : Link_to_Laur_Sys; + neq,nvr,dim,tdx,deg : integer32 := 0; + ans : character; + verbose : boolean; + + begin + new_line; + put_line("Reading a Laurent polynomial system ..."); + get(lp); + neq := lp'last; + nvr := integer32(Number_of_Unknowns(lp(lp'first))); + new_line; + put("Read "); put(neq,1); put(" polynomials in "); + put(nvr,1); put_line(" variables ..."); + tdx := tsymbol_Index; + put("-> index of t : "); put(tdx,1); new_line; + if tdx /= 0 then + new_line; + put_line("Reading initial terms of a series ..."); + Symbol_Table.Clear; + get(lsol); + dim := lsol'last; + new_line; + put("Read "); put(dim,1); put_line(" polynomials ..."); + deg := Degree(lsol(lsol'first)); + put("The degree of the first polynomial : "); put(deg,1); new_line; + new_line; + put("Give the degree : "); get(deg); + new_line; + put("Verbose ? (y/n) "); Ask_Yes_or_No(ans); + verbose := (ans = 'y'); + Test_Singular_Newton(lp.all,lsol.all,tdx,deg,verbose); + end if; + end Test_Series_Start; + + procedure Main is + + ans : character; + + begin + new_line; + put_line("Testing Laurent series expansions ..."); + put_line(" 1. start at a system with isolated solutions; or"); + put_line(" 2. give some leading terms of a power series."); + put("Type 1 or 2 to select a test : "); + Ask_Alternative(ans,"12"); + case ans is + when '1' => Test_Isolated_Start; + when '2' => Test_Series_Start; + when others => null; + end case; + end Main; + +end Test_Double_Lseries_Newton; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_newton.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,64 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Complex_Vectors; +with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; +with Double_Lseries_Polynomials; use Double_Lseries_Polynomials; + +package Test_Double_Lseries_Newton is + +-- DESCRIPTION : +-- Tests the development of Newton's method on Laurent series. + + procedure Add_Parameter ( tv : in Table_Vector ); + + -- DESCRIPTION : + -- To the first constant term in tv, adds t. + -- Writes a warning if there is no constant term. + + -- REQUIRED : + -- The degree in the table vector must be at least one. + + procedure Test_Regular_Newton + ( p : in Laur_Sys; sol : in Standard_Complex_Vectors.Vector; + deg : in integer32; verbose : in boolean := true ); + + -- DESCRIPTION : + -- Runs Newton's method on the system p, + -- starting at the leading constants of a regular solution, + -- on Laurent series where the highest power of t equals deg. + + procedure Test_Singular_Newton + ( p,sol : in Laur_Sys; tdx,deg : in integer32; + verbose : in boolean := true ); + + -- DESCRIPTION : + -- Runs Newton's method on the system p, + -- starting at the series defined in sol, + -- on Laurent series where the highest power of t equals deg. + + -- REQUIRED : tdx /= 0 and + -- p has one more variable than the number of equations. + + -- ON ENTRY : + -- p a system with one parameter t; + -- sol as many univariate polynomials in t as p'length; + -- tdx the index of t in p; + -- deg precision of the series; + -- verbose is the verbose flag. + + procedure Test_Isolated_Start; + + -- DESCRIPTION : + -- Prompts for a system with start solutions and a degree of t. + + procedure Test_Series_Start; + + -- DESCRIPTION : + -- Prompts for a system, a series, and a degree of t. + + procedure Main; + + -- DESCRIPTION : + -- Prompts to select a test. Runs the test. + +end Test_Double_Lseries_Newton; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,279 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Complex_Numbers; use Standard_Complex_Numbers; +with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Integer_VecVecs; +with Standard_Integer_Matrices; +with Standard_Complex_Vectors; +with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; +with Standard_Complex_Matrices; +with Standard_Complex_VecVecVecs; +with Symbol_Table_io; +with Standard_Complex_Laurentials; use Standard_Complex_Laurentials; +with Standard_Complex_Laurentials_io; use Standard_Complex_Laurentials_io; +with Standard_Complex_Laur_Systems_io; use Standard_Complex_Laur_Systems_io; +with Double_Laurent_Series; +with Random_Laurent_Series; use Random_Laurent_Series; +with Double_Linear_Laurent_Solvers; + +package body Test_Double_Lseries_Polynomials is + + procedure Test ( dim,nbr,deg,pwr,low,upp : in integer32 ) is + + plead : Standard_Integer_Vectors.Vector(1..nbr); + pcffs : Standard_Complex_VecVecs.Link_to_VecVec; + pmons : Standard_Integer_VecVecs.VecVec(1..nbr); + xlead : Standard_Integer_Vectors.Vector(1..dim); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + ye : integer32; + yc : Standard_Complex_Vectors.Vector(0..deg); + + begin + Make_Random_Polynomial(dim,nbr,deg,pwr,low,upp,plead,pcffs,pmons); + put_line("A random polynomial with Laurent series coefficients :"); + Write(plead,pcffs,pmons); + Random_Vector(dim,deg,low,upp,xlead,xcffs); + put_line("A random vector of Laurent series :"); + Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + Eval(deg,plead,pcffs,pmons,xlead,xcffs,ye,yc); + put_line("The result of the evaluation :"); + Double_Laurent_Series.Write(ye,yc); + end Test; + + procedure Set_Parameters + ( p : in Link_to_Laur_Sys; + neq,dim,tdx,deg : out integer32 ) is + + ans : character; + + begin + neq := p'last; + dim := integer32(Number_of_Unknowns(p(p'first))); + put("Read "); put(neq,1); put(" polynomials in "); put(dim,1); + put(" variables :"); Symbol_Table_io.Write; new_line; + if neq = dim then + tdx := 0; + else + tdx := tsymbol_Index; + put("-> index of t : "); put(tdx,1); new_line; + end if; + if tdx = 0 then + deg := 0; + new_line; + put("Give the degree of the series : "); get(deg); + else + deg := Minimum_Laurent_Series_Degree(p.all,tdx); + put("=> the proposed degree of the series : "); put(deg,1); new_line; + put("Raise the proposed degree ? (y/n) "); + Ask_Yes_or_No(ans); + if ans = 'y' then + new_line; + put("Give the degree of the series : "); get(deg); + end if; + end if; + end Set_Parameters; + + procedure Test_Input is + + p : Link_to_Laur_Sys; + neq,dim,tdx,deg : integer32 := 0; + + begin + new_line; + put_line("Reading a Laurent polynomial system ..."); get(p); + new_line; + put_line("-> your system :"); put(p.all); + new_line; + Set_Parameters(p,neq,dim,tdx,deg); + new_line; + declare + plead : Standard_Integer_VecVecs.VecVec(p'range); + pcffs : Standard_Complex_VecVecs.Array_of_VecVecs(p'range); + pmons : Standard_Integer_VecVecs.Array_of_VecVecs(p'range); + begin + if tdx = 0 + then Make_Series_System(p.all,dim,dim,0,deg,plead,pcffs,pmons); + else Make_Series_System(p.all,dim,dim-1,tdx,deg,plead,pcffs,pmons); + end if; + for k in p'range loop + put("Polynomial "); put(k,1); + put_line(" with Laurent series coefficients :"); + Write(plead(k).all,pcffs(k),pmons(k).all); + end loop; + end; + end Test_Input; + + procedure Chop ( tdx : in integer32; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : out Standard_Integer_Vectors.Vector; + ycffs : in Standard_Complex_VecVecs.Link_to_VecVec ) is + begin + for k in 1..(tdx-1) loop + ylead(k) := xlead(k); + ycffs(k) := xcffs(k); + end loop; + for k in (tdx+1)..xlead'last loop + ylead(k-1) := xlead(k); + ycffs(k-1) := xcffs(k); + end loop; + end Chop; + + procedure Test_Jacobian_Evaluation + ( dim,nvr,tdx,deg : integer32; jp : in Jaco_Mat; + tva : in Table_Vector_Array ) is + + xlead : Standard_Integer_Vectors.Vector(1..dim); + ylead : Standard_Integer_Vectors.Vector(1..nvr); + xcffs : Standard_Complex_VecVecs.Link_to_VecVec; + ycff : Standard_Complex_VecVecs.VecVec(1..nvr); + ycffs : constant Standard_Complex_VecVecs.Link_to_VecVec + := new Standard_Complex_VecVecs.VecVec'(ycff); + cff : Standard_Complex_Vectors.Link_to_Vector; + x0cff : Standard_Complex_Vectors.Vector(1..dim); + low,upp : constant integer32 := 0; + evamat : Standard_Complex_Matrices.Matrix(jp'range(1),jp'range(2)); + Alead : Standard_Integer_Matrices.Matrix(jp'range(1),1..nvr); + Acffs : Standard_Complex_VecVecVecs.Link_to_VecVecVec; + neq : constant integer32 := jp'last(1); + row : Standard_Complex_VecVecs.Link_to_VecVec; + cffrow : Standard_Complex_Vectors.Link_to_Vector; + + begin + new_line; + -- put("Give the lower bound on the leading exponents : "); get(low); + -- put("Give the upper bound on the leading exponents : "); get(upp); + Random_Vector(dim,deg,low,upp,xlead,xcffs); + put("Leading exponents of a random vector :"); put(xlead,1); new_line; + put("A "); put(dim,1); put_line("-vector of Laurent series :"); + Double_Linear_Laurent_Solvers.Write(xlead,xcffs,"x"); + for k in 1..dim loop + cff := xcffs(k); + x0cff(k) := cff(0); + end loop; + if tdx /= 0 then -- set value for t at one + x0cff(tdx) := Standard_Complex_Numbers.Create(1.0); + for i in 1..dim loop + cff := xcffs(i); -- make the series constant + for k in 1..deg loop + cff(k) := Standard_Complex_Numbers.Create(0.0); + end loop; + end loop; + end if; + put_line("The leading coefficients :"); put_line(x0cff); + evamat := Eval(jp,x0cff); + Standard_Complex_VecVecVecs.Allocate(Acffs,1,neq,1,nvr,0,deg); + if tdx = 0 then + Eval(deg,tva,xlead,xcffs,Alead,Acffs); + else + Chop(tdx,xlead,xcffs,ylead,ycffs); + Eval(deg,tva,ylead,ycffs,Alead,Acffs); + end if; + if tdx = 0 then + for i in evamat'range(1) loop + row := Acffs(i); + for j in evamat'range(2) loop + cffrow := row(j); + put("J("); put(i,1); put(","); put(j,1); put(") : "); + put(evamat(i,j)); new_line; + put("A("); put(i,1); put(","); put(j,1); put(")(0) : "); + put(cffrow(0)); new_line; + end loop; + end loop; + else + for i in evamat'range(1) loop -- recall that t equals one + row := Acffs(i); + for j in 1..(tdx-1) loop + cffrow := row(j); + put("J("); put(i,1); put(","); put(j,1); put(") : "); + put(evamat(i,j)); new_line; + for k in 1..deg loop + cffrow(0) := cffrow(0) + cffrow(k); + end loop; + put("A("); put(i,1); put(","); put(j,1); put(")(0) : "); + put(cffrow(0)); new_line; + end loop; + for j in (tdx+1)..evamat'last(2) loop + cffrow := row(j-1); + put("J("); put(i,1); put(","); put(j,1); put(") : "); + put(evamat(i,j)); new_line; + for k in 1..deg loop + cffrow(0) := cffrow(0) + cffrow(k); + end loop; + put("A("); put(i,1); put(","); put(j,1); put(")(0) : "); + put(cffrow(0)); new_line; + end loop; + end loop; + end if; + end Test_Jacobian_Evaluation; + + procedure Test_Jacobian is + + p : Link_to_Laur_Sys; + neq,dim,tdx,deg,nvr : integer32 := 0; + + begin + new_line; + put_line("Reading a Laurent polynomial system ..."); get(p); + new_line; + put_line("-> your system :"); put(p.all); + new_line; + Set_Parameters(p,neq,dim,tdx,deg); + if tdx = 0 + then nvr := dim; + else nvr := dim-1; + end if; + new_line; + declare + tv : constant Table_Vector(neq) + := Make_Table_Vector(p.all,dim,nvr,tdx,deg); + jp : constant Jaco_Mat(1..neq,1..dim) := Create(p.all); + tva : constant Table_Vector_Array(1..neq) + := Make_Table_Vector_Array(jp,tdx,deg); + begin + put_line("The table representation :"); Write(tv); + put_line("The symbolic Jacobian matrix :"); + for i in 1..neq loop + for j in 1..dim loop + put("J("); put(i,1); put(","); put(j,1); put_line(") :"); + put(jp(i,j)); new_line; + end loop; + end loop; + put_line("The table representation of the Jacobian :"); Write(tva); + Test_Jacobian_Evaluation(dim,nvr,tdx,deg,jp,tva); + end; + end Test_Jacobian; + + procedure Main is + + dim,nbr,deg,pwr,low,upp : integer32 := 0; + ans : character; + + begin + new_line; + put("Test the Jacobian matrix ? (y/n) "); + Ask_Yes_or_No(ans); + if ans = 'y' then + Test_Jacobian; + else + new_line; + put("Generate a random polynomial ? (y/n) "); + Ask_Yes_or_No(ans); + if ans /= 'y' then + Test_Input; + else + new_line; + put("Give the number of variables : "); get(dim); + put("Give the number of monomials : "); get(nbr); + put("Give the degree of the series : "); get(deg); + put("Give the largest power of the variables : "); get(pwr); + put("Give the lower bound on the leading exponents : "); get(low); + put("Give the upper bound on the leading exponents : "); get(upp); + Test(dim,nbr,deg,pwr,low,upp); + end if; + end if; + end Main; + +end Test_Double_Lseries_Polynomials; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.ads phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/test_double_lseries_polynomials.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,85 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Vectors; +with Standard_Complex_VecVecs; +with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; +with Standard_Complex_Laur_JacoMats; use Standard_Complex_Laur_JacoMats; +with Double_Lseries_Polynomials; use Double_Lseries_Polynomials; + +package Test_Double_Lseries_Polynomials is + +-- DESCRIPTION : +-- Tests the evaluation and differentiation of a polynomial +-- at a sequence of Laurent series, in double precision. + + procedure Test ( dim,nbr,deg,pwr,low,upp : in integer32 ); + + -- DESCRIPTION : + -- Generates random data and runs tests. + + -- ON ENTRY : + -- dim the dimension is the number of variables; + -- nbr number of monomials in the polynomial; + -- deg degree of the series; + -- pwr largest power for every variable; + -- low lower bound on leading exponents of the series; + -- upp upper bound on leading exponents of the series. + + procedure Set_Parameters + ( p : in Link_to_Laur_Sys; + neq,dim,tdx,deg : out integer32 ); + + -- DESCRIPTION : + -- Given a Laurent system, sets the characteristic parameters. + + -- ON RETURN : + -- neq number of equations; + -- dim number of variables; + -- tdx index of the symbol t for the series; + -- deg truncation degree of the series. + + procedure Test_Input; + + -- DESCRIPTION : + -- Prompts for a Laurent polynomial system and then constructs the data + -- to evaluate the system at a vector of Laurent series. + + procedure Chop ( tdx : in integer32; + xlead : in Standard_Integer_Vectors.Vector; + xcffs : in Standard_Complex_VecVecs.Link_to_VecVec; + ylead : out Standard_Integer_Vectors.Vector; + ycffs : in Standard_Complex_VecVecs.Link_to_VecVec ); + + -- DESCRIPTION : + -- Copies all data from (xlead, xcffs) to (ylead, ycffs), + -- except the data at the nonzero index tdx. + + -- REQUIRED : + -- The range of ylead and ycffs should be one less than xlead and ycffs. + + procedure Test_Jacobian_Evaluation + ( dim,nvr,tdx,deg : integer32; jp : in Jaco_Mat; + tva : in Table_Vector_Array ); + + -- DESCRIPTION : + -- Tests the evaluation of the Jacobian matrix + -- at a vector of a random series. + + -- ON ENTRY : + -- dim original number of variables, including t; + -- nvr number of variables, not including t; + -- deg degree of the power series; + -- jp symbolic form of the Jacobian matrix; + -- tva table representation of the Jacobian. + + procedure Test_Jacobian; + + -- DESCRIPTION : + -- Prompts for a Laurent polynomial system + -- and evaluates its Jacobian matrix. + + procedure Main; + + -- DESCRIPTION : + -- Prompts for the parameters of the tests and then runs tests. + +end Test_Double_Lseries_Polynomials; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_laurmat.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_laurmat.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_laurmat.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_laurmat.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,11 @@ +with Test_Double_Lseries_Matrices; + +procedure ts_laurmat is + +-- DESCRIPTION : +-- Calls the main test on matrices of Laurent series, +-- in double precision. + +begin + Test_Double_Lseries_Matrices.Main; +end ts_laurmat; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_lsernew.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_lsernew.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_lsernew.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_lsernew.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,10 @@ +with Test_Double_Lseries_Newton; + +procedure ts_lsernew is + +-- DESCRIPTION : +-- Tests the development of Newton's method on Laurent series. + +begin + Test_Double_Lseries_Newton.Main; +end ts_lsernew; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_lserpol.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_lserpol.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_lserpol.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_lserpol.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,11 @@ +with Test_Double_Lseries_Polynomials; + +procedure ts_lserpol is + +-- DESCRIPTION : +-- Calls the main test on the evaluation and differention of polynomials +-- at Laurent series, in double precision. + +begin + Test_Double_Lseries_Polynomials.Main; +end ts_lserpol; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_pslaur.adb phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_pslaur.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/ts_pslaur.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/ts_pslaur.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,10 @@ +with Test_Double_Laurent_Series; + +procedure ts_pslaur is + +-- DESCRIPTION : +-- Calls the main test on Laurent series in double precision. + +begin + Test_Double_Laurent_Series.Main; +end ts_pslaur; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Laurent/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Laurent/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Laurent/UPDATES 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Laurent/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,91 @@ +Thu 24 Jun 2021 : fixed test_double_lseries_polynomials.adb for the move + Write procedure, moved out of the test_double_lseries_matrices. + +Sun 20 Jun 2021 : moved allocate procedure from test_double_lseries_matrices + into double_linear_laurent_solvers. Added interactive Newton procedure + to test_double_lseries_newton. Moved write procedures from test_double_ + lseries_matrices into double_linear_laurent_solvers, updated the test_ + double_lseries_newton.adb, added procedure to double_lseries_newton_steps. + Added output procedures to double_{laurent_series,linear_laurent_solvers}, + updated test_double_lseries_newton.adb, double_lseries_newton_steps, and + main_laurent_series_newton, so phc -u now writes to file. + +Sat 19 Jun 2021 : filled in the stub of main_laurent_series_newton, so + phc -u now has the same ad hoc functionality as ts_lsernew. + +Fri 18 Jun 2021 : new main_laurent_series_newton with a stub procedure. + +Thu 10 Jun 2021 : added the exec_dir attribute to laurent.gpr. + +Tue 8 Jun 2021 : added a basic laurent.gpr to make the test programs. + +Mon 7 Jun 2021 : new package test_double_lseries_newton, with code from + ts_lsernew. + +Sun 6 Jun 2021 : to the evaluators in double_lseries_polynomials, added + the verbose flag to make them silent in double_lseries_newton_steps.adb, + tested by ts_lsernew.adb. + +Sun 11 Apr 2021 : added test on determinant of a random 2-by-2 matrix + to test_double_lseries_matrices. + +Sun 4 Apr 2021 : new double_lseries_newton_steps with code from ts_lsernew. + +Sat 3 Apr 2021 : updated ts_lsernew to prompt for the leading degree. + +Tue 30 Mar 2021 : fixed bug in double_laurent_series.adb, in the normalize + procedure, applied normalization in ts_lsernew, on the series read. + Added verbose flag to an eval procedure in double_laurent_series, + fixed bug in the evaluation of a monomial. Third bug fix in ts_lsernew, + fixed initialization of the leading exponent in the right hand side in + the linear system for the update. + +Sun 28 Mar 2021 : bug fix in evaluation of table vector array, for null + polynomial in a Jacobian matrix, in double_lseries_polynomials.adb. + Added procedure to ts_lsernew to run Newton's method starting at + a power series. + +Sat 27 Mar 2021 : to ts_lsernew, added new test procedure to start Newton + at some initial terms of a power series. + +Fri 26 Mar 2021 : new test_standard_lseries_polynomials with the tests + taken from ts_lserpol. Replace 'standard' by 'double' in the names + of all packages in this folder. This changed all ts_ files as well. + The Newton step in ts_lsernew works in the regular case. + +Thu 25 Mar 2021 : to standard_lseries_polynomials, added Table, Table_Vector, + and Table_Vector_Array data types with wrapper functions. + To standard_lseries_polynomials, added the construction of the table + representations for the Jacobian matrix, tested by ts_lserpol. + Fixed index error in standard_lseries_polynomials.adb. + Tested evaluation of Jacobian in ts_lserpol. + +Wed 24 Mar 2021 : added a proposed degree calculation to ts_lserpol. + Improved in standard_lseries_polynomials the making of a series polynomial + and sharped the formula for the proposed degree in ts_lserpol. + Extended standard_lseries_polynomials with code for Laurent systems, + modified ts_lserpol. + +Tue 23 Mar 2021 : new package test_standard_lseries_matrices, with code + extracted from ts_laurmat. To test_standard_lseries_matrices, added + a specific test to demonstrate the LU factorization on a matrix series + with a singular leading coefficient matrix. New test procedure ts_lserpol + to develop the polynomial evaluation and differentiation at Laurent series. + New package standard_lseries_polynomials with code from ts_lserpol. + +Mon 22 Mar 2021 : added a plain LU factorization to ts_laurmat. + Added a first LU factorization with pivoting to ts_laurmat. + Fixed the test in ts_laurmat on LU factorization with pivoting, + added the LU with pivoting to the standard_linear_laurent_solvers. + +Sun 21 Mar 2021 : fixed initialization of the matrix-vector product + in ts_laurmat. Added Is_Zero function to standard_laurent_series, + extended ts_laurmat with a forward substitution solver. + Modified ts_laurmat to control the seed of the random number generators. + Added exponent_gap function to standard_laurent_series. + To ts_laurmat, added a backward substitution solver. + New package random_laurent_series with code taken from ts_laurmat. + Move code from ts_laurmat into the package standard_linear_laurent_solvers. + +Sat 20 Mar 2021 : moved all code for Laurent series from ../Series. + New ts_laurmat to develop the matrix-vector product of Laurent series. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/math_lib.gpr phcpack-2.4.85/src/Ada/Math_Lib/math_lib.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/math_lib.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/math_lib.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,20 @@ +aggregate project math_lib is + + for Project_Files use + ( + "Numbers/numbers.gpr", -- number representations + "QD/qd.gpr", -- multiple double arithmetic + "Vectors/vectors.gpr", -- vectors and vectors of vectors + "Matrices/matrices.gpr", -- matrix types + "Divisors/divisors.gpr", -- integer linear algebra + "Reduction/reduction.gpr", -- numerical linear algebra + "Polynomials/polynomials.gpr", -- polynomials and systems + "Functions/functions.gpr", -- evaluation + "Supports/supports.gpr", -- support sets + "Circuits/circuits.gpr", -- algorithmic differentiation circuits + "Series/series.gpr", -- power series + "Laurent/laurent.gpr", -- Laurent series + "AD/ad.gpr" -- algorithmic differentiation + ); + +end math_lib; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Matrices/matrices.gpr phcpack-2.4.85/src/Ada/Math_Lib/Matrices/matrices.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Matrices/matrices.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Matrices/matrices.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,41 @@ +project matrices is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Reduction"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Reduction"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_natmat.adb", -- tests natural matrices + "ts_intmat.adb", -- tests integer matrices + "ts_fltmat.adb", -- tests floating-point matrices + "ts_cmpmat.adb", -- tests complex matrices + "ts_ddmat.adb", -- tests double double matrices + "ts_qdmat.adb", -- tests quad double matrices + "ts_tdmat.adb", -- tests triple double matrices + "ts_pdmat.adb", -- tests penta double matrices + "ts_odmat.adb", -- tests octo double matrices + "ts_damat.adb" -- tests deca double matrices + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end matrices; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Matrices/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Matrices/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Matrices/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Matrices/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Matrix types in PHCv2.4.80 +Matrix types in PHCv2.4.85 Below are some milestones in the development of this library. New in the second release is the availability of multiprecision numbers, @@ -24,6 +24,11 @@ In v2.4.80, the test procedures were moved into test packages. Matrices in triple, penta, octo, and deca double precision were added. +Run "gprbuild matrices.gpr" to make all test programs. +On windows, type "gprbuild matrices.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean matrices.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Matrices/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Matrices/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Matrices/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Matrices/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to matrices.gpr. + +Tue 8 Jun 2021 : defined matrices.gpr to build the test procedures. + Wed 21 Oct 2020 : new package quaddobl_complex_matrices_cv. Added new package decadobl_complex_matrices_cv. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.adb phcpack-2.4.85/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -package body Generic_Complex_Numbers_io is - - use Ring_io; use Ring_io.Ring; - - procedure get ( x : in out Complex_Number ) is - begin - get(Standard_Input,x); - end get; - - procedure get ( file : in file_type; x : in out Complex_Number ) is - - xre,xim : number; - - begin - get(file,xre); get(file,xim); - c := Create(xre,xim); - Clear(xre); Clear(xim); - end get; - - procedure put ( x : in Complex_Number ) is - begin - put(Standard_Output,x); - end put; - - procedure put ( file : in file_type; x : in Complex_Number ) is - begin - put(file,REAL_PART(x)); - put(file," "); - put(file,IMAG_PART(x)); - end put; - -end Generic_Complex_Numbers_io; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/generic_complex_numbers_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -with text_io; use text_io; -with Abstract_Ring_io; -with Abstract_Ring.Field; -with Generic_Complex_Numbers; - -generic - - with package Field is new Abstract_Ring.Field(<>); - with package Ring_io is new Abstract_Ring_io(Field.Ring); - with package Complex_Numbers is - new Generic_Complex_Numbers(Ring_io.Ring,Field); - -package Generic_Complex_Numbers_io is - --- DESCRIPTION : --- This package provides io-routines for complex numbers. --- A complex number is displayed as two floating numbers, representing --- respectively the real and imaginary part of the complex number. - - use Complex_Numbers; - - procedure get ( x : in out Complex_Number ); - procedure get ( file : in file_type; x : in out Complex_Number ); - - procedure put ( x : in Complex_Number ); - procedure put ( file : in file_type; x : in Complex_Number ); - -end Generic_Complex_Numbers_io; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_field.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_field.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_field.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_field.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -with Multprec_Floating64_Ring; -with Multprec_Floating64_Ring.Field; -with Multprec_Complex64_Ring; -with Multprec_Complex64_Ring.Field; -with Generic_Complex_Field; - -package Multprec_Complex64_Field is - new Generic_Complex_Field(Multprec_Floating64_Ring, - Multprec_Floating64_Ring.Field, - Multprec_Complex64_Ring, - Multprec_Complex64_Ring.Field); - --- DESCRIPTION : --- Defines the complex field of multi-precision numbers. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.adb phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -39,13 +39,13 @@ Clear(xim); end put; - procedure put ( c : in Complex_Number; fore,aft,exp : in natural ) is + procedure put ( c : in Complex_Number; fore,aft,exp : in natural32 ) is begin put(Standard_Output,c,fore,aft,exp); end put; procedure put ( file : in file_type; - c : in Complex_Number; fore,aft,exp : in natural ) is + c : in Complex_Number; fore,aft,exp : in natural32 ) is cre,cim : Floating_Number; @@ -59,13 +59,13 @@ Clear(cim); end put; - procedure put ( c : in Complex_Number; dp : in natural ) is + procedure put ( c : in Complex_Number; dp : in natural32 ) is begin put(c,dp,dp,dp); end put; procedure put ( file : in file_type; - c : in Complex_Number; dp : in natural ) is + c : in Complex_Number; dp : in natural32 ) is begin put(file,c,dp,dp,dp); end put; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_numbers_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; with Multprec_Complex64_Numbers; use Multprec_Complex64_Numbers; package Multprec_Complex64_Numbers_io is @@ -14,12 +15,12 @@ procedure put ( x : in Complex_Number ); procedure put ( file : in file_type; x : in Complex_Number ); - procedure put ( c : in Complex_Number; fore,aft,exp : in natural ); + procedure put ( c : in Complex_Number; fore,aft,exp : in natural32 ); procedure put ( file : in file_type; - c : in Complex_Number; fore,aft,exp : in natural ); + c : in Complex_Number; fore,aft,exp : in natural32 ); - procedure put ( c : in Complex_Number; dp : in natural ); + procedure put ( c : in Complex_Number; dp : in natural32 ); procedure put ( file : in file_type; - c : in Complex_Number; dp : in natural ); + c : in Complex_Number; dp : in natural32 ); end Multprec_Complex64_Numbers_io; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_ring.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_ring.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_ring.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_ring.ads 2021-06-30 23:22:40.000000000 +0000 @@ -2,7 +2,7 @@ with Abstract_Ring; package Multprec_Complex64_Ring is - new Abstract_Ring(Complex_Number,Create(0),Create(1), + new Abstract_Ring(Complex_Number,Create(integer(0)),Create(integer(1)), Create,Equal,Copy,"+","+","-","-","*", Add,Sub,Min,Mul,Clear); diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_ring-complex.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_ring-complex.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex64_ring-complex.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex64_ring-complex.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -with Multprec_Floating64_Ring; -with Multprec_Floating64_Ring.Field; -with Multprec_Complex64_Ring; -with Multprec_Complex64_Numbers; use Multprec_Complex64_Numbers; -with Abstract_Ring.Complex; - -package Multprec_Complex64_Ring.Complex is - new Multprec_Complex64_Ring.Complex(Multprec_Floating64_Ring, - Multprec_Floating64_Ring.Field, - AbsVal,"/",Div); - --- DESCRIPTION : --- Defines the extension of the ring of multi-precision complex numbers --- to a complex field. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex_field.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex_field.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex_field.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex_field.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -with Multprec_Floating_Ring; -with Multprec_Floating_Ring.Field; -with Multprec_Complex_Ring; -with Multprec_Complex_Ring.Field; -with Generic_Complex_Field; - -package Multprec_Complex_Field is - new Generic_Complex_Field(Multprec_Floating_Ring, - Multprec_Floating_Ring.Field, - Multprec_Complex_Ring, - Multprec_Complex_Ring.Field); - --- DESCRIPTION : --- Defines the complex field of multi-precision numbers. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex_ring-complex.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex_ring-complex.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_complex_ring-complex.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_complex_ring-complex.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -with Multprec_Floating_Ring; -with Multprec_Floating_Ring.Field; -with Multprec_Complex_Ring; -with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; -with Abstract_Ring.Complex; - -package Multprec_Complex_Ring.Complex is - new Multprec_Complex_Ring.Complex(Multprec_Floating_Ring, - Multprec_Floating_Ring.Field, - AbsVal,"/",Div); - --- DESCRIPTION : --- Defines the extension of the ring of multi-precision complex numbers --- to a complex field. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.adb phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.adb 2021-06-30 23:22:40.000000000 +0000 @@ -106,6 +106,11 @@ -- CONSTRUCTORS : + function Create ( i : integer ) return Floating_Number is + begin + return Create(integer64(i)); + end Create; + function Create ( i : integer64 ) return Floating_Number is res : Floating_Number; @@ -189,9 +194,9 @@ fraction,exponent,intinc : Integer_Number; begin - if f = 0.0 - then res := Create(0); - return res; + if f = 0.0 then + res := Create(integer64(0)); + return res; end if; if f > 0.0 then wrkflt := f; @@ -1127,10 +1132,10 @@ end if; Normalize(res); else - res := Create(0); + res := Create(integer64(0)); end if; else - res := Create(0); + res := Create(integer64(0)); end if; return res; end "*"; @@ -1154,7 +1159,7 @@ begin if (Empty(n) or else Equal(n,0)) then - res := Create(1); + res := Create(integer64(1)); else Copy(f,res); cnt := Create(1); @@ -1182,7 +1187,7 @@ Mul(res,f); end loop; else - res := Create(1); + res := Create(integer64(1)); for j in 1..(-i) loop Div(res,f); end loop; @@ -1211,7 +1216,7 @@ begin if (Empty(i) or else Equal(i,0)) then - res := Create(1); + res := Create(integer64(1)); else n := Unsigned(i); if i > 0 then @@ -1222,7 +1227,7 @@ Add(cnt,1); end loop; else - res := Create(1); + res := Create(integer64(1)); cnt := Create(0); while cnt < n loop Div(res,f); @@ -1450,7 +1455,7 @@ raise NUMERIC_ERROR; end if; else - res := Create(0); + res := Create(integer64(0)); end if; return res; end "/"; @@ -1578,9 +1583,9 @@ begin if Empty(f2.fraction) then - Clear(f1); f1 := Create(0); + Clear(f1); f1 := Create(integer64(0)); elsif Equal(f2.fraction,0) then - Clear(f1); f1 := Create(0); + Clear(f1); f1 := Create(integer64(0)); elsif Empty(f1.fraction) then null; elsif Equal(f1.fraction,0) then diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.ads phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/multprec_floating64_numbers.ads 2021-06-30 23:22:40.000000000 +0000 @@ -19,6 +19,7 @@ -- CONSTRUCTORS : + function Create ( i : integer ) return Floating_Number; function Create ( i : integer64 ) return Floating_Number; function Create ( i : Integer_Number ) return Floating_Number; function Create ( f : double_float ) return Floating_Number; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/numbers.gpr phcpack-2.4.85/src/Ada/Math_Lib/Numbers/numbers.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/numbers.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/numbers.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,48 @@ +project Numbers is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_strnum.adb", -- test number strings + "ts_natnum.adb", -- test multiprecision natural numbers + "ts_intnum.adb", -- test multiprecision integer numbers + "ts_fltnum.adb", -- test multiprecision floating numbers + "ts_cmpnum.adb", -- test multiprecision complex numbers + "ts_plrexp.adb", -- test exponentation via polar representation + "ts_random.adb", -- test random number generators + "ts_matfun.adb", -- test mathematical functions + "ts_longflt.adb", -- test on long_long number types + "ts_numbio.adb", -- test input/output of numbers + "ts_mpcst.adb", -- test multiprecision constants + "ts_natdiv.adb", -- test division of natural numbers + "ts_intval.adb" -- test interval arithmetic + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + + package Linker is + + for Switches ("ts_matfun.adb") use ("-lm"); + + end Linker; + +end Numbers; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Numbers/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Basic number definitions, coefficient rings and fields for PHCv2.4.80 +Basic number definitions, coefficient rings and fields for PHCv2.4.85 This directory was established in release 2 of PHCpack and was upgraded for efficiency in later versions. In v2.3, only the i/o of multiprecision @@ -25,6 +25,11 @@ In v2.4.80, code from test procedures was moved into separate test packages. +Run "gprbuild numbers.gpr" to make all test programs. +On windows, type "gprbuild numbers.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean numbers.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/ts_isnan.adb phcpack-2.4.85/src/Ada/Math_Lib/Numbers/ts_isnan.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/ts_isnan.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/ts_isnan.adb 2021-06-30 23:22:40.000000000 +0000 @@ -79,11 +79,11 @@ then put_line("quo = 0"); else put_line("quo /= 0"); end if; - if is_valid(1.0) + if Standard_Floating_Numbers.is_valid(double_float(1.0)) then put_line("1 is valid"); else put_line("1 is not valid"); end if; - if is_valid(quo) + if Standard_Floating_Numbers.is_valid(quo) then put_line("quo is valid"); else put_line("quo is not valid"); end if; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Numbers/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Numbers/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Numbers/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Numbers/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,13 @@ +Tue 15 Jun 2021 : extended multprec_floating64_numbers with a create function, + to instantiate the abstract_ring, so multprec_floating64_ring compiles. + Updates are needed to multprec_floating64_numbers.adb for the new create. + Fixed multprec_complex64_ring.ads. + Fixed multprec_complex64_numbers_io and ts_isnan.adb. + +Thu 10 Jun 2021 : added exec_dir attributed to numbers.gpr. + +Tue 8 Jun 2021 : defined numbers.gpr to build the test procedures. + Sat 29 Aug 2020 : moved code from ts_strnum, ts_natnum, ts_intnum, ts_fltnum, and ts_cmpnum into the package test_number_strings, and the new packages test_{natural,integer,floating,complex}_numbers. Moved code from ts_random diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/generic_polynomial_systems_io.ads phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/generic_polynomial_systems_io.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/generic_polynomial_systems_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/generic_polynomial_systems_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -with text_io; use text_io; -with Abstract_Ring_io; -with Generic_Vectors; -with Generic_Matrices; - -generic - - with package Ring_io is new Abstract_Ring_io(<>); use Ring_io.Ring; - with package Vectors is new Generic_Vectors(Ring_io.Ring); - with package Matrices is new Generic_Matrices(Ring_io.Ring,Vectors); - -package Generic_Polynomial_Systems_io is - --- DESCRIPTION : --- This package contains routines for the input and output --- of human-readable polynomial systems. --- Note that for every write-procedure, there is a read- --- procedure that can read the written system. --- See also the package for the input and output --- of polynomials in n unknowns. - --- THE INPUT OPERATIONS : - - procedure get ( n : in natural; s : out Poly_Sys ); - procedure get ( n,m : in natural; s : out Poly_Sys ); - procedure get ( file : in file_type; n : in natural; s : out Poly_Sys ); - procedure get ( file : in file_type; n,m : in natural; s : out Poly_Sys ); - procedure get ( s : out Poly_Sys ); - procedure get ( file : in file_type; s : out Poly_Sys ); - - -- DESCRIPTION : - -- A polynomial system is read; n polynomials are read. - - -- REQUIRED : - -- * all unknows must begin with a letter and may have - -- no symbols like '+', '-', '*', '^', '/', ';' or brackets in them; - -- i = sqrt(-1) is reserved for complex numbers representation - -- * each symbol is limited to 3 characters - -- * the input is terminated by the delimiter - -- * no blanks may occur in the numbers - -- * if a file is specified, then it must be opened for input - -- * n and m should both be on the first line ! - -- * if n stands alone, it should be followed immediately by an - -- end-of-line symbol. - - -- NOTE : - -- The end_of_line symbol is not read. - - -- ON ENTRY : - -- file file_type where the input is, - -- if not specified, then standard input is assumed; - -- n the number of equations, - -- if not specified, then n will first be read; - -- m the number of unknowns; - -- if not specified, then m will first be read. - - -- ON RETURN : - -- s a polynomial system. - --- MORE USER FRIENDLY INPUT OPERATIONS : - - procedure get ( lp : in out Link_to_Poly_Sys ); - procedure get ( file : in file_type; lp : in out Link_to_Poly_Sys ); - - -- DESCRIPTION : - -- The first routine asks for a file name, while the second one - -- assumes everything is on file and nothing has to be read from - -- standard input. - - -- NOTE : - -- The end_of_line symbol is read at the end of the polynomial system. - --- THE OUTPUT OPERATIONS : - - procedure put ( n : out natural; s : in Poly_Sys; pow : in power := '*' ); - procedure put ( n,m : out natural; s : in Poly_Sys; pow : in power := '*' ); - procedure put ( file : in file_type; - n : out natural; s : in Poly_Sys; pow : in power := '*' ); - procedure put ( file : in file_type; - n,m : out natural; s : in Poly_Sys; pow : in power := '*' ); - procedure put ( s : in Poly_Sys; pow : in power ); - procedure put ( file : in file_type; s : in Poly_Sys; pow : in power ); - procedure put ( s : in Poly_Sys ); - procedure put ( file : in file_type; s : in Poly_Sys ); - - -- DESCRIPTION : - -- A polynomial system is written on standard output or on file. - - -- ON ENTRY : - -- file file where the output must come; - -- if not specified, then standard output is assumed - -- s a polynomial system; - -- pow kind of power symbol used. - - -- ON RETURN : - -- n the number of equations of p, - -- if not specified, n will first be written; - -- m the number of unknowns. - -- if not specified, m will first be written. - - procedure put_line ( s : in Poly_Sys ); - procedure put_line ( file : in file_type; s : in Poly_Sys ); - procedure put_line ( s : in Poly_Sys; pow : in Power ); - procedure put_line ( file : in file_type; s : in Poly_Sys; pow : in Power ); - - -- DESCRIPTION : - -- Writes the polynomials, every term on a separate line. - - procedure Display_Format; - - -- DESCRIPTION : - -- Displays on screen the formatting rules as on-line help facility. - -end Generic_Polynomial_Systems_io; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.adb phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -542,6 +542,27 @@ put(file,p,s); end put; + procedure put_terms ( p : in Poly; dp : in natural32 ) is + begin + put_terms(Standard_Output,p,dp); + end put_terms; + + procedure put ( p : in Poly; dp : in natural32 ) is + begin + put(Standard_Output,p,dp); + end put; + + procedure put_terms ( file : in file_type; + p : in Poly; dp : in natural32 ) is + begin + put_terms(file,p,dp); + end put_terms; + + procedure put ( file : in file_type; p : in Poly; dp : in natural32 ) is + begin + put(file,p); + end put; + procedure put_line ( p : in Poly ) is begin put_line(Standard_Output,p); diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.ads phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_complex_polynomials_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -91,6 +91,15 @@ -- n the number of unknows of p, -- if specified, n will first be written. + procedure put_terms ( p : in Poly; dp : in natural32 ); + procedure put_terms ( file : in file_type; p : in Poly; dp : in natural32 ); + procedure put ( p : in Poly; dp : in natural32 ); + procedure put ( file : in file_type; p : in Poly; dp : in natural32 ); + + -- DESCRIPTION : + -- Writes the coefficients of the polynomials with dp decimal places. + -- The "put_terms" procedure does not write the delimiter at the end. + procedure put_line ( p : in Poly ); procedure put_line ( file : in file_type; p : in Poly ); procedure put_line ( p : in Poly; pow : in Power ); diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_laur_poly_convertors.adb phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_laur_poly_convertors.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/multprec_laur_poly_convertors.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/multprec_laur_poly_convertors.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Multprec_Complex_Numbers; use Multprec_Complex_Numbers; with Standard_Natural_Vectors; @@ -57,7 +59,7 @@ Copy(t.cf,pt.cf); pt.dg := new Standard_Natural_Vectors.Vector(t.dg'range); for i in pt.dg'range loop - pt.dg(i) := natural(t.dg(i)); + pt.dg(i) := natural32(t.dg(i)); end loop; Multprec_Complex_Polynomials.Add(res,pt); c := true; @@ -100,7 +102,7 @@ t : out Multprec_Complex_Laurentials.Term; p : out Multprec_Complex_Polynomials.Poly ) is - min : Multprec_Complex_Laurentials.Degrees + min : constant Multprec_Complex_Laurentials.Degrees := Multprec_Complex_Laurentials.Minimal_Degrees(l); tt : Multprec_Complex_Laurentials.Term; @@ -111,7 +113,7 @@ else min(i) := 0; end if; end loop; - tt.cf := Create(1); + tt.cf := Create(integer32(1)); tt.dg := min; p := Laurent_Polynomial_to_Polynomial(l,tt); t := tt; end Laurent_Polynomial_to_Polynomial; @@ -132,7 +134,7 @@ Copy(tt.cf,rt.cf); rt.dg := new Standard_Natural_Vectors.Vector(tt.dg'range); for i in tt.dg'range loop - rt.dg(i) := tt.dg(i) + t.dg(i); + rt.dg(i) := natural32(tt.dg(i)) + natural32(t.dg(i)); end loop; Multprec_Complex_Polynomials.Add(res,rt); Multprec_Complex_Polynomials.Clear(rt); diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/polynomials.gpr phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/polynomials.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/polynomials.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/polynomials.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,51 @@ +project polynomials is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Functions"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Functions"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_tdpol.adb", -- tests tripdobl polynomials + "ts_pdpol.adb", -- tests pentdobl polynomials + "ts_odpol.adb", -- tests octodobl polynomials + "ts_dapol.adb", -- tests decadobl polynomials + "ts_hessian.adb", -- tests Hessian matrices + "ts_poly.adb", -- tests polynomials and polynomial systems + "ts_rpol.adb", -- tests polynomials with real coefficients + "ts_laurpoly.adb", -- tests Laurent polynomials and systems + "ts_laurlist.adb", -- tests lists of Laurent polynomials + "ts_randpoly.adb", -- tests random polynomial generation + "ts_tabform.adb", -- tests tableau format + "ts_jaco.adb", -- tests Jacobian matrices + "ts_parse.adb", -- tests poly-string conversions + "ts_subs.adb", -- tests substitution of variables + "ts_ddpol.adb", -- tests double double polynomials + "ts_qdpol.adb", -- tests quad double polynomials + "ts_termlist.adb", -- tests lists of terms + "ts_rwspol.adb" -- tests the writing of long polynomials + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end polynomials; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Multivariate polynomials and polynomial systems over rings in PHCv2.4.83 +Multivariate polynomials and polynomial systems over rings in PHCv2.4.85 New in release 2 is the availability of multiprecision numbers. The data structures are entirely redefined using Ada 95 concepts. @@ -16,6 +16,11 @@ 2) instantiations 3) utilities +Run "gprbuild polynomials.gpr" to make all test programs. +On windows, type "gprbuild polynomials.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean polynomials.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/standard_complex_poly_strings.adb 2021-06-30 23:22:40.000000000 +0000 @@ -813,10 +813,10 @@ put(integer32(p),1); put_line(" of " & s & " in Parse_Term."); put_line("The character is " & s(p)); - put_line("Surrouding characters are " & s(s'first..p+1)); - put_line("Surrouding characters are " & s(p-3..p+1)); - put_line("Surrouding characters are " & s(p-5..p+1)); - put_line("Surrouding characters are " & s(p-7..p+1)); + put_line("Surrounding characters are " & s(s'first..p+1)); + put_line("Surrounding characters are " & s(p-3..p+1)); + put_line("Surrounding characters are " & s(p-5..p+1)); + put_line("Surrounding characters are " & s(p-7..p+1)); raise; when others => put("Exception raised at character "); put(integer32(p),1); diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Polynomials/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Polynomials/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,11 @@ +Tue 15 Jun 2021 : extended multprec_complex_polynomials_io for the + instantiation of the multprec_complex_poly_ring_io. + Fixed multprec_laur_poly_convertors.adb. + +Thu 10 Jun 2021 : added the exec_dir attribute to polynomials.gpr. + +Tue 8 Jun 2021 : defined polynomials.gpr to build the test procedures. + Sat 5 Dec 2020 : moved mainsymb into the new package symbol_table_order. Wed 2 Dec 2020 : moved the code for maingood into the Main procedure of diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/QD/dd_funtest.c phcpack-2.4.85/src/Ada/Math_Lib/QD/dd_funtest.c --- phcpack-2.4.84/src/Ada/Math_Lib/QD/dd_funtest.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/QD/dd_funtest.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,117 @@ +/* Test on the sin and cos functions in double double precision. */ + +#include +#include +#include +#include "double_double.h" + +int test_sincostaylor ( void ); +/* + * DESCRIPTION : + * Tests sin and cos on pi/32 using Taylor expansions. */ + +int test_sincos ( void ); +/* + * DESCRIPTION : + * Tests sin and cos on random doubles. */ + +int main ( void ) +{ + int fail = test_sincostaylor(); + + fail = test_sincos(); + + return 0; +} + +int test_sincostaylor ( void ) +{ + double dd_pi16[2]; + double dd_pi32[2]; + double sinpi32a[2],sinpi32b[2]; + double cospi32a[2],cospi32b[2]; + double x[2]; + double y[2]; + const double pi16_hi = 1.963495408493620697e-01; // high part of pi/16 + const double pi16_lo = 7.654042494670957545e-18; // low part of pi/16 + + dd_pi16[0] = pi16_hi; + dd_pi16[1] = pi16_lo; + + dd_mul_pwr2(dd_pi16,0.5,dd_pi32); + + dd_sin_taylor(dd_pi32,sinpi32a); + dd_cos_taylor(dd_pi32,cospi32a); + dd_sincos_taylor(dd_pi32,sinpi32b,cospi32b); + + printf("test on sincostaylor ...\n"); + + printf("sin(pi/32) : "); dd_write(sinpi32a,32); printf("\n"); + printf("sin(pi/32) : "); dd_write(sinpi32b,32); printf("\n"); + printf("cos(pi/32) : "); dd_write(cospi32a,32); printf("\n"); + printf("cos(pi/32) : "); dd_write(cospi32b,32); printf("\n"); + + printf("cospi32b hi : %.16e\n", cospi32b[0]); + printf("cospi32b lo : %.16e\n", cospi32b[1]); + + dd_sqr(sinpi32a,x); + dd_sqr(cospi32a,y); + dd_inc(x,y); + printf("sin(pi/32)^2 + cos(pi/32)^2 : "); dd_write(x,32); + printf("\n"); + + return 0; +} + +int test_sincos ( void ) +{ + const double pi16_hi = 1.963495408493620697e-01; // high part of pi/16 + const double pi16_lo = 7.654042494670957545e-18; // low part of pi/16 + double rnd; + + srand(time(NULL)); + rnd = (double) rand(); + rnd = rnd/RAND_MAX; + rnd = 6.0*rnd - 3.0; + + double ddrnd[2]; + ddrnd[0] = rnd; ddrnd[1] = 0.0; + + printf("test on sin and cos of a random number r ...\n"); + + printf("r : "); dd_write(ddrnd,32); printf("\n"); + + double sinrnd[2],cosrnd[2],x[2],y[2]; + + printf("computing sin(r) ...\n"); + dd_sin(ddrnd,sinrnd); + printf("sin(r) : "); dd_write(sinrnd,32); printf("\n"); + printf("computing cos(r) ...\n"); + dd_cos(ddrnd,cosrnd); + printf("cos(r) : "); dd_write(cosrnd,32); printf("\n"); + + dd_sqr(sinrnd,x); + dd_sqr(cosrnd,y); + dd_inc(x,y); + printf("sin(r)^2 + cos(r)^2 : "); dd_write(x,32); printf("\n"); + + ddrnd[0] = pi16_hi; ddrnd[1] = pi16_lo; + + printf("test on sin and cos of r = pi/32 ...\n"); + + printf("r : "); dd_write(ddrnd,32); printf("\n"); + + printf("computing sin(r) ...\n"); + dd_sin(ddrnd,sinrnd); + printf("sin(r) : "); dd_write(sinrnd,32); printf("\n"); + printf("computing cos(r) ...\n"); + dd_cos(ddrnd,cosrnd); + printf("cos(r) : "); dd_write(cosrnd,32); printf("\n"); + + dd_sqr(sinrnd,x); + dd_sqr(cosrnd,y); + dd_inc(x,y); + printf("sin(r)^2 + cos(r)^2 : "); dd_write(x,32); printf("\n"); + + return 0; +} diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/QD/dd_funtest.cpp phcpack-2.4.85/src/Ada/Math_Lib/QD/dd_funtest.cpp --- phcpack-2.4.84/src/Ada/Math_Lib/QD/dd_funtest.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/QD/dd_funtest.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -/* Test on the sin and cos functions in double double precision. */ - -#include -#include -#include -#include -#include "double_double.h" - -using namespace std; - -int test_sincostaylor ( void ); -/* - * DESCRIPTION : - * Tests sin and cos on pi/32 using Taylor expansions. */ - -int test_sincos ( void ); -/* - * DESCRIPTION : - * Tests sin and cos on random doubles. */ - -int main ( void ) -{ - int fail = test_sincostaylor(); - - fail = test_sincos(); - - return 0; -} - -int test_sincostaylor ( void ) -{ - double dd_pi16[2]; - double dd_pi32[2]; - double sinpi32a[2],sinpi32b[2]; - double cospi32a[2],cospi32b[2]; - double x[2]; - double y[2]; - const double pi16_hi = 1.963495408493620697e-01; // high part of pi/16 - const double pi16_lo = 7.654042494670957545e-18; // low part of pi/16 - - dd_pi16[0] = pi16_hi; - dd_pi16[1] = pi16_lo; - - dd_mul_pwr2(dd_pi16,0.5,dd_pi32); - - dd_sin_taylor(dd_pi32,sinpi32a); - dd_cos_taylor(dd_pi32,cospi32a); - dd_sincos_taylor(dd_pi32,sinpi32b,cospi32b); - - cout << "test on sincostaylor ..." << endl; - - cout << "sin(pi/32) : "; dd_write(sinpi32a,32); cout << endl; - cout << "sin(pi/32) : "; dd_write(sinpi32b,32); cout << endl; - cout << "cos(pi/32) : "; dd_write(cospi32a,32); cout << endl; - cout << "cos(pi/32) : "; dd_write(cospi32b,32); cout << endl; - - cout << scientific << setprecision(16); - cout << "cospi32b hi : " << cospi32b[0] << endl; - cout << "cospi32b lo : " << cospi32b[1] << endl; - - dd_sqr(sinpi32a,x); - dd_sqr(cospi32a,y); - dd_inc(x,y); - cout << "sin(pi/32)^2 + cos(pi/32)^2 : "; dd_write(x,32); cout << endl; - - return 0; -} - -int test_sincos ( void ) -{ - const double pi16_hi = 1.963495408493620697e-01; // high part of pi/16 - const double pi16_lo = 7.654042494670957545e-18; // low part of pi/16 - double rnd; - - srand(time(NULL)); - rnd = (double) rand(); - rnd = rnd/RAND_MAX; - rnd = 6.0*rnd - 3.0; - - double ddrnd[2]; - ddrnd[0] = rnd; ddrnd[1] = 0.0; - - cout << "test on sin and cos of a random number r ..." << endl; - - cout << "r : "; dd_write(ddrnd,32); cout << endl; - - double sinrnd[2],cosrnd[2],x[2],y[2]; - - cout << "computing sin(r) ..." << endl; dd_sin(ddrnd,sinrnd); - cout << "sin(r) : "; dd_write(sinrnd,32); cout << endl; - cout << "computing cos(r) ..." << endl; dd_cos(ddrnd,cosrnd); - cout << "cos(r) : "; dd_write(cosrnd,32); cout << endl; - - dd_sqr(sinrnd,x); - dd_sqr(cosrnd,y); - dd_inc(x,y); - cout << "sin(r)^2 + cos(r)^2 : "; dd_write(x,32); cout << endl; - - ddrnd[0] = pi16_hi; ddrnd[1] = pi16_lo; - - cout << "test on sin and cos of r = pi/32 ..." << endl; - - cout << "r : "; dd_write(ddrnd,32); cout << endl; - - cout << "computing sin(r) ..." << endl; dd_sin(ddrnd,sinrnd); - cout << "sin(r) : "; dd_write(sinrnd,32); cout << endl; - cout << "computing cos(r) ..." << endl; dd_cos(ddrnd,cosrnd); - cout << "cos(r) : "; dd_write(cosrnd,32); cout << endl; - - dd_sqr(sinrnd,x); - dd_sqr(cosrnd,y); - dd_inc(x,y); - cout << "sin(r)^2 + cos(r)^2 : "; dd_write(x,32); cout << endl; - - return 0; -} diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/QD/double_double.cpp phcpack-2.4.85/src/Ada/Math_Lib/QD/double_double.cpp --- phcpack-2.4.84/src/Ada/Math_Lib/QD/double_double.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/QD/double_double.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1457 +0,0 @@ -/* file: double_double.c */ - -/* This file contains the corresponding C code for the functions - with prototypes declared in the double_double.h file. */ - -/* basic functions */ - -#include -#include -#include -#include "double_double.h" - -/* Part I: basic functions from inline.h */ - -double dd_quick_two_sum ( double a, double b, double *err ) -{ - double s = a + b; - *err = b - (s - a); - return s; -} - -double dd_quick_two_diff ( double a, double b, double *err ) -{ - double s = a - b; - *err = (a - s) - b; - return s; -} - -double dd_two_sum ( double a, double b, double *err ) -{ - double s = a + b; - double bb = s - a; - *err = (a - (s - bb)) + (b - bb); - return s; -} - -double dd_two_diff ( double a, double b, double *err ) -{ - double s = a - b; - double bb = s - a; - *err = (a - (s - bb)) - (b + bb); - return s; -} - -void dd_split ( double a, double *hi, double *lo ) -{ - const double QD_SPLITTER = 134217729.0; /* 2^27 + 1 */ - const double QD_SPLIT_THRESH = 6.69692879491417e+299; /* 2^996 */ - - double temp; - - if (a > QD_SPLIT_THRESH || a < -QD_SPLIT_THRESH) - { - a *= 3.7252902984619140625e-09; /* 2^-28 */ - temp = QD_SPLITTER * a; - *hi = temp - (temp - a); - *lo = a - *hi; - *hi *= 268435456.0; /* 2^28 */ - *lo *= 268435456.0; /* 2^28 */ - } - else - { - temp = QD_SPLITTER * a; - *hi = temp - (temp - a); - *lo = a - *hi; - } -} - -double dd_two_prod ( double a, double b, double *err ) -{ - double a_hi,a_lo,b_hi,b_lo; - double p = a*b; - - dd_split(a,&a_hi,&a_lo); - dd_split(b,&b_hi,&b_lo); - *err = ((a_hi*b_hi - p) + a_hi*b_lo + a_lo*b_hi) + a_lo*b_lo; - - return p; -} - -double dd_two_sqr ( double a, double *err ) -{ - double hi,lo; - double q = a*a; - - dd_split(a,&hi,&lo); - *err = ((hi*hi - q) + 2.0*hi*lo) + lo*lo; - - return q; -} - -double dd_nint_d ( double d ) -{ - if (d == floor(d)) return d; - return floor(d + 0.5); -} - -double dd_aint ( double d ) -{ - return (d >= 0.0) ? floor(d) : ceil(d); -} - -/* Part II: arithmetical operations from dd_inline.h */ - -/*************************** additions ***************************/ - -void dd_add ( const double *a, const double *b, double *c ) -{ -/* satisfies IEEE style error bound, due to K. Briggs and W. Kahan */ - - double s1, s2, t1, t2; - - s1 = dd_two_sum(a[0],b[0],&s2); - t1 = dd_two_sum(a[1],b[1],&t2); - s2 += t1; - s1 = dd_quick_two_sum(s1,s2,&s2); - s2 += t2; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_add_d_dd ( double a, const double *b, double *c ) -{ - double s1, s2; - - s1 = dd_two_sum(b[0],a,&s2); - s2 += b[1]; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_add_dd_d ( const double *a, double b, double *c ) -{ - double s1, s2; - - s1 = dd_two_sum(a[0],b,&s2); - s2 += a[1]; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_add_d_d ( double a, double b, double *c ) -{ - c[0] = dd_two_sum(a,b,&c[1]); -} - -void dd_inc ( double *a, const double *b ) -{ -/* we assume that QD_IEEE_ADD is defined, see dd_add comment */ - - double s1, s2, t1, t2; - - s1 = dd_two_sum(a[0],b[0],&s2); - t1 = dd_two_sum(a[1],b[1],&t2); - s2 += t1; - s1 = dd_quick_two_sum(s1,s2,&s2); - s2 += t2; - a[0] = dd_quick_two_sum(s1,s2,&a[1]); -} - -void dd_inc_d ( double *a, double b ) -{ - double s1, s2; - - s1 = dd_two_sum(a[0],b,&s2); - s2 += a[1]; - a[0] = dd_quick_two_sum(s1,s2,&a[1]); -} - -/************************* subtractions **************************/ - -void dd_sub ( const double *a, const double *b, double *c ) -{ -/* we assume that QD_IEEE_ADD is defined, see dd_add comment */ - - double s1, s2, t1, t2; - - s1 = dd_two_diff(a[0],b[0],&s2); - t1 = dd_two_diff(a[1],b[1],&t2); - s2 += t1; - s1 = dd_quick_two_sum(s1,s2,&s2); - s2 += t2; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_sub_d_dd ( double a, const double *b, double *c ) -{ - double s1, s2; - - s1 = dd_two_diff(a,b[0],&s2); - s2 -= b[1]; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_sub_dd_d ( const double *a, double b, double *c ) -{ - double s1, s2; - - s1 = dd_two_diff(a[0],b,&s2); - s2 += a[1]; - c[0] = dd_quick_two_sum(s1,s2,&c[1]); -} - -void dd_sub_d_d ( double a, double b, double *c ) -{ - c[0] = dd_two_diff(a,b,&c[1]); -} - -void dd_dec ( double *a, const double *b ) -{ -/* we assume QD_IEEE_ADD is defined, see dd_add comment */ - - double s1, s2, t1, t2; - - s1 = dd_two_diff(a[0],b[0],&s2); - t1 = dd_two_diff(a[1],b[1],&t2); - s2 += t1; - s1 = dd_quick_two_sum(s1,s2,&s2); - s2 += t2; - a[0] = dd_quick_two_sum(s1,s2,&a[1]); -} - -void dd_dec_d ( double *a, double b ) -{ - double s1, s2; - - s1 = dd_two_diff(a[0],b,&s2); - s2 += a[1]; - a[0] = dd_quick_two_sum(s1,s2,&a[1]); -} - -/******************************* unary minus **************************/ - -void dd_minus ( double *a ) -{ - a[0] = -a[0]; - a[1] = -a[1]; -} - -/*************************** multiplications ***************************/ - -void dd_mul ( const double *a, const double *b, double *c ) -{ - double p1, p2; - - p1 = dd_two_prod(a[0],b[0],&p2); - p2 += (a[0] * b[1] + a[1] * b[0]); - c[0] = dd_quick_two_sum(p1,p2,&c[1]); -} - -void dd_mul_d_dd ( double a, const double *b, double *c ) -{ - double p1, p2; - - p1 = dd_two_prod(a,b[0],&p2); - p2 += (b[1] * a); - c[0] = dd_quick_two_sum(p1,p2,&c[1]); -} - -void dd_mul_dd_d ( const double *a, double b, double *c ) -{ - double p1, p2; - - p1 = dd_two_prod(a[0],b,&p2); - p2 += (a[1] * b); - c[0] = dd_quick_two_sum(p1,p2,&c[1]); -} - -void dd_mul_d_d ( double a, double b, double *c ) -{ - c[0] = dd_two_prod(a,b,&c[1]); -} - -void dd_mlt ( double *a, const double *b ) -{ - double p1, p2; - - p1 = dd_two_prod(a[0],b[0],&p2); - p2 += b[1] * a[0]; - p2 += b[0] * a[1]; - a[0] = dd_quick_two_sum(p1,p2,&a[1]); -} - -void dd_mlt_d ( double *a, double b ) -{ - double p1, p2; - - p1 = dd_two_prod(a[0],b,&p2); - p2 += a[1] * b; - a[0] = dd_quick_two_sum(p1,p2,&a[1]); -} - -void dd_mul_pwr2 ( const double *a, double b, double *c ) -{ - c[0] = a[0]*b; - c[1] = a[1]*b; -} - -/*************************** divisions ***************************/ - -void dd_div ( const double *a, const double *b, double *c ) -{ - /* this is the accurate_div in dd_inline.h */ - - double q1, q2, q3; - double acc[2]; - - q1 = a[0] / b[0]; /* approximate quotient */ - dd_mul_d_dd(q1,b,acc); /* acc = q1*b */ - dd_sub(a,acc,c); /* c = a - q1 * b; */ - q2 = c[0] / b[0]; - dd_mul_d_dd(q2,b,acc); /* acc = q2*b */ - dd_dec(c,acc); /* c -= (q2 * b); */ - q3 = c[0] / b[0]; - c[0] = dd_quick_two_sum(q1,q2,&c[1]); - dd_inc_d(c,q3); /* c = dd_real(q1, q2) + q3; */ -} - -void dd_div_d_dd ( double a, const double *b, double *c ) -{ - double aa[2]; - - aa[0] = a; - aa[1] = 0.0; - dd_div(aa,b,c); -} - -void dd_div_dd_d ( const double *a, double b, double *c ) -{ - double q1, q2, p1, p2, s, e; - - q1 = a[0] / b; /* approximate quotient. */ - p1 = dd_two_prod(q1,b,&p2); /* compute a - q1 * d */ - s = dd_two_diff(a[0],p1,&e); - e += a[1]; - e -= p2; - q2 = (s + e) / b; /* get next approximation. */ - c[0] = dd_quick_two_sum(q1,q2,&c[1]); /* renormalize */ -} - -void dd_div_d_d ( double a, double b, double *c ) -{ - double q1, q2, p1, p2, s, e; - - q1 = a / b; - p1 = dd_two_prod(q1,b,&p2); /* compute a - q1 * b */ - s = dd_two_diff(a,p1,&e); - e -= p2; - q2 = (s + e) / b; /* get next approximation */ - - c[0] = dd_quick_two_sum(q1,q2,&c[1]); -} - -/************************* comparisons *******************************/ - -int dd_is_zero ( const double *a ) -{ - return (a[0] == 0.0) ? 1 : 0; -} - -int dd_is_one ( const double *a ) -{ - return ((a[0] == 1.0) && (a[1] == 0.0)) ? 1 : 0; -} - -int dd_is_positive ( const double *a ) -{ - return (a[0] > 0.0) ? 1 : 0; -} - -int dd_is_negative ( const double *a ) -{ - return (a[0] < 0.0) ? 1 : 0; -} - -int dd_eq_dd_d ( const double *a, double b ) -{ - return ((a[0] == b) && (a[1] == 0.0)) ? 1 : 0; -} - -int dd_eq ( const double *a, const double *b ) -{ - return ((a[0] == b[0]) && (a[1] == b[1])) ? 1 : 0; -} - -int dd_eq_d_dd ( double a, const double *b ) -{ - return ((a == b[0]) && (b[1] == 0.0)) ? 1 : 0; -} - -int dd_neq_dd_d ( const double *a, double b ) -{ - return ((a[0] != b) || (a[1] != 0.0)) ? 1 : 0; -} - -int dd_neq ( const double *a, const double *b ) -{ - return ((a[0] != b[0]) || (a[1] != b[1])) ? 1 : 0; -} - -int dd_neq_d_dd ( double a, const double *b ) -{ - return ((a != b[0]) || (b[1] != 0.0)) ? 1 : 0; -} - -int dd_gt_dd_d ( const double *a, double b ) -{ - return (a[0] > b || (a[0] == b && a[1] > 0.0)) ? 1 : 0; -} - -int dd_gt ( const double *a, double *b ) -{ - return (a[0] > b[0] || (a[0] == b[0] && a[1] > b[1])) ? 1 : 0; -} - -int dd_gt_d_dd ( double a, const double *b ) -{ - return (a > b[0] || (a == b[0] && b[1] < 0.0)) ? 1 : 0; -} - -int dd_geq_dd_d ( const double *a, double b ) -{ - return (a[0] > b || (a[0] == b && a[1] >= 0.0)) ? 1 : 0; -} - -int dd_geq ( const double *a, const double *b ) -{ - return (a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1])) ? 1 : 0; -} - -int dd_geq_d_dd ( double a, const double *b ) -{ - return (a > b[0] || (a == b[0] && b[1] <= 0.0)) ? 1 : 0; -} - -int dd_lt_dd_d ( const double *a, double b ) -{ - return (a[0] < b || (a[0] == b && a[1] < 0.0)) ? 1 : 0; -} - -int dd_lt ( const double *a, const double *b ) -{ - return (a[0] < b[0] || (a[0] == b[0] && a[1] < b[1])) ? 1 : 0; -} - -int dd_lt_d_dd ( double a, const double *b ) -{ - return (a < b[0] || (a == b[0] && b[1] > 0.0)) ? 1 : 0; -} - -int dd_leq_dd_d ( const double *a, double b ) -{ - return (a[0] < b || (a[0] == b && a[1] <= 0.0)) ? 1 : 0; -} - -int dd_leq ( const double *a, const double *b ) -{ - return (a[0] < b[0] || (a[0] == b[0] && a[1] <= b[1])) ? 1 : 0; -} - -int dd_leq_d_dd ( double a, const double *b ) -{ - return (a < b[0] || (a == b[0] && b[1] >= 0.0)) ? 1 : 0; -} - -/******************** squaring and power ***************************/ - -void dd_sqr ( const double *a, double *b ) -{ - double p1, p2; - - p1 = dd_two_sqr(a[0],&p2); - p2 += 2.0 * a[0] * a[1]; - p2 += a[1] * a[1]; - b[0] = dd_quick_two_sum(p1,p2,&b[1]); -} - -void dd_sqr_d ( double a, double *b ) -{ - b[0] = dd_two_sqr(a,&b[1]); -} - -void dd_npwr ( const double *a, int n, double *b ) -{ - if(n == 0) /* the original crashes at 0^0 = 1 */ - { - b[0] = 1.0; b[1] = 0.0; - } - else - { - int N = (n > 0) ? n : -n; /* N = abs(n) */ - double s[2]; - - b[0] = a[0]; s[0] = 1.0; - b[1] = a[1]; s[1] = 0.0; - - if(N > 1) /* use binary exponentiation */ - { - while(N > 0) - { - if(N % 2 == 1) dd_mlt(s,b); - N /= 2; - if(N > 0) dd_sqr(b,b); - } - } - else - { - s[0] = b[0]; s[1] = b[1]; - } - if(n < 0) - dd_div_d_dd(1.0,s,b); /* compute reciprocal */ - else - { - b[0] = s[0]; b[1] = s[1]; - } - } -} - -void dd_ldexp ( double *a, int n ) -{ - a[0] = ldexp(a[0],n); - a[1] = ldexp(a[1],n); -} - -/*********************** exp and log ******************************/ - -void dd_exp ( const double *a, double *b ) -{ - /* Strategy: We first reduce the size of x by noting that - - exp(kr + m * log(2)) = 2^m * exp(r)^k - - where m and k are integers. By choosing m appropriately - we can make |kr| <= log(2) / 2 = 0.347. Then exp(r) is - evaluated using the familiar Taylor series. Reducing the - argument substantially speeds up the convergence. */ - - const double k = 512.0; - const double inv_k = 1.0 / k; - const double exp1hi = 2.718281828459045091e+00; /* exp(1) high word */ - const double exp1lo = 1.445646891729250158e-16; /* exp(1) low word */ - const double log2hi = 6.931471805599452862e-01; /* log(2) high word */ - const double log2lo = 2.319046813846299558e-17; /* log(2) low word */ - const double dd_eps = 4.93038065763132e-32; /* 2^-104 */ - double m,tol; - double r[2]; - double s[2]; - double t[2]; - double p[2]; - int i; - double *inv_fac; - double i_fac[30]; /* inverse factorials for Taylor expansion */ - i_fac[0] = 1.66666666666666657e-01; i_fac[1] = 9.25185853854297066e-18; - i_fac[2] = 4.16666666666666644e-02; i_fac[3] = 2.31296463463574266e-18; - i_fac[4] = 8.33333333333333322e-03; i_fac[5] = 1.15648231731787138e-19; - i_fac[6] = 1.38888888888888894e-03; i_fac[7] = -5.30054395437357706e-20; - i_fac[8] = 1.98412698412698413e-04; i_fac[9] = 1.72095582934207053e-22; - i_fac[10] = 2.48015873015873016e-05; i_fac[11] = 2.15119478667758816e-23; - i_fac[12] = 2.75573192239858925e-06; i_fac[13] = -1.85839327404647208e-22; - i_fac[14] = 2.75573192239858883e-07; i_fac[15] = 2.37677146222502973e-23; - i_fac[16] = 2.50521083854417202e-08; i_fac[17] = -1.44881407093591197e-24; - i_fac[18] = 2.08767569878681002e-09; i_fac[19] = -1.20734505911325997e-25; - i_fac[20] = 1.60590438368216133e-10; i_fac[21] = 1.25852945887520981e-26; - i_fac[22] = 1.14707455977297245e-11; i_fac[23] = 2.06555127528307454e-28; - i_fac[24] = 7.64716373181981641e-13; i_fac[25] = 7.03872877733453001e-30; - i_fac[26] = 4.77947733238738525e-14; i_fac[27] = 4.39920548583408126e-31; - i_fac[28] = 2.81145725434552060e-15; i_fac[29] = 1.65088427308614326e-31; - - if(a[0] <= -709.0) - { - b[0] = 0.0; b[1] = 0.0; return; - } - if(a[0] >= 709.0) - { - b[0] = -1.0; b[1] = 0.0; return; - } - if(dd_is_zero(a) == 1) - { - b[0] = 1.0; b[1] = 0.0; return; - } - if(dd_is_one(a) == 1) - { - b[0] = exp1hi; b[1] = exp1lo; return; - } - m = floor(a[0] / log2hi + 0.5); - /* r = mul_pwr2(a - dd_real::_log2 * m, inv_k); */ - r[0] = log2hi; r[1] = log2lo; - dd_mlt_d(r,m); - dd_sub(a,r,r); - dd_mul_pwr2(r,inv_k,r); - dd_sqr(r,p); - dd_mul_pwr2(p,0.5,s); /* s = r + mul_pwr2(p, 0.5); */ - dd_inc(s,r); - dd_mlt(p,r); /* p *= r; */ - inv_fac = &i_fac[0]; - dd_mul(p,inv_fac,t); /* t = p * inv_fact[0]; */ - i = 0; - tol = inv_k*dd_eps; - do - { - dd_inc(s,t); - dd_mlt(p,r); - inv_fac = &i_fac[2*(++i)]; - dd_mul(p,inv_fac,t); - } while(fabs(t[0]) > tol && i < 5); - - dd_inc(s,t); /* s += t; */ - for(i=0; i<9; i++) /* 9 times s = mul_pwr2(s,2.0) + sqr(s); */ - { - dd_mul_pwr2(s,2.0,p); - dd_sqr(s,t); - dd_add(p,t,s); - } - dd_add_dd_d(s,1.0,b); /* s += 1.0; but then b stores the result */ - i = (int) m; - dd_ldexp(b,i); -} - -void dd_log ( const double *a, double *b ) -{ - /* Strategy. The Taylor series for log converges much more - slowly than that of exp, due to the lack of the factorial - term in the denominator. Hence this routine instead tries - to determine the root of the function - - f(x) = exp(x) - a - - using Newton iteration. The iteration is given by - - x' = x - f(x)/f'(x) - = x - (1 - a * exp(-x)) - = x + a * exp(-x) - 1. - - Only one iteration is needed, since Newton's iteration - approximately doubles the number of digits per iteration. */ - - double acc[2]; - - if(dd_is_one(a) == 1) - { - b[0] = 0.0; b[1] = 0.0; return; - } - if(a[0] <= 0.0) - { - printf("(dd_log): argument is not positive"); - b[0] = -1.0; b[0] = 0.0; return; - } - b[0] = log(a[0]); b[1] = 0.0; /* initial approximation */ - acc[0] = -b[0]; acc[1] = -b[1]; /* x = x + a * exp(-x) - 1.0 */ - dd_exp(acc,acc); - dd_mlt(acc,a); - dd_inc(b,acc); - dd_dec_d(b,1.0); -} - -void dd_log10 ( const double *a, double *b ) -{ - const double log10hi = 2.302585092994045901e+00; /* log(10) hi word */ - const double log10lo = -2.170756223382249351e-16; /* log(10) lo word */ - double logten[2]; - - logten[0] = log10hi; - logten[1] = log10lo; - dd_log(a,b); - dd_div(b,logten,b); /* b = log(a)/log(10) */ -} -/****************** copy, type casts, abs, and floor *****************/ - -void dd_copy ( const double *a, double *b ) -{ - b[0] = a[0]; - b[1] = a[1]; -} - -int dd_to_int ( const double *a ) -{ - return ((int) a[0]); -} - -double dd_to_double ( const double *a ) -{ - return a[0]; -} - -void dd_abs ( const double *a, double *b ) -{ - if(a[0] < 0.0) - { - b[0] = -a[0]; - b[1] = -a[1]; - } - else - { - b[0] = a[0]; - b[1] = a[1]; - } -} - -void dd_floor ( const double *a, double *b ) -{ - double hi = floor(a[0]); - double lo = 0.0; - - if(hi == a[0]) /* high word is already integer, round low word */ - { - lo = floor(a[1]); - b[0] = dd_quick_two_sum(hi,lo,&b[1]); - } - else - { - b[0] = hi; - b[1] = lo; - } -} - -void dd_nint ( const double *a, double *b ) -{ - double f[2]; - - dd_floor(a,f); - - if(dd_eq(a,f) == 1) - { - dd_copy(a,b); - } - else - { - double c[2]; - - dd_add_dd_d(a,0.5,c); - dd_floor(c,b); - } -} - -/************************ sqrt, sin and cos ******************************/ - -void dd_sqrt ( const double* a, double *b ) -{ - /* Use Karp's trick: if x is an approximation to sqrt(a), then - sqrt(a) = a*x + [a - (a*x)^2] * x / 2 (approx) - The approximation is accurate to twice the accuracy of x. - Also, the multiplication (a*x) and [-]*x can be done with - only half the precision. */ - - if(dd_is_zero(a) == 1) - { - b[0] = 0.0; b[1] = 0.0; - } - else if(a[0] < 0.0) - { - b[0] = -1.0; b[0] = 0.0; - } - else - { - const double x = 1.0/sqrt(a[0]); - double ax = a[0]*x; - - double ddax[2]; - double sqax[2]; - double y[2]; - - dd_sqr_d(ax,sqax); - dd_sub(a,sqax,y); - - b[0] = dd_two_sum(ax,y[0]*(x*0.5),&b[1]); - } -} - -void dd_sin_taylor ( const double *a, double *b ) -{ - if(dd_is_zero(a) == 1) - { - b[0] = 0.0; b[1] = 0.0; - } - else - { - const int n_inv_fact = 15; - double i_fac[30]; /* inverse factorials for Taylor expansion */ - i_fac[0] = 1.66666666666666657e-01; i_fac[1] = 9.25185853854297066e-18; - i_fac[2] = 4.16666666666666644e-02; i_fac[3] = 2.31296463463574266e-18; - i_fac[4] = 8.33333333333333322e-03; i_fac[5] = 1.15648231731787138e-19; - i_fac[6] = 1.38888888888888894e-03; i_fac[7] = -5.30054395437357706e-20; - i_fac[8] = 1.98412698412698413e-04; i_fac[9] = 1.72095582934207053e-22; - i_fac[10] = 2.48015873015873016e-05; i_fac[11] = 2.15119478667758816e-23; - i_fac[12] = 2.75573192239858925e-06; i_fac[13] = -1.85839327404647208e-22; - i_fac[14] = 2.75573192239858883e-07; i_fac[15] = 2.37677146222502973e-23; - i_fac[16] = 2.50521083854417202e-08; i_fac[17] = -1.44881407093591197e-24; - i_fac[18] = 2.08767569878681002e-09; i_fac[19] = -1.20734505911325997e-25; - i_fac[20] = 1.60590438368216133e-10; i_fac[21] = 1.25852945887520981e-26; - i_fac[22] = 1.14707455977297245e-11; i_fac[23] = 2.06555127528307454e-28; - i_fac[24] = 7.64716373181981641e-13; i_fac[25] = 7.03872877733453001e-30; - i_fac[26] = 4.77947733238738525e-14; i_fac[27] = 4.39920548583408126e-31; - i_fac[28] = 2.81145725434552060e-15; i_fac[29] = 1.65088427308614326e-31; - const double dd_eps = 4.93038065763132e-32; /* 2^-104 */ - const double thresh = 0.5*a[0]*dd_eps; - double x[2], r[2], s[2], t[2], inv_fac[2]; - int i = 0; - dd_sqr(a,x); /* x = -sqr(a) */ - dd_minus(x); - dd_copy(a,s); - dd_copy(a,r); - do - { - dd_mlt(r,x); /* r *= x */ - inv_fac[0] = i_fac[i]; /* even ones are high parts */ - inv_fac[1] = i_fac[i+1]; /* odd ones are low parts */ - dd_mul(r,inv_fac,t); /* t = r * inv_fact[i] */ - dd_inc(s,t); /* s += t */ - i += 4; /* only take even terms */ - } - while((i < 2*n_inv_fact) && (fabs(t[0]) > thresh)); - dd_copy(s,b); - } -} - -void dd_cos_taylor ( const double *a, double *b ) -{ - if(dd_is_zero(a) == 1) - { - b[0] = 1.0; b[1] = 0.0; - } - else - { - const int n_inv_fact = 15; - double i_fac[30]; /* inverse factorials for Taylor expansion */ - i_fac[0] = 1.66666666666666657e-01; i_fac[1] = 9.25185853854297066e-18; - i_fac[2] = 4.16666666666666644e-02; i_fac[3] = 2.31296463463574266e-18; - i_fac[4] = 8.33333333333333322e-03; i_fac[5] = 1.15648231731787138e-19; - i_fac[6] = 1.38888888888888894e-03; i_fac[7] = -5.30054395437357706e-20; - i_fac[8] = 1.98412698412698413e-04; i_fac[9] = 1.72095582934207053e-22; - i_fac[10] = 2.48015873015873016e-05; i_fac[11] = 2.15119478667758816e-23; - i_fac[12] = 2.75573192239858925e-06; i_fac[13] = -1.85839327404647208e-22; - i_fac[14] = 2.75573192239858883e-07; i_fac[15] = 2.37677146222502973e-23; - i_fac[16] = 2.50521083854417202e-08; i_fac[17] = -1.44881407093591197e-24; - i_fac[18] = 2.08767569878681002e-09; i_fac[19] = -1.20734505911325997e-25; - i_fac[20] = 1.60590438368216133e-10; i_fac[21] = 1.25852945887520981e-26; - i_fac[22] = 1.14707455977297245e-11; i_fac[23] = 2.06555127528307454e-28; - i_fac[24] = 7.64716373181981641e-13; i_fac[25] = 7.03872877733453001e-30; - i_fac[26] = 4.77947733238738525e-14; i_fac[27] = 4.39920548583408126e-31; - i_fac[28] = 2.81145725434552060e-15; i_fac[29] = 1.65088427308614326e-31; - const double dd_eps = 4.93038065763132e-32; /* 2^-104 */ - const double thresh = 0.5*dd_eps; - double x[2], r[2], s[2], t[2], inv_fac[2]; - int i = 1; - dd_sqr(a,x); /* x = -sqr(a) */ - dd_minus(x); - dd_copy(x,r); - dd_mul_pwr2(r, 0.5, s); /* s = 1.0 + mul_pwr2(r, 0.5) */ - dd_inc_d(s, 1.0); - do - { - dd_mlt(r,x); /* r *= x */ - inv_fac[0] = i_fac[i+1]; /* even ones are high parts */ - inv_fac[1] = i_fac[i+2]; /* odd ones are low parts */ - dd_mul(r, inv_fac, t); /* t = r * inv_fact[i] */ - dd_inc(s,t); /* s += t */ - i += 4; /* only take the odd terms */ - } - while((i < 2*n_inv_fact) && (fabs(t[0]) > thresh)); - dd_copy(s,b); - } -} - -void dd_sincos_taylor ( const double *a, double *sin_a, double *cos_a ) -{ - if(dd_is_zero(a) == 1) - { - sin_a[0] = 0.0; sin_a[1] = 0.0; - cos_a[0] = 1.0; cos_a[1] = 0.0; - } - else - { - double tmp[2]; - - dd_sin_taylor(a, sin_a); - dd_sqr(sin_a, tmp); /* tmp = sqr(sin_a) */ - dd_minus(tmp); /* tmp = -sqr(sin_a) */ - dd_inc_d(tmp, 1.0); /* tmp = 1.0 - sqr(sin_a) */ - dd_sqrt(tmp, cos_a); /* cos_a = sqrt(1.0 - sqr(sin_a) */ - } -} - -void dd_reduce_modulo_2pi - ( const double *x, double *t, int *j, int *k, int *abs_k, int* fail ) -{ - double q,y[2],z[2],r[2],twopi[2],pi2[2],pi16[2]; - - const double twopi_hi = 6.283185307179586232e+00; // high part of 2*pi - const double twopi_lo = 2.449293598294706414e-16; // low part of 2*pi - const double pi2_hi = 1.570796326794896558e+00; // high part of pi/2 - const double pi2_lo = 6.123233995736766036e-17; // low part of pi/2 - const double pi16_hi = 1.963495408493620697e-01; // high part of pi/16 - const double pi16_lo = 7.654042494670957545e-18; // low part of pi/16 - - *j = 0; *k = 0; *abs_k = 0; *fail = 0; - - twopi[0] = twopi_hi; twopi[1] = twopi_lo; - pi2[0] = pi2_hi; pi2[1] = pi2_lo; - pi16[0] = pi16_hi; pi16[1] = pi16_lo; - - dd_div(x,twopi,y); - - dd_nint(y,z); - dd_mul(twopi,z,y); - dd_sub(x,y,r); - - q = floor(r[0]/pi2_hi+0.5); - dd_mul_dd_d(pi2,q,y); - dd_sub(r,y,t); - *j = (int) q; - - if((*j < -2 ) || (*j > 2)) - { - printf("dd_sin: cannot reduce module pi/2"); - *fail = 1; - } - else - { - q = floor(t[0]/pi16_hi + 0.5); - dd_mul_dd_d(pi16,q,y); - dd_dec(t,y); - *k = (int) q; - if(*k < 0) - *abs_k = -(*k); - else - *abs_k = *k; - if(*abs_k > 4) - { - printf("dd_sin: cannot reduce module pi/16"); - *fail = 1; - } - else - *fail = 0; - } -} - -void sincostables - ( double *sintabhi, double *sintablo, double *costabhi, double *costablo ) -/* - * Defines tables of sin(k*pi/16) and cos(k*pi/16), - * in high parts ending with hi and low parts ending with lo. - * All arrays have space for four doubles. */ -{ - const double sin_t0_hi = 1.950903220161282758e-01; - const double sin_t0_lo = -7.991079068461731263e-18; - const double sin_t1_hi = 3.826834323650897818e-01; - const double sin_t1_lo = -1.005077269646158761e-17; - const double sin_t2_hi = 5.555702330196021776e-01; - const double sin_t2_lo = 4.709410940561676821e-17; - const double sin_t3_hi = 7.071067811865475727e-01; - const double sin_t3_lo = -4.833646656726456726e-17; - const double cos_t0_hi = 9.807852804032304306e-01; - const double cos_t0_lo = 1.854693999782500573e-17; - const double cos_t1_hi = 9.238795325112867385e-01; - const double cos_t1_lo = 1.764504708433667706e-17; - const double cos_t2_hi = 8.314696123025452357e-01; - const double cos_t2_lo = 1.407385698472802389e-18; - const double cos_t3_hi = 7.071067811865475727e-01; - const double cos_t3_lo = -4.833646656726456726e-17; - - sintabhi[0] = sin_t0_hi; sintablo[0] = sin_t0_lo; - sintabhi[1] = sin_t1_hi; sintablo[1] = sin_t1_lo; - sintabhi[2] = sin_t2_hi; sintablo[2] = sin_t2_lo; - sintabhi[3] = sin_t3_hi; sintablo[3] = sin_t3_lo; - costabhi[0] = cos_t0_hi; costablo[0] = cos_t0_lo; - costabhi[1] = cos_t1_hi; costablo[1] = cos_t1_lo; - costabhi[2] = cos_t2_hi; costablo[2] = cos_t2_lo; - costabhi[3] = cos_t3_hi; costablo[3] = cos_t3_lo; -} - -void dd_sin ( const double *a, double *sin_a ) -{ - if(dd_is_zero(a) == 1) - { - sin_a[0] = 0.0; sin_a[1] = 0.0; - } - else - { - double t[2]; - int j,k,abs_k,fail; - - dd_reduce_modulo_2pi(a,t,&j,&k,&abs_k,&fail); - if(fail == 1) - { - sin_a[0] = -2.0; sin_a[1] = 0.0; - } - else if(k == 0) - { - if(j == 0) - { - dd_sin_taylor(t,sin_a); - } - else if(j == 1) - { - dd_cos_taylor(t,sin_a); - } - else if(j == -1) - { - dd_cos_taylor(t,sin_a); - dd_minus(sin_a); - } - else - { - dd_sin_taylor(t,sin_a); - dd_minus(sin_a); - } - } - else - { - double u[2],v[2],w[2],t_sin[2],t_cos[2]; - double sintabhi[4],sintablo[4]; - double costabhi[4],costablo[4]; - - sincostables(sintabhi,sintablo,costabhi,costablo); - - u[0] = costabhi[abs_k-1]; u[1] = costablo[abs_k-1]; - v[0] = sintabhi[abs_k-1]; v[1] = sintablo[abs_k-1]; - dd_sincos_taylor(t,t_sin,t_cos); - if(j == 0) - { - dd_mul(u,t_sin,sin_a); - dd_mul(v,t_cos,w); - if(k > 0) - dd_inc(sin_a,w); - else - dd_dec(sin_a,w); - } - else if(j == 1) - { - dd_mul(u,t_cos,sin_a); - dd_mul(v,t_sin,w); - if(k > 0) - dd_dec(sin_a,w); - else - dd_inc(sin_a,w); - } - else if(j == -1) - { - dd_mul(v,t_sin,sin_a); - dd_mul(u,t_cos,w); - if(k > 0) - { - dd_dec(sin_a,w); - } - else - { - dd_minus(sin_a); - dd_dec(sin_a,w); - } - } - else - { - dd_mul(v,t_cos,sin_a); - dd_mul(u,t_sin,w); - if(k > 0) - { - dd_minus(sin_a); - dd_dec(sin_a,w); - } - else - { - dd_dec(sin_a,w); - } - } - } - } -} - -void dd_cos ( const double *a, double *cos_a ) -{ - if(dd_is_zero(a) == 1) - { - cos_a[0] = 1.0; cos_a[1] = 0.0; - } - else - { - double t[2]; - int j,k,abs_k,fail; - - dd_reduce_modulo_2pi(a,t,&j,&k,&abs_k,&fail); - if(fail == 1) - { - cos_a[0] = -2.0; cos_a[1] = 0.0; - } - else if(k == 0) - { - if(j == 0) - { - dd_cos_taylor(t,cos_a); - } - else if(j == 1) - { - dd_sin_taylor(t,cos_a); - dd_minus(cos_a); - } - else if(j == -1) - { - dd_sin_taylor(t,cos_a); - } - else - { - dd_cos_taylor(t,cos_a); - dd_minus(cos_a); - } - } - else - { - double u[2],v[2],w[2],t_sin[2],t_cos[2]; - double sintabhi[4],sintablo[4]; - double costabhi[4],costablo[4]; - - sincostables(sintabhi,sintablo,costabhi,costablo); - - u[0] = costabhi[abs_k-1]; u[1] = costablo[abs_k-1]; - v[0] = sintabhi[abs_k-1]; v[1] = sintablo[abs_k-1]; - dd_sincos_taylor(t,t_sin,t_cos); - if(j == 0) - { - dd_mul(u,t_cos,cos_a); - dd_mul(v,t_sin,w); - if(k > 0) - dd_dec(cos_a,w); - else - dd_inc(cos_a,w); - } - else if(j == 1) - { - dd_mul(v,t_cos,cos_a); - dd_mul(u,t_sin,w); - if(k > 0) - { - dd_minus(cos_a); - dd_dec(cos_a,w); - } - else - { - dd_dec(cos_a,w); - } - } - else if(j == -1) - { - dd_mul(u,t_sin,cos_a); - dd_mul(v,t_cos,w); - if(k > 0) - dd_inc(cos_a,w); - else - dd_dec(cos_a,w); - } - else - { - dd_mul(v,t_sin,cos_a); - dd_mul(u,t_cos,w); - if(k > 0) - { - dd_dec(cos_a,w); - } - else - { - dd_minus(cos_a); - dd_dec(cos_a,w); - } - } - } - } -} - -/********************* input/output operations *************************/ - -int dd_read ( const char *s, double *a ) -{ - const char *p = s; - char ch; - int sign = 0; - int point = -1; - int nd = 0; - int e = 0; - int done = 0; - int nread; - - while (*p == ' ') p++; /* skip leading spaces */ - - a[0] = 0.0; a[1] = 0.0; - while ((done == 0) && (ch = *p) != '\0') - { - if (ch >= '0' && ch <= '9') - { - int d = ch - '0'; - double cd = (double) d; - - dd_mlt_d(a,10.0); /* a *= 10.0 */ - dd_inc_d(a,cd); /* a += (double) d */ - nd++; - } - else - { - switch (ch) - { - case '.': - if (point >= 0) return -1; - point = nd; break; - case '-': - case '+': - if (sign != 0 || nd > 0) return -1; - sign = (ch == '-') ? -1 : 1; break; - case 'E': - case 'e': - nread = sscanf(p+1, "%d", &e); - done = 1; - if (nread != 1) return -1; break; - default: - return -1; - } - } - p++; - } - if (point >= 0) e -= (nd - point); - - if(e != 0) /* r *= (dd_real(10.0) ^ e); */ - { - double acc[2]; - - acc[0] = 10.0; - acc[1] = 0.0; - dd_npwr(acc,e,acc); - dd_mlt(a,acc); - } - if(sign == -1) dd_minus(a); /* a = (sign == -1) ? -r : r; */ - - return 0; -} - -void dd_to_digits ( const double *a, char *s, int *expn, int precision ) -{ - int D = precision + 1; /* number of digits to compute */ - double acc[2]; /* for the r in the original code */ - double tmp[2]; /* to hold temporary results */ - int i,d,e; /* e is exponent */ - - dd_abs(a,acc); - - if(a[0] == 0.0) /* a equals zero */ - { - expn = 0; - for(i = 0; i < precision; i++) s[i] = '0'; return; - } - e = (int) (floor(log10(fabs(a[0])))); /* approximate exponent */ - if (e < -300) - { - tmp[0] = 10.0; tmp[1] = 0.0; - dd_npwr(tmp,300,tmp); - dd_mlt(acc,tmp); /* r *= dd_real(10.0) ^ 300; */ - tmp[0] = 10.0; tmp[1] = 0.0; - dd_npwr(tmp,e+300,tmp); - dd_div(acc,tmp,acc); /* r /= dd_real(10.0) ^ (e + 300); */ - } - else if(e > 300) - { - dd_ldexp(acc,-53); /* r = ldexp(r, -53); */ - tmp[0] = 10.0; tmp[1] = 0.0; - dd_npwr(tmp,e,tmp); - dd_div(acc,tmp,acc); /* r /= dd_real(10.0) ^ e; */ - dd_ldexp(acc,53); /* r = ldexp(r, 53); */ - } - else - { - tmp[0] = 10.0; tmp[1] = 0.0; - dd_npwr(tmp,e,tmp); - dd_div(acc,tmp,acc); /* r /= dd_real(10.0) ^ e; */ - } - if(dd_gt_dd_d(acc,10.0) == 1) /* fix exponent if we are off by one */ - { - dd_div_dd_d(acc,10.0,acc); /* r /= 10.0; */ - e++; - } - else if(dd_lt_dd_d(acc,1.0) == 1) /* r < 1.0) */ - { - dd_mlt_d(acc,10.0); /* r *= 10.0; */ - e--; - } - if((dd_geq_dd_d(acc,10.0) == 1) || (dd_lt_dd_d(acc,1.0) == 1)) - { /* (r >= 10.0 || r < 1.0) */ - printf("dd_to_digits: cannot compute exponent"); return; - } - for(i=0; i0; i--) /* fix out of range digits */ - { - if(s[i] < '0') - { - s[i-1]--; - s[i] += 10; - } - else if(s[i] > '9') - { - s[i-1]++; - s[i] -= 10; - } - } - if(s[0] <= '0') - { - printf("dd_to_digits: nonpositive leading digit"); return; - } - if(s[D-1] >= '5') /* round, handle carry */ - { - s[D-2]++; - i = D-2; - while (i > 0 && s[i] > '9') - { - s[i] -= 10; - s[--i]++; - } - } - if(s[0] > '9') /* if first digit is 10, shift everything */ - { - e++; - for(i=precision; i>=2; i--) s[i] = s[i-1]; - s[0] = '1'; - s[1] = '0'; - } - s[precision] = 0; - *expn = e; -} - -void dd_to_string ( const double *a, char *s, int precision, int width, - int fixed, int showpos, int uppercase, char fill, - int *endstring ) -{ -/* note: nan and inf are ignored ...*/ - - int sgn = 1; - int i, e = 0; - char *p = s; - int cnt = 0; /* counts characters written to string */ - int off,d; - double acc[2]; - - if(dd_is_negative(a) == 1) - { - *(p++) = '-'; cnt++; - } - else if(showpos == 1) - { - *(p++) = '+'; cnt++; - } - else - sgn = 0; - - if(dd_is_zero(a) == 1) - { - *(p++) = '0'; cnt++; - if(precision > 0) - { - *(p++) = '.'; cnt++; - for(i=0; i 0) - { - *(p++) = '.'; cnt++; - for(i=0; i 0) - { - for (i=0; i 0) - { - *(p++) = '.'; cnt++; - for(j=0; j 0) - { - *(p++) = '.'; cnt++; - } - for(i=1; i<=precision; i++,cnt++) *(p++) = t[i]; - } - free(t); - } - } - if(fixed == 0) /* fill in the exponent part */ - { - *(p++) = (uppercase == 1) ? 'E' : 'e'; cnt++; - *(p++) = (e < 0 ? '-' : '+'); cnt++; - if(e<0) e = -e; - if (e >= 100) - { - i = e/100; - *(p++) = '0' + i; cnt++; - e -= 100*i; - } - i = e/10; - *(p++) = '0' + i; cnt++; - e -= 10*i; - *(p++) = '0' + e; cnt++; - } - if(cnt >= width) - { - *(p++) = '\0'; - *endstring = cnt + 1; - } - else /* fill in the blanks */ - { - d = width - cnt; - for(i=0; i + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers"); + end case; + + for Languages use ("Ada", "C"); + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "dd_test.c", -- tests C double doubles + "dd_funtest.c", -- tests C double double functions + "td_test.c", -- tests C triple doubles + "qd_test.c", -- tests C quad doubles + "pd_test.c", -- tests C penta doubles + "od_test.c", -- tests C octo doubles + "da_test.c", -- tests C deca doubles + "ts_dbldbl.adb", -- tests double doubles + "ts_qddbl.adb", -- tests quad doubles + "ts_ddcmplx.adb", -- tests complex double doubles + "ts_qdcmplx.adb", -- tests complex quad doubles + "ts_mpddcv.adb", -- tests multiprecision double double conversions + "ts_mpqdcv.adb", -- tests multiprecision quad double conversions + "ts_ddfun.adb", -- tests double double functions + "ts_qdfun.adb", -- tests quad double function + "ts_cmpexp.adb", -- tests complex exponentation + "ts_tridbl.adb", -- tests triple doubles + "ts_tdcmplx.adb", -- tests complex triple doubles + "ts_pentadbl.adb", -- tests_penta doubles + "ts_pdcmplx.adb", -- tests complex penta doubles + "ts_octdbl.adb", -- tests octo doubles + "ts_odcmplx.adb", -- tests complex octo doubles + "ts_decadbl.adb", -- tests deca doubles + "ts_dacmplx.adb", -- tests complex deca doubles + "ts_tdfun.adb", -- tests triple double functions + "ts_pdfun.adb", -- tests penta double functions + "ts_odfun.adb", -- tests octo double functions + "ts_dafun.adb", -- tests deca double functions + "ts_mpcasts.adb" -- tests multiprecision multiple double casts + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + + package Linker is + + for Switches ("dd_test.c") use ("-lm"); + for Switches ("dd_funtest.c") use ("-lm"); + for Switches ("td_test.c") use ("-lm"); + for Switches ("qd_test.c") use ("-lm"); + for Switches ("pd_test.c") use ("-lm"); + for Switches ("od_test.c") use ("-lm"); + for Switches ("da_test.c") use ("-lm"); + + end Linker; + +end QD; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/QD/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/QD/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/QD/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/QD/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Quad double arithmetic for PHCv2.4.81 +Quad double arithmetic for PHCv2.4.85 This directory was added to version 2.3.55 of PHCpack, departing from a standalone C version of a part of the QD software library. @@ -39,14 +39,17 @@ by Mioara Joldes, Olivier Marty, Jean-Michel Muller, Valentina Popescu and Warwick Tucker; released under GPL. +Run "gprbuild qd.gpr" to make all test programs. +On windows, type "gprbuild qd.gpr -Xos=windows" at the PowerShell prompt. +The "gprclean qd.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ double_double.h : prototypes of the double double operations double_double.c : defines the operations in double_double.h -double_double.cpp : operations defined as c++ code dd_test.c : test on basic operations in double_double -dd_funtest.cpp : test on sin and cos functions +dd_funtest.c : test on sin and cos functions triple_double.h : prototypes of the triple double operations triple_double.c : defines the operations in triple_double.h td_test.c : tests the operations in triple_double diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/QD/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/QD/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/QD/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/QD/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,10 @@ +Sat 26 Jun 2021 : removed double_double.cpp and downgraded dd_funtest.cpp + to dd_funtest.c. Added the building of the C tests to qd.gpr. + +Thu 10 Jun 2021 : added the exec_dir attribute to qd.gqr. + +Tue 8 Jun 2021 : defined qd.gpr to build the test procedures. + Wed 21 Oct 2020 : extended deca_double_numbers with type casts to double double, triple double, quad double, penta double, and octo double, with similar extensions to decadobl_complex_numbers_cv. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,8 +1,13 @@ -Mathematical library in PHCpack version 2.4.80 +Mathematical library in PHCpack version 2.4.85 The mathematical library contains general tools that are not specific for polynomial homotopy continuation. +Run "gprbuild math_lib.gpr" to make all test programs. +On windows, type "gprbuild math_lib.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean math_lib.gpr" removes all files created by gprbuild. + New in release 2 are the multiprecision numbers and the use of Ada 95. Release 2.1 has faster multiprecision arithmetic and linear programming. Only minor changes are made in release 2.2. Changes in version 2.3 are @@ -21,6 +26,7 @@ In 2.4.63, the directory AD was added. The main change in v2.4.80 was the introduction of multiple double arithmetic, with code generated by the CAMPARY software, with extensions of the QD library. +The Laurent folder with code for Laurent series was added in v2.4.85. Math_Lib : 1. general mathematical library |-- Numbers : 1.1. number representations @@ -34,7 +40,9 @@ |-- Supports : 1.9. support sets and linear programming |-- Circuits : 1.A. circuits for algorithmic differentiation |-- Series : 1.B. manipulating truncated power series - |-- AD : 1.C. algorithmic differentiation of the Path library + |-- Laurent : 1.C. series with integer leading exponents + |-- AD : 1.D. algorithmic differentiation of the Path library + The directory Numbers specifies the coefficient rings and contains definitions of floating-point and complex numbers. @@ -47,7 +55,7 @@ The directory Vectors provides definitions of data types of vectors of natural, integer, real and complex numbers. -Matrices offers a generic package matrices, and varous instantions. +Matrices offers a generic package matrices, and various instantions. Solvers of linear systems with integer linear algebra are provided in the Divisors directory. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Reduction/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Reduction/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Reduction/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Reduction/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Numerical Linear Algebra in PHCv2.4.82 +Numerical Linear Algebra in PHCv2.4.85 This "Reduction" directory implements "row reduction" on linear systems of floating-point number of various precisions: double, double double, @@ -14,6 +14,11 @@ Added solvers in triple, penta, octo, and deca double precision in version 2.4.80. +Run "gprbuild reduction.gpr" to make all test programs. +On windows, type "gprbuild reduction.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean reduction.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Reduction/reduction.gpr phcpack-2.4.85/src/Ada/Math_Lib/Reduction/reduction.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Reduction/reduction.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Reduction/reduction.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,75 @@ +project reduction is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_ddnorm.adb", -- tests double double vector norms + "ts_qdnorm.adb", -- tests quad double vector norms + "ts_tdnorm.adb", -- tests triple double vector norms + "ts_pdnorm.adb", -- tests penta double vector norms + "ts_odnorm.adb", -- tests octo double vector norms + "ts_danorm.adb", -- tests deca double vector norms + "ts_errfree.adb", -- illustrates error free transformations + "ts_fltdls.adb", -- tests dynamic matrix triangulators + "ts_fltlu.adb", -- tests floating-point LU factorization + "ts_cmplu.adb", -- tests complex LU factorization + "ts_ddlu.adb", -- tests double double LU solver + "ts_tdlu.adb", -- tests triple double LU solver + "ts_qdlu.adb", -- tests quad double LU solver + "ts_pdlu.adb", -- tests penta double LU solver + "ts_odlu.adb", -- tests octo double LU solver + "ts_dalu.adb", -- tests deca double LU solver + "ts_backsubs.adb", -- tests accuracy of back substitution + "ts_vvlu.adb", -- tests LU factorization on vecvecs + "ts_perflu.adb", -- performance test on lufac + "ts_perfdlu.adb", -- better performing complex lufac + "ts_rowred.adb", -- tests incremental row reduction + "ts_dqrd.adb", -- tests double QR and LS + "ts_ddqrd.adb", -- tests double double QR and LS + "ts_tdqrd.adb", -- tests triple double QR and LS + "ts_qdqrd.adb", -- tests quad double QR and LS + "ts_pdqrd.adb", -- tests penta double QR and LS + "ts_odqrd.adb", -- tests octo double QR and LS + "ts_daqrd.adb", -- tests deca double QR and LS + "ts_mpqrd.adb", -- tests multiprecision QR and LS + "ts_qrd.adb", -- tests QR and least squares + "ts_mgs.adb", -- tests modified Gram-Schmidt + "ts_mgsrnk.adb", -- Gram-Schmidt for rank determination + "ts_dsvd.adb", -- tests double SVD + "ts_ddsvd.adb", -- tests double double SVD + "ts_tdsvd.adb", -- tests triple double SVD + "ts_qdsvd.adb", -- tests quad double SVD + "ts_pdsvd.adb", -- tests penta double SVD + "ts_odsvd.adb", -- tests octo double SVD + "ts_dasvd.adb", -- tests deca double SVD + "ts_mpsvd.adb", -- tests multiprecision SVD + "ts_svd.adb", -- tests the SVD + "ts_perfdsvd.adb", -- develop better performing SVD + "ts_eigval.adb", -- tests eigenvalue computation + "ts_vmplu.adb" -- tests variable precision solvers + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end reduction; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.adb phcpack-2.4.85/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -with Standard_Complex_Singular_Values; - -package body Standard_Floating_Singular_Values is - - function Min0 ( a,b : integer32 ) return integer32 is - begin - return Standard_Complex_Singular_Values.Min0(a,b); - end Min0; - - procedure SVD ( x : in out Matrix; n,p : in integer32; - s,e : out Vector; u : out Matrix; v : out Matrix; - job : in integer32; info : out integer32 ) is - begin - null; - end SVD; - - function Rank ( s : Vector ) return natural is - begin - return 0; - end Rank; - - function Rank ( s : Vector; tol : double_float ) return natural is - begin - return 0; - end Rank; - - function Inverse_Condition_Number - ( s : Vector ) return double_float is - begin - return 0.0; - end Inverse_Condition_Number; - - function Inverse_Condition_Number - ( s : Vector; tol : double_float ) return double_float; - begin - return 0.0; - end Inverse_Condition_Number; - - function Transpose ( z : Matrix ) return Matrix is - begin - return z; - end Transpose; - - function Inverse ( u,v : Matrix; s : Vector ) return Matrix is - begin - return u; - end Inverse; - - function Inverse ( u,v : Matrix; s : Vector; tol : double_float ) - return Matrix is - begin - return u; - end Inverse; - - function Solve ( u,v : Matrix; s,b : Vector ) return Vector is - begin - return s; - end Solve; - - function Solve ( u,v : Matrix; s,b : Vector; tol : double_float ) - return Vector is - begin - return s; - end Solve; - -end Standard_Floating_Singular_Values; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.ads phcpack-2.4.85/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Reduction/standard_floating_singular_values.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Vectors; use Standard_Floating_Vectors; -with Standard_Floating_Matrices; use Standard_Floating_Matrices; - -package Standard_Floating_Singular_Values is - --- DESCRIPTION : --- This package provides a facility for computing a singular value --- decomposition of matrices of standard real floating-point numbers. --- Besides the SVD, the following operations are provided: --- rank determination, condition number calculation, --- pseudo inverse, and solving of a linear system. - --- ACKNOWLEDGMENT : --- This implementation is a translation of the Linpack routine zsvd, --- version dated 03/19/79, correction to shift calculation made 2/85. --- G.W. Stewart, University of Maryland, Argonne National Lab. - --- NOTE : --- The current implementation is just an interface to the complex SVD. - - function Min0 ( a,b : integer32 ) return integer32; - - -- DESCRIPTION : returns the minimum of a and b. - - procedure SVD ( x : in out Matrix; n,p : in integer32; - s,e : out Vector; u : out Matrix; v : out Matrix; - job : in integer32; info : out integer32 ); - - -- DESCRIPTION : - -- Reduces a complex n-by-p matrix x by unitary transformations u - -- and v to diagonal form. The diagonal elements in s are the - -- singular values of x. The columns of u are the corresponding left - -- singular vectors, and the columns of v are the right singular vectors. - - -- ON ENTRY : - -- x complex n-by-p matrix whose singular value decomposition - -- is to be computed, x is destroyed by SVD; - -- n the number of rows of the matrix x; - -- p the number of columns of the matrix x; - -- job controls the computation of the singular vectors, it has - -- the decimal expansion ab with the following meaning: - -- a = 0 : do not compute the left singular vectors, - -- a = 1 : return the n left singular vectors in u, - -- a >=2 : returns the first min(n,p) left singular - -- vectors in u, - -- b = 0 : do not compute the right singular vectors, - -- b = 1 : return the right singular vectors in v. - - -- ON RETURN : - -- s vector of range 1..mm, where mm = min(n+1,p), - -- the first min(n,p) entries of s contain the singular values - -- of x arranged in descending order of magnitude; - -- e vector of range 1..p, ordinarily containing zeros, - -- however see the discussion of info for exceptions; - -- u matrix with n rows and k columns, - -- if joba = 1, then k = n, if joba >= 2 then k = min(n,p), - -- u contains the matrix of left singular vectors, - -- u is not referenced if joba = 0, if n <= p or if joba > 2, - -- then u may be identified with x in the subroutine call; - -- v matrix with p rows and p columns, - -- v contains the matrix of right singular vectors, - -- v is not referenced if jobb = 0, if p <= n, then v may be - -- identified with x in the subroutine call; - -- info the singular values (and their corresponding singular vectors) - -- s(info+1),s(info+2),...,s(m) are correct (here m=min(n,p)), - -- thus if info = 0, all the singular values and their vectors - -- are correct, in any event, the matrix b = ctrans(u)*x*v is - -- the bidiagonal matrix with the elements of s on its diagonal - -- and the elements of e on its super diagonal (ctrans(u) is the - -- conjugate-transpose of u), thus the singular values of x - -- and b are the same. - - function Rank ( s : Vector ) return integer32; - function Rank ( s : Vector; tol : double_float ) return integer32; - - -- DESCRIPTION : - -- Given the singular values of a matrix, returns the number - -- of singular values s(i) for which s(i) + 1.0 /= 1.0, or - -- when tol is present, the number on return counts the singular - -- values s(i) for which AbsVal(s(i)) >= tol. - - function Inverse_Condition_Number - ( s : Vector ) return double_float; - function Inverse_Condition_Number - ( s : Vector; tol : double_float ) return double_float; - - -- DESCRIPTION : - -- Given the singular values of a matrix in s, the number on return - -- is the smallest singular value divided by the lagest one. - -- Singular values s(i) for which s(i) + 1.0 = 1.0 or for which - -- AbsVal(s(i)) < tol are ignored. In this sense the condition - -- number is taken with respect to the numerical rank (see above) - -- of the matrix and expresses how good the linear system can be - -- solved by means of a pseudo inverse. - - function Transpose ( z : Matrix ) return Matrix; - - -- DESCRIPTION : - -- Returns the transpose of the matrix z. - - function Inverse ( u,v : Matrix; s : Vector ) return Matrix; - function Inverse ( u,v : Matrix; s : Vector; tol : double_float ) - return Matrix; - - -- DESCRIPTION : - -- Returns the pseudo inverse of the matrix whose singular value - -- decomposition is given by u, v, and s. Singular values s(i) for - -- which AbsVal(s(i)) + 1.0 = 1.0 or AbsVal(s(i)) < tol are ignored. - - function Solve ( u,v : Matrix; s,b : Vector ) return Vector; - function Solve ( u,v : Matrix; s,b : Vector; tol : double_float ) - return Vector; - - -- DESCRIPTION : - -- Given the singular value decomposition of the matrix a, - -- i.e.: u'*a*v = s, the vector x = v*(1/s)*u'*b is returned, - -- x is the solution of a*x = b. This solver multiplies b with - -- the pseudo inverse of the matrix a. - -- Singular values s(i) for which s(i) + 1.0 = 1.0 are ignored, - -- or in case tol is provided, singular values s(i) for which - -- AbsVal(s(i)) < tol are ignored. - -end Standard_Floating_Singular_Values; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Reduction/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Reduction/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Reduction/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Reduction/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to reduction.gpr. + +Tue 8 Jun 2021 : defined reduction.gpr to build the test procedures. + Sat 7 Nov 2020 : test program ts_errfree to illustrate the concept of the error free transformations. Adjusted the output of ts_errfree. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Series/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Series/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Series/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Series/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Truncated power series with complex coefficients for PHCv2.4.83 +Truncated power series with complex coefficients for PHCv2.4.85 Similar to Taylor series approximations for general functions, we can approximate roots of polynomials in a parameter by series. @@ -21,6 +21,11 @@ In v2.4.80, series in triple, penta, octo, and deca double precision were added. +Run "gprbuild series.gpr" to make all test programs. +On windows, type "gprbuild series.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean series.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Series/series.gpr phcpack-2.4.85/src/Ada/Math_Lib/Series/series.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Series/series.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Series/series.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,62 @@ +project series is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Functions"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_pstrunc.adb", -- tests proof-of-concept power series + "ts_bincff.adb", -- tests binomial coefficients + "ts_cseries.adb", -- tests 3rd version of series + "ts_cservec.adb", -- tests 3rd version of vector series + "ts_csermat.adb", -- tests 3rd version of matrices of series + "ts_cseritp.adb", -- tests linear series interpolation + "ts_csersin.adb", -- tests solving singular linear systems + "ts_cserlin.adb", -- tests linearization + "ts_cserinv.adb", -- tests inverting singular problems + "ts_cserpol.adb", -- tests series polynomials + "ts_csersys.adb", -- tests systems of series polynomials + "ts_sercffpol.adb", -- tests series coefficient-parameter eval + "ts_series2.adb", -- tests 2nd design of series + "ts_servec2.adb", -- tests vectors of standard series + "ts_sermat2.adb", -- tests matrices of standard series + "ts_seritp2.adb", -- tests linear series interpolation + "ts_sersin2.adb", -- tests solving singular linear systems + "ts_serlin2.adb", -- tests linearization + "ts_perfserlin.adb", -- tests a better performing solver + "ts_series.adb", -- tests truncated dense series + "ts_servec.adb", -- tests vectors of dense power series + "ts_sermat.adb", -- tests matrices of dense power series + "ts_serlin.adb", -- tests matrix series solver + "ts_seritp.adb", -- tests interpolation on linear series systems + "ts_sersin.adb", -- tests solving of singular matrix series + "ts_serpol.adb", -- tests series polynomials + "ts_sersys.adb" -- tests systems of series polynomials + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end series; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Series/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Series/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Series/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Series/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,21 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to series.gpr. + +Tue 8 Jun 2021 : defined series.gpr to build the test procedures. + +Sat 20 Mar 2021 : moved all code for Laurent series to ../Laurent. + +Fri 19 Mar 2021 : fixed indexing error in standard_laurent_series.adb. + Moved code from ts_pslaur into the package test_standard_laurent_series. + +Sun 14 Mar 2021 : new package standard_laurent_series with code extracted + from ts_pslaur.adb. + +Sat 13 Mar 2021 : extended ts_pslaur with addition and subtraction. + +Fri 12 Mar 2021 : extended ts_pslaur with multiplication and division. + +Wed 10 Mar 2021 : new ts_pslaur.adb for basic tests on Laurent series. + Tue 15 Dec 2020 : new {trip,pent,octo,deca}dobl_echelon_forms and {trip,pent,octo,deca}dobl_interpolating_cseries to implement the echelon solvers in {trip,pent,octo,deca}dobl_series_matrix_solvers. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Supports/floating_linear_inequalities_old.adb phcpack-2.4.85/src/Ada/Math_Lib/Supports/floating_linear_inequalities_old.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Supports/floating_linear_inequalities_old.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Supports/floating_linear_inequalities_old.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,985 +0,0 @@ -with Standard_Random_Numbers; use Standard_Random_Numbers; -with Standard_Mathematical_Functions; use Standard_Mathematical_Functions; -with Givens_Rotations; use Givens_Rotations; -with Linear_Minimization; - -package body Floating_Linear_Inequalities is - --- USAGE OF LP : - - procedure Is_In_Cone ( tab : in out Matrix; lastcol : in integer; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - -- ALGORITHM: - -- The following linear program will be solved: - -- - -- min u_1 + .. + u_n - -- - -- l_1*p_1i + l_2*p_2i + .. + l_m*p_mi + u_i*q_i = q_i i=1,2,..,n - -- - -- to determine whether q belongs to the cone spanned by the - -- vectors p_1,p_2,..,p_m. - -- If all u_i are zero and all constraints are satisfied, - -- then q belongs to the cone spanned by the vectors. - - -- CONSTANTS : - - n : constant natural := rhs'last; - m : constant natural := 2*n; -- number of constraints - nb : constant natural := lastcol+n; -- number of unknowns - - -- VARIABLES : - - mat : matrix(0..m,0..nb); - sol : Standard_Floating_Vectors.Vector(1..nb) := (1..nb => 0.0); - bas : Standard_Integer_Vectors.Vector(1..m) := (1..m => 0); - slk : Standard_Integer_Vectors.Vector(1..nb) := (1..nb => 0); - - cnt : natural; - s : double_float; - - begin - - -- INITIALIZATION OF THE TARGET : - - for i in 0..(nb-n) loop - mat(0,i) := 0.0; -- sum of the lambda's - end loop; - for i in (nb-n+1)..nb loop - mat(0,i) := -1.0; -- sum of the mu's - end loop; - - -- INITIALIZATION OF THE CONSTRAINTS : - - for i in 1..n loop - for j in (nb-n+1)..nb loop - if i /= j-nb+n - then mat(i,j) := 0.0; - mat(i+n,j) := 0.0; - end if; - end loop; - end loop; - - for j in tab'first(2)..lastcol loop - for i in tab'range(1) loop - mat(i,j) := -tab(i,j); - mat(i+n,j) := tab(i,j); - end loop; - end loop; - - for i in rhs'range loop - mat(i,0) := -rhs(i); - mat(i+n,0) := rhs(i); - mat(i,i+nb-n) := -rhs(i); - mat(i+n,i+nb-n) := rhs(i); - end loop; - - -- SOLVE THE LINEAR PROGRAM : - - -- New_Tableau.Init_Basis(nb,bas,slk); - -- Dual_Simplex(mat,sol,bas,slk,tol,false); - - -- RETURN AND CHECK THE SOLUTION : - - cnt := 0; - for i in tab'first(2)..lastcol loop - if abs(sol(i)) > tol - then cnt := cnt + 1; - solution(cnt) := sol(i); - columns(cnt) := i; - end if; - end loop; - - s := 0.0; - for i in (nb-n+1)..nb loop - s := s + sol(i); - end loop; - if abs(s) > tol - then feasible := false; return; - end if; - feasible := true; - - end Is_In_Cone; - --- AUXILIARIES : - - function Index_of_Maximum ( v : Standard_Floating_Vectors.Vector; - lst : integer ) return integer is - - -- DESCRIPTION : - -- Returns the index in the vector v(v'first..lst) for which the maximum - -- is obtained. - - res : integer := v'first; - max : double_float := v(res); - - begin - for i in v'first+1..lst loop - if v(i) > max - then max := v(i); res := i; - end if; - end loop; - return res; - end Index_of_Maximum; - - function Norm ( v : Standard_Floating_Vectors.Vector ) return double_float is - - -- DESCRIPTION : - -- Returns the 2-norm of the vector. - - res : double_float := 0.0; - - begin - for j in v'range loop - res := res + v(j)*v(j); - end loop; - if res + 1.0 = 1.0 - then return 0.0; - else return SQRT(res); - end if; - end Norm; - - function Norm ( v : Standard_Floating_Vectors.vector; - frst : integer ) return double_float is - - -- DESCRIPTION : - -- Returns the 2-norm of the vector v(frst..v'last). - - res : double_float := 0.0; - - begin - for j in frst..v'last loop - res := res + v(j)*v(j); - end loop; - if res + 1.0 = 1.0 - then return 0.0; - else return SQRT(res); - end if; - end Norm; - - procedure Scale ( v : in out Standard_Floating_Vectors.vector ) is - - -- DESCRIPTION : - -- Returns the normed vector, i.e. v/Norm(v). - - nrm : double_float := Norm(v); - - begin - if nrm + 1.0 /= 1.0 - then for i in v'range loop - v(i) := v(i)/nrm; - end loop; - end if; - end Scale; - - function Norm ( mat : matrix; i : integer ) return double_float is - - -- DESCRIPTION : - -- Returns the 2-norm of the ith column in the matrix. - - res : double_float := 0.0; - - begin - for j in mat'range(1) loop - res := res + mat(j,i)*mat(j,i); - end loop; - if res + 1.0 = 1.0 - then return 0.0; - else return SQRT(res); - end if; - end Norm; - - procedure Scale ( mat : in out matrix; lastcolumn : in integer ) is - - -- DESCRIPTION : - -- Scales the columns in the matrix, by dividing by their norm. - - nrm : double_float; - - begin - for i in mat'first(2)..lastcolumn loop - nrm := Norm(mat,i); - if nrm + 1.0 /= 1.0 - then for j in mat'range(1) loop - mat(j,i) := mat(j,i)/nrm; - end loop; - end if; - end loop; - end Scale; - - function Inner_Product ( mat : Matrix; i : integer; - v : Standard_Floating_Vectors.Vector ) - return double_float is - -- DESCRIPTION : - -- Computes the inner product of the given vector v and the vector - -- in the ith column of the matrix. - - res : double_float := 0.0; - - begin - for k in mat'range(1) loop - res := res + mat(k,i)*v(k); - end loop; - return res; - end Inner_Product; - - function Maximal_Product ( mat : matrix; i : integer; - v : Standard_Floating_Vectors.Vector; - frst : integer ) return integer is - -- DESCRIPTION : - -- Returns the index in v(frst..v'last) for which mat(index,i)*v(index) - -- becomes maximal. - - res : integer := frst; - max : double_float := mat(res,i)*v(res); - tmp : double_float; - - begin - for j in frst+1..v'last loop - tmp := mat(j,i)*v(j); - if tmp > max - then max := tmp; res := j; - end if; - end loop; - return res; - end Maximal_Product; - - function Inner_Product ( mat : Matrix; i,j : integer ) return double_float is - - -- DESCRIPTION : - -- Computes the inner product of the vectors in the columns i and j - -- of the matrix. - - res : double_float := 0.0; - - begin - for k in mat'range(1) loop - res := res + mat(k,i)*mat(k,j); - end loop; - return res; - end Inner_Product; - - function Inner_Products ( mat : matrix; lastcol : integer; - v : Standard_Floating_Vectors.Vector ) - return Standard_Floating_Vectors.Vector is - - -- DESCRIPTION : - -- Returns a vector with all inner products of the given vector - -- and the column vectors of the matrix. - - res : Standard_Floating_Vectors.Vector(mat'first(2)..lastcol); - - begin - for i in res'range loop - res(i) := Inner_Product(mat,i,v); - end loop; - return res; - end Inner_Products; - - function Positive ( v : Standard_Floating_Vectors.Vector; - lst : integer; tol : double_float ) - return boolean is - -- DESCRIPTION : - -- Returns true if all elements in v(v'first..lst) are >= 0. - - begin - for i in v'first..lst loop - if abs(v(i)) > tol and then (v(i) < 0.0) - then return false; - end if; - end loop; - return true; - end Positive; - - function Positive - ( mat : matrix; rhs : Standard_Floating_Vectors.Vector; - ind,col : integer; - solind : double_float; tol : double_float ) return boolean is - - -- DESCRIPTION : - -- The given matrix is upper triangular up to the column indicated - -- by ind. This function returns true when by replacing column ind - -- by column col, a positive solution would be obtained. - -- The number solind is sol(ind) in the solution vector. - - sol : Standard_Floating_Vectors.Vector(1..ind) := (1..ind => 0.0); - - begin - sol(ind) := solind; - for i in reverse mat'first(1)..(ind-1) loop - for j in i+1..(ind-1) loop - sol(i) := sol(i) + mat(i,j)*sol(j); - end loop; - sol(i) := sol(i) + mat(i,col)*sol(ind); - sol(i) := (rhs(i) - sol(i))/mat(i,i); - if (abs(sol(i)) > tol) and then (sol(i) < 0.0) - then --put_line("The solution before returning false : "); - --put(sol,3,3,3); new_line; - return false; - end if; - end loop; - --put_line("The solution before returning true : "); - --put(sol,3,3,3); new_line; - return true; - end Positive; - - function Positive_Diagonal - ( mat : Matrix; rhs : Standard_Floating_Vectors.Vector; - ind,col : integer; - solind : double_float; tol : double_float ) return boolean is - - -- DESCRIPTION : - -- The given matrix is diagonal up to the column indicated - -- by ind. This function returns true when by replacing column ind - -- by column col, a positive solution would be obtained. - -- The number solind is sol(ind) in the solution vector. - - sol : Standard_Floating_Vectors.Vector(1..ind) := (1..ind => 0.0); - - begin - sol(ind) := solind; - for i in reverse mat'first(1)..(ind-1) loop - sol(i) := (rhs(i) - mat(i,col)*sol(ind))/mat(i,i); - if (abs(sol(i)) > tol) and then (sol(i) < 0.0) - then --put_line("The solution before returning false : "); - --put(sol,3,3,3); new_line; - return false; - end if; - end loop; - --put_line("The solution before returning true : "); - --put(sol,3,3,3); new_line; - return true; - end Positive_Diagonal; - --- PIVOTING PROCEDURES : - - procedure Interchange ( v : in out Standard_Floating_Vectors.Vector; - i,j : in integer ) is - - -- DESCRIPTION : - -- The entries v(i) and v(j) are interchanged. - - temp : double_float; - - begin - temp := v(i); v(i) := v(j); v(j) := temp; - end Interchange; - - procedure Interchange_Columns ( mat : in out matrix; i,j : in integer ) is - - -- DESCRIPTION : - -- The columns i and j of the given matrix are interchanged. - - temp : double_float; - - begin - for k in mat'range(1) loop - temp := mat(k,i); mat(k,i) := mat(k,j); mat(k,j) := temp; - end loop; - end Interchange_Columns; - - procedure Interchange_Rows - ( mat : in out Matrix; lastcol : in integer; - v : in out Standard_Floating_Vectors.Vector; - i,j : in integer ) is - - -- DESCRIPTION : - -- The rows i and j of the given matrix and vector are interchanged. - - temp : double_float; - - begin - for k in mat'first(2)..lastcol loop - temp := mat(i,k); mat(i,k) := mat(j,k); mat(j,k) := temp; - end loop; - temp := v(i); v(i) := v(j); v(j) := temp; - end Interchange_Rows; - - procedure Rotate ( mat : in out Matrix; lastcol,i : in integer; - v : in out Standard_Floating_Vectors.Vector; - tol : in double_float ) is - - -- DESCRIPTION : - -- Performs Givens rotations on the matrix and vector such that - -- mat(j,i) = 0, for all j > i. - - -- NOTE : - -- A diagonalization procedure constructs an orthonormal basis - -- and does not preserve the angles between the vectors. - - cosi,sine : double_float; - - begin - for j in i+1..mat'last(1) loop - if abs(mat(j,i)) > tol - then Givens_Factors(mat,i,j,cosi,sine); - Givens_Rotation(mat,lastcol,i,j,cosi,sine); - Givens_Rotation(v,i,j,cosi,sine); - end if; - end loop; - end Rotate; - - procedure Upper_Triangulate ( mat : in out Matrix; lastcol,i : in integer; - v : in out Standard_Floating_Vectors.Vector; - tol : in double_float ) is - - -- DESCRIPTION : - -- Makes the upper diagonal elements of the ith colume zero: - -- mat(j,i) = 0, for all j /= i. - - fac : double_float; - - begin - for j in mat'first(1)..(i-1) loop - if (abs(mat(j,i)) > tol) - then fac := mat(j,i)/mat(i,i); - for k in i..lastcol loop - mat(j,k) := mat(j,k) - fac*mat(i,k); - end loop; - end if; - end loop; - end Upper_Triangulate; - --- INITIALIZE : COMPUTE CLOSEST VECTOR TO RHS - - procedure Initialize - ( tableau : in out Matrix; lastcol : in integer; - rhs,sol : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - columns : in out Standard_Integer_Vectors.Vector; - cosines : out Standard_Floating_Vectors.Vector; - feasible : out boolean ) is - - -- DESCRIPTION : - -- Scales the tableau and right hand side by dividing by its norm. - -- Then computes the vector of cosines. - -- If no vector with positive cosine with the right hand side vector - -- can be found, then the problem is not feasible, otherwise, - -- the vector with largest positive cosine will be the first column. - -- At last, this first column will be transformed to the unit vector, - -- by means of Givens rotations. - -- Then the first solution component equals the first component of - -- the transformed right hand side vector. - - ips : Standard_Floating_Vectors.Vector(tableau'first(2)..lastcol); - index : integer; - - begin - Scale(tableau,lastcol); Scale(rhs); - -- put_line("The tableau after scaling : "); put(tableau,3,3,3); - -- put_line(" with scaled right hand side : "); put(rhs,3,3,3); new_line; - ips := Inner_Products(tableau,lastcol,rhs); - index := Index_of_Maximum(ips,lastcol); - if (abs(ips(index)) < tol) or else (ips(index) < 0.0) - then if index <= rhs'last - then feasible := (abs(rhs(index)) < tol); - else feasible := false; - end if; - else feasible := true; - columns(columns'first) := index; - columns(index) := columns'first; - Interchange_Columns(tableau,tableau'first(2),index); - Interchange(ips,tableau'first(2),index); - index := Maximal_Product(tableau,tableau'first(2),rhs,rhs'first); - if index /= tableau'first(2) - then Interchange_Rows(tableau,lastcol,rhs,tableau'first(2),index); - end if; - Rotate(tableau,lastcol,tableau'first(2),rhs,tol); - -- Upper_Triangulate(tableau,lastcol,tableau'first(2),rhs,tol); - sol(sol'first) := rhs(rhs'first); - end if; - cosines := ips; - -- put_line("At the end of Initialize : "); - -- put(" cosines : "); put(ips,3,3,3); new_line; - -- put_line("The tableau : "); put(tableau,3,3,3); - -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; - -- put(" and last column "); put(lastcol,1); new_line; - end Initialize; - - procedure Initialize - ( tableau : in out Matrix; lastcol : in integer; - rhs,sol : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - columns : in out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - -- DESCRIPTION : - -- Scales the tableau and right hand side by dividing by its norm. - -- Then computes the vector of cosines. - -- If no vector with positive cosine with the right hand side vector - -- can be found, then the problem is not feasible, otherwise, - -- the vector with largest positive cosine will be the first column. - -- At last, this first column will be transformed to the unit vector, - -- by means of Givens rotations. - -- Then the first solution component equals the first component of - -- the transformed right hand side vector. - - ips : Standard_Floating_Vectors.Vector(tableau'first(2)..lastcol); - index : integer; - - begin - Scale(tableau,lastcol); Scale(rhs); - -- put_line("The tableau after scaling : "); put(tableau,3,3,3); - -- put_line(" with scaled right hand side : "); put(rhs,3,3,3); new_line; - ips := Inner_Products(tableau,lastcol,rhs); - index := Index_of_Maximum(ips,lastcol); - if (abs(ips(index)) < tol) or else (ips(index) < 0.0) - then if index <= rhs'last - then feasible := (abs(rhs(index)) < tol); - else feasible := false; - end if; - else feasible := true; - columns(columns'first) := index; - columns(index) := columns'first; - Interchange_Columns(tableau,tableau'first(2),index); - index := Maximal_Product(tableau,tableau'first(2),rhs,rhs'first); - if index /= tableau'first(2) - then Interchange_Rows(tableau,lastcol,rhs,tableau'first(2),index); - end if; - Rotate(tableau,lastcol,tableau'first(2),rhs,tol); - -- Upper_Triangulate(tableau,lastcol,tableau'first(2),rhs,tol); - sol(sol'first) := rhs(rhs'first); - end if; - -- put_line("At the end of Initialize : "); - -- put_line("The tableau : "); put(tableau,3,3,3); - -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; - -- put(" and last column "); put(lastcol,1); new_line; - end Initialize; - --- PERFORM THE NEXT STEPS : - - procedure Select_Column - ( mat : in Matrix; lastcol : in integer; - rhs,cosines : in Standard_Floating_Vectors.Vector; - index : in integer; - tol : in double_float; row,col : out integer ) is - -- DESCRIPTION : - -- Selects a column col with in matrix for which - -- 1) the cosine is maximal and - -- 2) row = Maximal_Product(mat,col,rhs,index), with mat(row,col) > 0.0 - -- If the resulting column is smaller than index, then no such column - -- has been found. - - cl : integer := index; - maxcos,prod : double_float; - rw : integer := Maximal_Product(mat,cl,rhs,index); - mp : integer; - - begin - -- put_line("The tableau when Select_Column :"); put(mat,3,3,3); - -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; - -- put_line("and vector of cosines : "); put(cosines,3,3,3); new_line; - -- put("The index : "); put(index,1); new_line; - prod := mat(rw,cl)*rhs(rw); - if prod > tol - and then Positive(mat,rhs,index,cl,rhs(rw)/mat(rw,cl),tol) - -- Positive_Diagonal(mat,rhs,index,cl,rhs(rw)/mat(rw,cl),tol) - then maxcos := cosines(cl); - else maxcos := -2.0; - end if; - for i in index+1..lastcol loop - mp := Maximal_Product(mat,i,rhs,index); - -- put("mp : "); put(mp,1); put(" when testing "); put(i,1); - -- put_line("th column"); - prod := mat(mp,i)*rhs(mp); - if prod > tol and then cosines(i) > maxcos - then if Positive(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) - -- Positive_Diagonal(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) - then cl := i; rw := mp; maxcos := cosines(i); - end if; - end if; - end loop; - -- put("maximal cosine : "); put(maxcos,3,3,3); new_line; - if maxcos >= -1.0 - then col := cl; row := rw; - -- put("column : "); put(cl,1); - -- put(" and row : "); put(rw,1); new_line; - else col := index-1; row := index-1; - -- put("column : "); put(index-1,1); - -- put(" and row : "); put(index-1,1); new_line; - end if; - end Select_Column; - - procedure Select_Column - ( mat : in Matrix; lastcol : in integer; - rhs : in Standard_Floating_Vectors.Vector; - index,column : in integer; - tol : in double_float; row,col : out integer ) is - -- DESCRIPTION : - -- Selects first column col with in matrix for which - -- row = Maximal_Product(mat,col,rhs,index), with mat(row,col) > 0.0. - -- If the resulting column is smaller than index, then no such column - -- has been found. - - cl : integer := index-1; - prod : double_float; - rw,mp : integer; - - begin - -- put_line("The tableau when Select_Column :"); put(mat,3,3,3); - -- put_line(" with right hand side : "); put(rhs,3,3,3); new_line; - -- put("The index : "); put(index,1); new_line; - for i in column..lastcol loop - mp := Maximal_Product(mat,i,rhs,index); - -- put("mp : "); put(mp,1); put(" when testing "); put(i,1); - -- put_line("th column"); - prod := mat(mp,i)*rhs(mp); - if prod > tol - and then Positive(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) - -- Positive_Diagonal(mat,rhs,index,i,rhs(mp)/mat(mp,i),tol) - then cl := i; rw := mp; - end if; - exit when (cl >= index); - end loop; - if cl >= index - then col := cl; row := rw; - -- put("column : "); put(cl,1); - -- put(" and row : "); put(rw,1); new_line; - else col := index-1; row := index-1; - -- put("column : "); put(index-1,1); - -- put(" and row : "); put(index-1,1); new_line; - end if; - end Select_Column; - - procedure Next ( tableau : in out Matrix; lastcol : in integer; - rhs,sol,cosines : in out Standard_Floating_Vectors.Vector; - pivots : in out Standard_Integer_Vectors.Vector; - tol : in double_float; - index : in integer; feasi : in out boolean ) is - - -- DESCRIPTION : - -- Selects one new column out of the tableau. - - -- ON ENTRY : - -- tableau upper triangular up to the row and column index-1; - -- lastcol index of the last column of interest in the tableau; - -- rhs right hand side vector; - -- sol solution vector for the components 1..index; - -- cosines vector of cosines; - -- pivots vector of column interchangements; - -- tol tolerance to decide whether a number equals zero; - -- index indicator of the current step; - -- feasi must be true on entry. - - -- ON RETURN : - -- tableau upper triangular up to the row and column index, - -- under the condition that feasi remains true; - -- rhs transformed right hand side vector; - -- sol new solution, with additional meaningful component - -- sol(index); - -- cosines eventually permuted vector of cosines: - -- cosines(index) is the cosine of the (new) column, - -- indicated by index, and the right hand side vector; - -- pivots updated vector of column interchangements; - -- feasi if true, then a new column which yields a positive - -- contribution of the right hand side vector has been - -- found, if this was not the case, then feasi is false; - - col,row,tmp : integer; - - begin - Select_Column(tableau,lastcol,rhs,cosines,index,tol,row,col); - if col < index - then feasi := false; - else feasi := true; - if col /= index - then tmp := pivots(col); pivots(col) := pivots(index); - pivots(index) := tmp; - Interchange_Columns(tableau,col,index); - Interchange(cosines,col,index); - end if; - if row /= index - then Interchange_Rows(tableau,lastcol,rhs,row,index); - end if; - Rotate(tableau,lastcol,index,rhs,tol); - -- Upper_Triangulate(tableau,lastcol,index,rhs,tol); - -- Solve(tableau,rhs,tol,index,sol); -- only needed at end - -- feasi := Positive(sol,index,tol); -- double check... - end if; - end Next; - - procedure Next ( tableau : in out Matrix; lastcol : in integer; - rhs,sol : in out Standard_Floating_Vectors.Vector; - pivots : in out Standard_Integer_Vectors.Vector; - tol : in double_float; - index : in integer; rank : out integer; - feasi : in out boolean ) is - - -- DESCRIPTION : - -- Lexicographic enumeration of the candidates, stops when a feasible - -- solution is encountered. - - -- ON ENTRY : - -- tableau upper triangular up to the row and column index-1; - -- lastcol index of the last column of interest in the tableau; - -- rhs right hand side vector; - -- sol solution vector for the components 1..index; - -- pivots vector of column interchangements; - -- tol tolerance to decide whether a number equals zero; - -- index indicator of the current step; - -- feasi must be true on entry. - - -- ON RETURN : - -- tableau upper triangular up to the row and column index, - -- under the condition that feasi remains true; - -- rhs transformed right hand side vector; - -- sol new solution, with additional meaningful component - -- sol(index); - -- pivots updated vector of column interchangements; - -- rank rank of the current tableau; - -- feasi if true, then a new column which yields a positive - -- contribution of the right hand side vector has been - -- found, if this was not the case, then feasi is false; - - column,col,row,tmp : integer; - stop : boolean := false; - - begin - column := index; - loop - Select_Column(tableau,lastcol,rhs,index,column,tol,row,col); - if col < column - then feasi := false; stop := true; - else - feasi := true; - if col /= index - then tmp := pivots(col); pivots(col) := pivots(index); - pivots(index) := tmp; - Interchange_Columns(tableau,col,index); - end if; - if row /= index - then Interchange_Rows(tableau,lastcol,rhs,row,index); - end if; - Rotate(tableau,lastcol,index,rhs,tol); - -- Upper_Triangulate(tableau,lastcol,index,rhs,tol); - if (index = lastcol) or else (index = tableau'last(1)) - or else (Norm(rhs,index+1) < tol) - then stop := true; rank := index; - else - Next(tableau,lastcol,rhs,sol,pivots,tol,index+1,rank,feasi); - if feasi - then stop := true; - else column := col+1; - end if; - end if; - end if; - exit when stop; - end loop; - end Next; - - procedure Complementary_Slackness - ( tableau : in out matrix; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - begin - Complementary_Slackness - (tableau,tableau'last(2),rhs,tol,solution,columns,feasible); - end Complementary_Slackness; - - procedure Complementary_Slackness1 - ( tableau : in out Matrix; lastcol : in integer; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - -- NOTE : - -- This version is a straigth forward search and finds not always - -- the feasible solution. - - feasi : boolean; - pivots : Standard_Integer_Vectors.Vector(tableau'first(2)..lastcol); - cosis : Standard_Floating_Vectors.Vector(tableau'first(2)..lastcol); - sol : Standard_Floating_Vectors.Vector(rhs'range) := (rhs'range => 0.0); - rank : integer; - - begin - for i in pivots'range loop -- initialize vector of pivots - pivots(i) := i; - end loop; - Initialize(tableau,lastcol,rhs,sol,tol,pivots,cosis,feasi); - if feasi - then - if Norm(rhs,rhs'first+1) > tol -- check whether residual > 0 - then - if tableau'first(1)+1 > lastcol - then feasi := false; - else - rank := 1; - for i in tableau'first(1)+1..tableau'last(1) loop - Next(tableau,lastcol,rhs,sol,cosis,pivots,tol,i,feasi); - exit when not feasi; - exit when (i = lastcol); - rank := rank + 1; - exit when (Norm(rhs,i+1) < tol); - end loop; - if feasi - then Solve(tableau,rhs,tol,rank,sol); - end if; - end if; - end if; - if feasi and then (tableau'last(1) > lastcol) - then feasi := (Norm(rhs,lastcol+1) < tol); - end if; - if feasi and then (Norm(sol) < tol) - then feasi := (Norm(rhs) < tol); - end if; - solution := sol; - if tableau'last(1) <= lastcol - then - for i in tableau'range(1) loop - columns(i) := pivots(i); - end loop; - else - for i in tableau'first(2)..lastcol loop - columns(i) := pivots(i); - end loop; - end if; - end if; - feasible := feasi; - end Complementary_Slackness1; - - -- procedure Complementary_Slackness_the_Original - procedure Complementary_Slackness - ( tableau : in out Matrix; lastcol : in integer; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - -- NOTE : - -- This version enumerates in a lexicographic order all candidates for - -- entering the basis and stops when a feasible solution has been found. - - feasi : boolean; - pivots : Standard_Integer_Vectors.Vector(tableau'first(2)..lastcol); - sol : Standard_Floating_Vectors.Vector(rhs'range) := (rhs'range => 0.0); - ind,rank : integer; - - begin - for i in pivots'range loop -- initialize vector of pivots - pivots(i) := i; - end loop; - Initialize(tableau,lastcol,rhs,sol,tol,pivots,feasi); - if feasi - then - if Norm(rhs,rhs'first+1) > tol -- check whether residual > 0 - then - if tableau'first(1)+1 > lastcol - then feasi := false; - else - ind := tableau'first(1)+1; - Next(tableau,lastcol,rhs,sol,pivots,tol,ind,rank,feasi); - if feasi - then Solve(tableau,rhs,tol,rank,sol); - end if; - end if; - end if; - if feasi and then (tableau'last(1) > lastcol) - then feasi := (Norm(rhs,lastcol+1) < tol); - end if; - if feasi and then (Norm(sol) < tol) - then feasi := (Norm(rhs) < tol); - end if; - solution := sol; - if tableau'last(1) <= lastcol - then - for i in tableau'range(1) loop - columns(i) := pivots(i); - end loop; - else - for i in tableau'first(2)..lastcol loop - columns(i) := pivots(i); - end loop; - end if; - end if; - feasible := feasi; - end Complementary_Slackness; - -- end Complementary_Slackness_the_Original; - - procedure Complementary_Slackness2 - ( tableau : in out Matrix; lastcol : in integer; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - -- NOTE : - -- This version explicitly uses linear programming. - - begin - Is_In_Cone(tableau,lastcol,rhs,tol,solution,columns,feasible); - end Complementary_Slackness2; - - procedure Complementary_Slackness_the_New - ( tableau : in out Matrix; lastcol : in integer; - rhs : in out Standard_Floating_Vectors.Vector; - tol : in double_float; - solution : out Standard_Floating_Vectors.Vector; - columns : out Standard_Integer_Vectors.Vector; - feasible : out boolean ) is - - begin - if rhs(rhs'last) > 0.0 - then - declare - n : constant natural := tableau'last(1)-1; - m : constant natural := lastcol; - lincff : Standard_Floating_Matrices.Matrix(1..n,1..m); - difrhs : Standard_Floating_Vectors.Vector(1..m); - sol : Standard_Floating_Vectors.Vector(1..n+1); - fail : boolean; - begin - columns := (columns'range => 0); - solution := (solution'range => 0.0); - for j in 1..m loop - difrhs(j) := tableau(n+1,j)+abs(Random); --*10.0**(-8); - for i in 1..n loop - lincff(i,j) := tableau(i,j) - rhs(i); - end loop; - end loop; - Linear_Minimization.Feasible(n,m,lincff,difrhs,tol,sol,fail); - feasible := fail; - end; - else - -- Complementary_Slackness_the_Original - Complementary_Slackness - (tableau,lastcol,rhs,tol,solution,columns,feasible); --- declare --- n : constant natural := tableau'last(1); --- m : constant natural := lastcol+1; --- lincff : Standard_Floating_Matrices.Matrix(1..n,1..m); --- difrhs : Standard_Floating_Vectors.Vector(1..m); --- sol : Standard_Floating_Vectors.Vector(1..n+1); --- fail : boolean; --- begin --- columns := (columns'range => 0); --- solution := (solution'range => 0.0); --- for j in 1..m-1 loop --- difrhs(j) := abs(Random); --*10.0**(-8); --- for i in 1..n loop --- lincff(i,j) := tableau(i,j); --- end loop; --- end loop; --- difrhs(m) := abs(Random); --- for i in 1..n-1 loop --- lincff(i,m) := 0.0; --- end loop; --- lincff(n,m) := 1.0; --- Linear_Minimization.Feasible(n,m,lincff,difrhs,tol,sol,fail); --- feasible := fail; --- end; - end if; - end Complementary_Slackness_the_New; - -end Floating_Linear_Inequalities; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Supports/integer_faces_of_polytope_io.adb phcpack-2.4.85/src/Ada/Math_Lib/Supports/integer_faces_of_polytope_io.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Supports/integer_faces_of_polytope_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Supports/integer_faces_of_polytope_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ -with integer_io; use integer_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_integer_VecVecs; use Standard_integer_VecVecs; with Standard_integer_VecVecs_io; use Standard_integer_VecVecs_io; @@ -11,7 +12,7 @@ procedure put ( file : in file_type; f : in Face ) is begin - put(file," spanned by "); put(file,f.all'length,1); + put(file," spanned by "); put(file,integer32(f.all'length),1); put_line(file," points :"); put(file,f.all); end put; @@ -22,7 +23,7 @@ procedure put ( file : in file_type; f : in Faces ) is - cnt : natural := 0; + cnt : integer32 := 0; tmp : Faces := f; begin @@ -41,9 +42,9 @@ procedure put ( file : in file_type; f : in Array_of_Faces ) is begin for i in f'range loop - if not Is_Null(f(i)) - then put(file,"faces at component "); put(file,i,1); - put_line(file," :"); put(file,f(i)); + if not Is_Null(f(i)) then + put(file,"faces at component "); put(file,i,1); + put_line(file," :"); put(file,f(i)); end if; end loop; end put; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Supports/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Supports/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Supports/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Supports/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Support sets, polytopes, and linear-inequality systems in PHCv2.3.91 +Support sets, polytopes, and linear-inequality systems in PHCv2.4.85 New in release 2 is the usage of Ada 95 concepts to build the lists. Reverse search is added in release 2.1 to enumerate vertices and facets. @@ -9,6 +9,11 @@ 2) data structures for support sets and faces of polytopes. The algorithms are independent from the data structures. +Run "gprbuild supports.gpr" to make all test programs. +On windows, type "gprbuild supports.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean supports.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Supports/supports.gpr phcpack-2.4.85/src/Ada/Math_Lib/Supports/supports.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Supports/supports.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Supports/supports.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,41 @@ +project supports is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Circuits"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD", "../Vectors", "../Matrices", + "../Reduction", "../Supports", "../Polynomials", + "../Circuits"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_basex.adb", -- tests basis exchanges + "ts_feasi.adb", -- tests linear minimization + reverse search + "ts_enurs.adb", -- tests enumeration by reverse research + "ts_diclp.adb", -- tests dictionaries and linear programming + "ts_givrot.adb", -- tests givens rotations + "ts_lstvec.adb" -- tests lists of links to vectors + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end supports; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Supports/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Supports/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Supports/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Supports/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Tue 15 Jun 2021 : fixed integer_faces_of_polytope_io.adb. + +Thu 10 Jun 2021 : added the exec_dir attribute to supports.gpr. + +Tue 8 Jun 2021 : defined supports.gpr to build the test procedures. + Mon 4 Aug 2014 : new instantiations {dobl,quad}dobl_complex_veclists and io. Thu 13 Jun 2013 : updated integer_support_functions for integer32. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Mon 14 Jun 2021 : added math_lib.gpr to build all test procedures. + +Sat 20 Mar 2021 : new folder Laurent added for Laurent series. + Sat 15 Dec 2018 : added new directory AD. Tue 7 Jun 2016 : added new directory Series. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Vectors/READ_ME phcpack-2.4.85/src/Ada/Math_Lib/Vectors/READ_ME --- phcpack-2.4.84/src/Ada/Math_Lib/Vectors/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Vectors/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Vectors and vectors of vectors in PHCv2.4.81 +Vectors and vectors of vectors in PHCv2.4.85 Because the directory Matrices became too big, this directory was created new for PHCv2.3.33. @@ -20,6 +20,10 @@ Instantiations for vectors in triple, penta, octo, and deca double precisions were added. +Run "gprbuild vectors.gpr" to make all test programs. +On windows, type "gprbuild vectors.gpr -Xos=windows" at the PowerShell prompt. +The "gprclean vectors.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -154,6 +158,9 @@ octodobl_random_vectors : vectors of random octo doubles decadobl_random_vectors : vectors of random deca doubles ------------------------------------------------------------------------------ +standard_floating_vecvecvecs : vectors of vectors of floating vectors +standard_complex_vecvecvecs : vectors of vectors of complex vectors +------------------------------------------------------------------------------ varbprec_vecvec_conversions : conversions between vecvecs of varb prcs ------------------------------------------------------------------------------ test_natural_vectors : tests vectors of natural numbers diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.adb phcpack-2.4.85/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.adb --- phcpack-2.4.84/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,86 @@ +with unchecked_deallocation; +with Standard_Complex_Numbers; +with Standard_Complex_Vectors; + +package body Standard_Complex_VecVecVecs is + + procedure Allocate ( v : out Link_to_VecVecVec; + d1first,d1last : in integer32; + d2first,d2last : in integer32; + d3first,d3last : in integer32 ) is + + res : Standard_Complex_VecVecVecs.VecVecVec(d1first..d1last); + zero : constant Standard_Complex_Numbers.Complex_Number + := Standard_Complex_Numbers.Create(0.0); + + begin + for k in res'range loop + declare + vv : Standard_Complex_VecVecs.VecVec(d2first..d2last); + begin + for j in vv'range loop + declare + vvv : constant Standard_Complex_Vectors.Vector(d3first..d3last) + := (d3first..d3last => zero); + begin + vv(j) := new Standard_Complex_Vectors.Vector'(vvv); + end; + end loop; + res(k) := new Standard_Complex_VecVecs.VecVec'(vv); + end; + end loop; + v := new Standard_Complex_VecVecVecs.VecVecVec'(res); + end Allocate; + + procedure Copy ( v_from : in Link_to_VecVecVec; + v_to : out Link_to_VecVecVec ) is + + use Standard_Complex_VecVecs; + + begin + Clear(v_to); + if v_from /= null then + declare + pwt : VecVecVec(v_from'range); + begin + for k in v_from'range loop + if v_from(k) /= null then + declare + vv : Standard_Complex_VecVecs.VecVec(v_from(k)'range); + begin + Standard_Complex_VecVecs.Copy(v_from(k).all,vv); + pwt(k) := new Standard_Complex_VecVecs.VecVec'(vv); + end; + end if; + end loop; + v_to := new VecVecVec'(pwt); + end; + end if; + end Copy; + + procedure Clear ( v : in out VecVecVec ) is + begin + for k in v'range loop + Standard_Complex_VecVecs.Deep_Clear(v(k)); + end loop; + end Clear; + + procedure Clear ( v : in out Link_to_VecVecVec ) is + + procedure free is new unchecked_deallocation(VecVecVec,Link_to_VecVecVec); + + begin + if v /= null then + Clear(v.all); + free(v); + end if; + end Clear; + + procedure Clear ( v : in out VecVecVec_Array ) is + begin + for k in v'range loop + Clear(v(k)); + end loop; + end Clear; + +end Standard_Complex_VecVecVecs; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.ads phcpack-2.4.85/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.ads --- phcpack-2.4.84/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.ads 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Vectors/standard_complex_vecvecvecs.ads 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,43 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Complex_VecVecs; + +package Standard_Complex_VecVecVecs is + +-- DESCRIPTION : +-- A VecVecVec is a three dimensional data structure of vectors +-- of vectors of vectors of complex numbers in double precision. + + type VecVecVec is + array ( integer32 range <> ) of Standard_Complex_VecVecs.Link_to_VecVec; + + type Link_to_VecVecVec is access VecVecVec; + + type VecVecVec_Array is array ( integer32 range <> ) of Link_to_VecVecVec; + + procedure Allocate ( v : out Link_to_VecVecVec; + d1first,d1last : in integer32; + d2first,d2last : in integer32; + d3first,d3last : in integer32 ); + + -- DESCRIPTION : + -- Allocates a three dimensional matrix of complex numbers, + -- with leading dimension in the range d1first..d1last, + -- the second dimension has the range d2first..d2last, and + -- the third dimension has the range d3first..d3last. + -- All numbers in v are initialized to zero. + + procedure Copy ( v_from : in Link_to_VecVecVec; + v_to : out Link_to_VecVecVec ); + + -- DESCRIPTION : + -- Copies the v_from to the v_to, + -- after the deallocation of v_to. + + procedure Clear ( v : in out VecVecVec ); + procedure Clear ( v : in out Link_to_VecVecVec ); + procedure Clear ( v : in out VecVecVec_Array ); + + -- DESCRIPTION : + -- Deallocates the space occupied by v. + +end Standard_Complex_VecVecVecs; diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Vectors/UPDATES phcpack-2.4.85/src/Ada/Math_Lib/Vectors/UPDATES --- phcpack-2.4.84/src/Ada/Math_Lib/Vectors/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Vectors/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to vectors.gpr. + +Tue 8 Jun 2021 : defined vectors.gpr to build the test procedures. + +Sat 20 Mar 2021 : new package standard_complex_vecvecvecs. + Sat 24 Oct 2020 : new packages {tripdobl,pentdobl,octodobl,decadobl}_vector_ splitters with memory allocators. diff -Nru phcpack-2.4.84/src/Ada/Math_Lib/Vectors/vectors.gpr phcpack-2.4.85/src/Ada/Math_Lib/Vectors/vectors.gpr --- phcpack-2.4.84/src/Ada/Math_Lib/Vectors/vectors.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Math_Lib/Vectors/vectors.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,45 @@ +project vectors is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../Numbers", "../QD"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../Numbers", "../QD"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_natvec.adb", -- test natural vectors + "ts_intvec.adb", -- test integer vectors + "ts_fltvec.adb", -- test floating-point vectors + "ts_cmpvec.adb", -- test complex vectors + "ts_strvec.adb", -- test vectors in strings + "ts_nesvec.adb", -- test nested vectors + "ts_ddvec.adb", -- test vectors of double doubles + "ts_qdvec.adb", -- test vectors of quad doubles + "ts_tdvec.adb", -- test vectors of triple doubles + "ts_pdvec.adb", -- test vectors of penta doubles + "ts_odvec.adb", -- test vectors of octo doubles + "ts_davec.adb", -- test vectors of deca doubles + "ts_perfddvc.adb", -- test dd vector performance + "ts_perfqdvc.adb" -- test qd vector performance + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end vectors; diff -Nru phcpack-2.4.84/src/Ada/READ_ME phcpack-2.4.85/src/Ada/READ_ME --- phcpack-2.4.84/src/Ada/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Ada source code of Polynomial Homotopy Continuation version 2.4.84 +Ada source code of Polynomial Homotopy Continuation version 2.4.85 The same hierarchical structure as in the original version is preserved, with the addition of numerical Schubert calculus in release 2, @@ -32,6 +32,8 @@ Version 2.4.76 provided multitasked Newton-Fabry-Pade-Hesse trackers. Multiple double arithmetic with code generated by the CAMPARY software was introduced in v2.4.80 extending the Math_Lib/QD folder. +The Laurent folder was added to the mathematical library in v2.4.85 and +in CtoPHC, code was redistributed into new folders Types and Structures. The Ada sources are organized in a tree of directories: @@ -49,7 +51,8 @@ | |-- Supports : 1.9. support sets and linear programming | |-- Circuits : 1.A. circuits for algorithmic differentation | |-- Series : 1.B. manipulating truncated series - | |-- AD : 1.C. algorithmic differentiation of Path library + | |-- Laurent : 1.C. series with integer leading exponents + | |-- AD : 1.D. algorithmic differentiation of Path library |-- Deformations : 2. homotopies, Newton's method & path trackers | |-- Solutions : 2.1. solutions of systems and homotopies | |-- Homotopy : 2.2. homotopies, scaling and reduction @@ -81,11 +84,13 @@ | |-- Solver : 5.5. incremental equation by equation solver | |-- Tropical : 5.6. tropical view on witness sets |-- CtoPHC : 6. interface from C to phc - | |-- Funky : 6.1. functional interface, C -> Ada -> C - | |-- State : 6.2. state machine gateway, C <-> Ada + | |-- Types : 6.1. C types equivalent to Ada + | |-- Structures : 6.2. system and solution wrappers + | |-- Funky : 6.3. functional interface, C -> Ada -> C + | |-- State : 6.4. state machine gateway, C <-> Ada |-- PHCtoC : 7. GPU acceleration via a C interface |-- Tasking : 8. multitasking - |-- Main : 9. main dispatcher + |-- Main : 9. the main programs To create the executable version, do cd ../Objects and type make phc. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/binomials.gpr phcpack-2.4.85/src/Ada/Root_Counts/Binomials/binomials.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/binomials.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/binomials.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,56 @@ +project binomials is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../Implift", "../Stalift", "../Dynlift", + "../../Schubert/SAGBI"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../Implift", "../Stalift", "../Dynlift", + "../../Schubert/SAGBI"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_binsys.adb", -- tests binomial solvers + "ts_simsys.adb", -- tests simplex systems + "ts_simposol.adb", -- tests simpomial solvers + "ts_cspsol.adb", -- solving initial cell systems efficiently + "ts_powtrans.adb", -- tests the power transformations + "ts_binpser.adb", -- tests Puiseux series + "ts_kernel.adb", -- tests kernel calculations + "ts_unimod.adb", -- tests unimodular exponent transformations + "ts_incols.adb", -- tests column span tests + "ts_binset.adb", -- tests binomial varieties + "ts_binsol.adb", -- tests affine solution sets of binomials + "ts_monmap.adb", -- tests monomial maps + "ts_mapsubs.adb" -- tests map substitution + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end binomials; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/power_transformations.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/power_transformations.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/power_transformations.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/power_transformations.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,164 +0,0 @@ -with Standard_Common_Divisors; use Standard_Common_Divisors; - -package body Power_Transformations is - - function Identity_Matrix ( n : natural ) return Matrix is - - res : Matrix(1..n,1..n); - - begin - for i in 1..n loop - for j in 1..n loop - if i = j - then res(i,j) := 1; - else res(i,j) := 0; - end if; - end loop; - end loop; - return res; - end Identity_Matrix; - - function Pivot ( v : Vector ) return integer is - begin - for i in v'range loop - if v(i) /= 0 - then return i; - end if; - end loop; - return v'first-1; - end Pivot; - - function Pivot ( v : Vector; i : integer ) return integer is - begin - for k in i..v'last loop - if v(k) /= 0 - then return k; - end if; - end loop; - return v'last + 1; - end Pivot; - - function Rotate ( v : Vector; i : integer ) return Matrix is - - n : constant natural := v'last; - t : Matrix(1..n,1..n) := Identity_Matrix(n); - res : Matrix(1..n,1..n); - w : Vector(v'range); - j,a,b,ka,lb,d : integer; - - begin - if v(i) = 0 then - return t; - else - w := v; res := t; - loop - j := 0; - for k in w'range loop - if (w(k) /= 0) and (k /= i) - then j := k; - end if; - exit when j /= 0; - end loop; - if j /= 0 then - a := w(i); b := w(j); - gcd(a,b,ka,lb,d); - a := a/d; b := b/d; - t(i,i) := ka; t(i,j) := lb; - t(j,i) := -b; t(j,j) := a; - w := t*w; - res := t*res; - t(i,i) := 1; t(j,j) := 1; - t(i,j) := 0; t(j,i) := 0; - end if; - exit when j = 0; - end loop; - return res; - end if; - end Rotate; - - function Eliminate ( v : Vector; i : integer ) return Matrix is - - n : constant natural := v'last; - t : Matrix(1..n,1..n) := Identity_Matrix(n); - res : Matrix(1..n,1..n) := t; - w : Vector(v'range) := v; - j1,j2,a,b,ka,lb,d : integer; - ind : integer := Pivot(v,i); - zeroes : boolean; - - begin - if ind = v'last + 1 then - return res; - else - if v(i) = 0 then - res(i,i) := 0; res(i,ind) := 1; - res(ind,i) := 1; res(ind,ind) := 0; - w(i) := w(ind); w(ind) := 0; - end if; - for k in v'first..i loop - if w(k) /= 0 - then j1 := k; exit; - end if; - end loop; - if j1 /= i then - zeroes := false; - loop - for k in (j1+1)..i loop - if w(k) /= 0 - then j2 := k; exit; - end if; - end loop; - a := w(j1); b := w(j2); - gcd(a,b,ka,lb,d); - a := a/d; b := b/d; - t(j1,j1) := lb; t(j1,j2) := -ka; - t(j2,j1) := a; t(j2,j2) := b; - w(j2) := d; - res := t*res; - t(j1,j1) := 1; t(j2,j2) := 1; - t(j1,j2) := 0; t(j2,j1) := 0; - if j2 < i - then j1 := j2; - else exit; - end if; - end loop; - else - zeroes := true; - end if; - for k in reverse i..v'last loop - if w(k) /= 0 - then j2 := k; exit; - end if; - end loop; - if j2 /= i then - loop - for k in reverse i..(j2-1) loop - if w(k) /= 0 - then j1 := k; exit; - end if; - end loop; - a := w(j1); b := w(j2); - gcd(a,b,ka,lb,d); - a := a/d; b := b/d; - t(j1,j1) := a; t(j1,j2) := b; - t(j2,j1) := -lb; t(j2,j2) := ka; - w(j1) := d; - res := t*res; - t(j1,j1) := 1; t(j2,j2) := 1; - t(j1,j2) := 0; t(j2,j1) := 0; - if j1 > i - then j2 := j1; - else exit; - end if; - end loop; - elsif zeroes then - if w(i) < 0 then - t(i,i) := -1; - res := t*res; - end if; - end if; - return res; - end if; - end Eliminate; - -end Power_Transformations; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/power_transformations.ads phcpack-2.4.85/src/Ada/Root_Counts/Binomials/power_transformations.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/power_transformations.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/power_transformations.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -with Standard_Integer_Vectors; use Standard_Integer_Vectors; -with Standard_Integer_Matrices; use Standard_Integer_Matrices; - -package Power_Transformations is - --- DESCRIPTION : --- This package provides functions to form the unimodular matrices --- to represent the power transformations. Power transformations --- operate in the space of the powers of a Laurent polynomial system. - - function Identity_Matrix ( n : natural ) return Matrix; - - -- DESCRIPTION : - -- Returns the n-by-n identity matrix. - - function Pivot ( v : Vector ) return integer; - - -- DESCRIPTION : - -- Returns v'first - 1 if the vector is zero, - -- otherwise the first nonzero element in v is returned. - - function Pivot ( v : Vector; i : integer ) return integer; - - -- DESCRIPTION : - -- Returns the first nonzero v(k) for k in i..v'last. - -- If there is no such k, then v'last + 1 is returned. - - function Rotate ( v : Vector; i : integer ) return Matrix; - - -- DESCRIPTION : - -- Returns a unimodular transformation to reduce v to d times - -- the i-th standard unit vector, where d is gcd(v). - -- This coordinate transformation rotates a vector into - -- a direction parallel to a coordinate axis. - - -- REQUIRED : v(i) /= 0, ensured by i = Pivot(v). - - function Eliminate ( v : Vector; i : integer ) return Matrix; - - -- DESCRIPTION : - -- Returns a unimodular coordinate transformation to eliminate - -- the i-th coordinate using a nonzero vector v. - -- Applying the transformation to exponents will result - -- in the same degree for the i-th coordinate for all points - -- that make the same inner product with the vector v. - -- Because of this property, we may divide out the i-th variable - -- from all points that span the face with inner normal v. - - -- REQUIRED : v(i) /= 0, ensured by i = Pivot(v). - -end Power_Transformations; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Binomials/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Solvers for binomial and simplex systems in PHCv2.4.79 +Solvers for binomial and simplex systems in PHCv2.4.85 Systems with exactly two monomials in every equation are called "binomial". Systems in n variables with no more than n+1 monomials (eventually after @@ -23,6 +23,11 @@ developed jointly with Danko Adrovic. Version 2.3.68 extended phc -b with a new solver, developed in this directory with ts_binset. +Run "gprbuild binomials.gpr" to make all test programs. +On windows, type "gprbuild binomials.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean binomials.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_monomial_map_substitutors.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_monomial_map_substitutors.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_monomial_map_substitutors.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_monomial_map_substitutors.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,4 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Numbers; use Standard_Complex_Numbers; with Standard_Integer_Vectors; @@ -25,7 +26,7 @@ res : Laur_Sys(p'range); f : Poly; - cnt : integer := p'first - 1; + cnt : integer32 := p'first - 1; begin for i in p'range loop diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,369 +0,0 @@ -with text_io; use text_io; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Integer_Matrices; -with Standard_Complex_Vectors; -with Standard_Complex_Matrices; -with Standard_Complex_Polynomials; -with Standard_Complex_Laurentials; -with Standard_Fewnomial_Systems; use Standard_Fewnomial_Systems; -with Standard_Fewnomial_Solvers; use Standard_Fewnomial_Solvers; - -package body Standard_Sparse_Solvers is - --- AUXILIARY ROUTINES : - - function Is_Fewnomial_System - ( p : Poly_Sys; nq,nv : natural ) return boolean is - - -- DESCRIPTION : - -- Parses the system p and returns true if it is fewnomial. - - -- ON ENTRY : - -- p polynomial system; - -- nq number of equations in p; - -- nv number of variables in p. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - fail : boolean; - - begin - Parse(p,nv,A,C,b,fail); - return not fail; - end Is_Fewnomial_System; - - function Is_Fewnomial_System - ( p : Laur_Sys; nq,nv : natural ) return boolean is - - -- DESCRIPTION : - -- Parses the system p and returns true if it is fewnomial. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - fail : boolean; - - begin - Parse(p,nv,A,C,b,fail); - return not fail; - end Is_Fewnomial_System; - - procedure Parse_and_Solve - ( p : in Poly_Sys; nq,nv : in natural; tol : in double_float; - sols : out Solution_List; fail,zero_y : out boolean ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance for deciding when a number is zero. - - -- ON RETURN : - -- sols solution of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if no solutions with all components unequal zero. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - info : integer; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,info,sols); - end if; - exception - when others => put_line("exception raised in Parse_and_Solve..."); - raise; - end Parse_and_Solve; - - procedure Parse_and_Solve - ( p : in Poly_Sys; nq,nv : in natural; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance used to decide whether a number is zero. - - -- ON RETURN : - -- rcond estimate for inverse of the condition number of - -- the coefficients matrix of p, only if fewnomial; - -- sols solutions of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if p has no solutions with all components unequal zero. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,rcond,sols); - end if; - exception - when others => put_line("exception raised in Parse_and_Solve..."); - put("rcond = "); put(rcond,3); new_line; - raise; - end Parse_and_Solve; - - procedure Parse_and_Solve - ( p : in Poly_Sys; nq,nv : in natural; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance to decide whether a number is zero. - - -- ON RETURN : - -- sols solution of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if p has no solutions with all components unequal zero; - -- rsum sum of the residuals. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,rcond,sols); - rsum := Sum_Residuals(A,C,b,sols); - else rsum := 1.0; - end if; - end Parse_and_Solve; - - procedure Parse_and_Solve - ( p : in Laur_Sys; nq,nv : in natural; tol : in double_float; - sols : out Solution_List; fail,zero_y : out boolean ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance to decide whether a number is zero. - - -- ON RETURN : - -- sols solution of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if p has no solution with all components unequal zero. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - info : integer; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,info,sols); - end if; - end Parse_and_Solve; - - procedure Parse_and_Solve - ( p : in Laur_Sys; nq,nv : in natural; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance to decide whether a number is zero. - - -- ON RETURN : - -- rcond estimate for the inverse of the condition number of - -- the coefficient matrix of p, only if it is fewnomial; - -- sols solution of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if p has no solutions with all components unequal zero. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,rcond,sols); - end if; - end Parse_and_Solve; - - procedure Parse_and_Solve - ( p : in Laur_Sys; nq,nv : in natural; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ) is - - -- DESCRIPTION : - -- Parses the system and returns its solutions if it is fewnomial, - -- otherwise fail equals true on return. - - -- ON ENTRY : - -- p Laurent polynomial system; - -- nq number of equations in p; - -- nv number of variables in p; - -- tol tolerance to decide whether a number is zero. - - -- ON RETURN : - -- sols solution of p if it is fewnomial; - -- fail true if p is not fewnomial; - -- zero_y true if p has no solutions with all components unequal zero; - -- rsum sum of the residuals. - - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - C : Standard_Complex_Matrices.Matrix(1..nq,1..nq); - b : Standard_Complex_Vectors.Vector(1..nq); - r : natural; - - begin - Parse(p,nv,A,C,b,fail); - if not fail - then Solve(A,C,b,tol,zero_y,r,rcond,sols); - rsum := Sum_Residuals(A,C,b,sols); - else rsum := 1.0; - end if; - end Parse_and_Solve; - --- TARGET ROUTINES : - - function Is_Fewnomial_System ( p : Poly_Sys ) return boolean is - - use Standard_Complex_Polynomials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - return Is_Fewnomial_System(p,nq,nv); - end Is_Fewnomial_System; - - function Is_Fewnomial_System ( p : Laur_Sys ) return boolean is - - use Standard_Complex_Laurentials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - return Is_Fewnomial_System(p,nq,nv); - end Is_Fewnomial_System; - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - sols : out Solution_List; - fail,zero_y : out boolean ) is - - use Standard_Complex_Polynomials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,sols,fail,zero_y); - end Solve; - - procedure Solve ( p : in Laur_Sys; tol : in double_float; - sols : out Solution_List; - fail,zero_y : out boolean ) is - - use Standard_Complex_Laurentials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,sols,fail,zero_y); - end Solve; - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean ) is - - use Standard_Complex_Polynomials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,rcond,sols,fail,zero_y); - end Solve; - - procedure Solve ( p : in Laur_Sys; tol : in double_float; - rcond : out double_float; - sols : out Solution_List; - fail,zero_y : out boolean ) is - - use Standard_Complex_Laurentials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,rcond,sols,fail,zero_y); - end Solve; - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ) is - - use Standard_Complex_Polynomials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,rcond,sols,fail,zero_y,rsum); - end Solve; - - procedure Solve ( p : in Laur_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ) is - - use Standard_Complex_Laurentials; - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - - begin - Parse_and_Solve(p,nq,nv,tol,rcond,sols,fail,zero_y,rsum); - end Solve; - -end Standard_Sparse_Solvers; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.ads phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/standard_sparse_solvers.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; - -package Standard_Sparse_Solvers is - --- DESCRIPTION : --- This package provides drivers to the fewnomial system solvers. - - function Is_Fewnomial_System ( p : Poly_Sys ) return boolean; - function Is_Fewnomial_System ( p : Laur_Sys ) return boolean; - - -- DESCRIPTION : - -- Returns true if the given system is a fewnomial system, - -- i.e.: it has fewer than n+1 distinct monomials, - -- eventually after shifting monomials by division. - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - sols : out Solution_List; - fail,zero_y : out boolean ); - procedure Solve ( p : in Laur_Sys; tol : in double_float; - sols : out Solution_List; - fail,zero_y : out boolean ); - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean ); - procedure Solve ( p : in Laur_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean ); - - procedure Solve ( p : in Poly_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ); - procedure Solve ( p : in Laur_Sys; tol : in double_float; - rcond : out double_float; sols : out Solution_List; - fail,zero_y : out boolean; rsum : out double_float ); - - -- DESCRIPTION : - -- Returns all solutions of p if p is a fewnomial system, - -- otherwise false is returned. - - -- ON ENTRY : - -- p a polynomial system; - -- tol tolerance to decide whether the modulus of a complex - -- number is small enough to be considered as zero. - - -- ON RETURN : - -- sols solutions to p if p is a fewnomial system; - -- rcond estimate for inverse of condition number of the - -- condition number of p, only meaningful if not fail; - -- fail true if p is not a fewnomial system; - -- zero_y true if the intermediate linear system has a solution with - -- at least one component equal to zero, which implies that - -- the system can have no solutions with all components - -- different from zero, otherwise zero_y is false on return; - -- rsum sum of all residuals of the solutions at p. - -end Standard_Sparse_Solvers; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_binpser.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_binpser.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_binpser.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_binpser.adb 2021-06-30 23:22:40.000000000 +0000 @@ -239,7 +239,7 @@ put(" give the number of equations : "); get(nq); -- put(" give the number of variables : "); get(nv); nv := nq + 1; - put("-> the number of variabes is "); put(nv,1); new_line; + put("-> the number of variables is "); put(nv,1); new_line; lp := new Poly_Sys'(Create_Random_Binomial_System(nq,nv)); else put_line("Reading a polynomial system..."); diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_binwit.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_binwit.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_binwit.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_binwit.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Communications_with_User; use Communications_with_User; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with Standard_Integer_Norms; -with Standard_Floating_Vectors; -with Standard_Floating_Vectors_io; use Standard_Floating_Vectors_io; -with Standard_Complex_Vectors; -with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; -with Standard_Integer_Matrices; use Standard_Integer_Matrices; -with Standard_Integer_Matrices_io; use Standard_Integer_Matrices_io; -with Standard_Random_Vectors; use Standard_Random_Vectors; -with Standard_Random_Matrices; use Standard_Random_Matrices; -with Standard_Integer_Linear_Solvers; use Standard_Integer_Linear_Solvers; -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Standard_Complex_Solutions_io; use Standard_Complex_Solutions_io; -with Standard_Binomial_Systems; use Standard_Binomial_Systems; -with Standard_Binomial_Solvers; use Standard_Binomial_Solvers; -with Standard_Radial_Solvers; use Standard_Radial_Solvers; - -procedure ts_binwit is - --- DESCRIPTION : --- Interactive development of binomial system solver. --- The key operation is the calculation of the Hermite normal form. - - function Rank_Upper ( U : Matrix ) return natural is - - -- DESCRIPTION : - -- Given an upper triangular matrix, returns its rank. - - res : natural := 0; - pivot : integer := U'first(2); - - begin - for i in U'range(1) loop - while pivot <= U'last(2) and then U(i,pivot) = 0 loop - pivot := pivot + 1; - end loop; - exit when pivot > U'last(2); - res := i; - end loop; - return res; - end Rank_Upper; - - procedure Normalize_Sign ( v : in out Standard_Integer_Vectors.Vector ) is - - -- DESCRIPTION : - -- On return the orientation of the vector v might be changed - -- so the sign of its first nonzero element is positive. - - ispos : boolean := true; - - begin - for i in v'range loop - if v(i) > 0 then - return; - elsif v(i) < 0 then - exit; - end if; - end loop; - Standard_Integer_Vectors.Min(v); - end Normalize_Sign; - - procedure Kernel ( n,k : in natural; A : in Matrix; - r : out natural; V : out Matrix ) is - - -- DESCRIPTION : - -- Computes the kernel of a k-by-n exponent matrix A. - - -- REQUIRED : k < n. - - -- ON ENTRY : - -- n the number of variables or the ambient dimension; - -- k the number of equations or the expected codimension; - -- A a matrix of k rows and n columns. - - -- ON RETURN : - -- r the rank of the matrix is expected to be k; - -- V a matrix of n rows and n-k columns, - -- the columns of V span the kernel of A. - - U : Matrix(A'range(1),A'range(2)) := A; - B : Matrix(A'range(1),A'first(1)..A'last(1)+1); - x : Standard_Integer_Vectors.Vector(B'range(2)); - - begin - Upper_Triangulate(U); - put_line("After triangulation of A :"); put(U); - r := Rank_Upper(U); - put("The rank of the matrix : "); put(r,1); new_line; - for i in B'range(1) loop - for j in B'range(2) loop - B(i,j) := U(i,j); - end loop; - end loop; - for k in V'range(2) loop - for i in B'range(1) loop - B(i,B'last(2)) := U(i,U'last(1)+k); - end loop; - put_line("The matrix B :"); put(B); - Solve0(B,x); - put("The solution x : "); put(x); new_line; - Normalize_Sign(x); - for i in B'range(1) loop - V(i,k) := x(i); - end loop; - for i in B'last(1)+1..V'last(1) loop - V(i,k) := 0; - end loop; - V(B'last(1)+k,k) := x(x'last); - end loop; - end Kernel; - - procedure Compute_Kernel ( n,k : in natural ) is - - -- DESCRIPTION : - -- Prompts for or generates a k-by-n matrix of exponents - -- and computes its kernel. - - -- REQUIRED : k < n. - - -- ON ENTRY : - -- n the number of variables or the ambient dimension; - -- k the number of equations or the expected codimension. - - A : Matrix(1..k,1..n); - V : Matrix(1..n,1..n-k); - r : natural; - lower,upper : integer; - ans : character; - - begin - put("Generate a random matrix ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'y' then - put(" give lower bound for exponents : "); get(lower); - put(" give upper bound for exponents : "); get(upper); - A := Random_Matrix(k,n,lower,upper); - put("-> a random "); put(k,1); put("-by-"); put(n,1); - put_line(" matrix :"); put(A); - else - put("-> give a "); put(k,1); put("-by-"); put(n,1); - put_line(" matrix "); get(A); - end if; - Kernel(n,k,A,r,V); - put_line("The kernel : "); put(V); - put_line("The residuals : "); put(A*V); - end Compute_Kernel; - - function Max_Delta ( x,y : Standard_Floating_Vectors.Vector ) - return double_float is - - -- DESCRIPTION : - -- Returns the maximal component of the difference x - y. - - res : double_float := abs(x(x'first) - y(y'first)); - dif : double_float; - - begin - for i in x'first+1..x'last loop - dif := abs(x(i) - y(i)); - if dif > res - then res := dif; - end if; - end loop; - return res; - end Max_Delta; - - procedure Radial_Solve - ( A : in Standard_Integer_Matrices.Matrix; - c : in Standard_Complex_Vectors.Vector ) is - - r : constant Standard_Floating_Vectors.Vector(c'range) := Radii(c); - logr : constant Standard_Floating_Vectors.Vector(c'range) := Log10(r); - logx,x,y : Standard_Floating_Vectors.Vector(c'range); - - begin - put_line("The radii of the complex numbers :"); put_line(r); - put_line("The logarithms of the radii :"); put_line(logr); - logx := Radial_Upper_Solve(A,logr); - put_line("The logarithm of the solution : "); put_line(logx); - y := Multiply(A,logx); - put_line("The value A*x :"); put_line(y); - put_line("the logarithms of the radii : "); put_line(logr); - put("The residual : "); put(Max_Delta(y,logr),3); new_line; - x := Exp10(logx); - put_line("The solution x : "); put_line(x); - y := Eval(A,x); - put_line("The value x^A : "); put_line(y); - put_line("The righthand side : "); put_line(r); - put("The residual : "); put(Max_Delta(r,y),3); new_line; - end Radial_Solve; - - procedure Compute_Tropism - ( A : in Standard_Integer_Matrices.Matrix ) is - - -- DESCRIPTION : - -- Computes a tropism to the exponent matrix of a binomial system - -- in the standard format x^A - c = 0. - -- The matrix has as many rows as there are unknowns in x - -- and as many columns as there are equations, therefore - -- we upper triangulate the transpose of the matrix A to - -- compute a binomial tropism. - - B : Matrix(A'range(2),A'range(1)) := Transpose(A); - U : Matrix(A'range(2),A'range(1)) := B; - v : Standard_Integer_Vectors.Vector(A'range(1)); - r : Standard_Integer_Vectors.Vector(A'range(2)); - - begin - Upper_Triangulate(U); - Solve0(U,v); - Standard_Integer_Norms.Normalize(v); - put("A tropism : "); put(v); new_line; - r := B*v; - put("the residual : "); put(r); new_line; - end Compute_Tropism; - - procedure Test_Binomial_Solver - ( A : in Standard_Integer_Matrices.Matrix; - c : in Standard_Complex_Vectors.Vector ) is - - U : Matrix(A'range(1),A'range(2)) := A; - M : Matrix(A'range(1),A'range(1)); - r : natural; - Usols,Asols : Solution_List; - ans : character; - - begin - Compute_Tropism(A); - put("Do you want intermediate output of the solver ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'y' - then Solve(standard_output,A,c,r,M,U,Usols,Asols); - else Solve(A,c,r,M,U,Usols,Asols); - end if; - put("The rank of the matrix is "); put(r,1); put_line("."); - if r < A'last(2) then - put_line("-> system is rank deficient ..."); - else - put("-> the solution set has dimension "); - put(A'last(1)-A'last(2),1); put_line("."); - end if; - if not Is_Null(Usols) then - put_line("The residuals at y^U - c, y = x^M : "); - Write_Residuals(standard_output,U,c,Usols); - put_line("The residuals at x^A - c : "); - Write_Residuals(standard_output,A,c,Asols); - put("Do you want to see the solutions ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'y' - then put(standard_output,Length_Of(Asols),Head_Of(Asols).n,Asols); - end if; - end if; - end Test_Binomial_Solver; - - procedure Test_Solver ( p : in Poly_Sys ) is - - nq : constant natural := p'last; - nv : constant natural := Number_of_Unknowns(p(p'first)); - fail : boolean; - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - c : Standard_Complex_Vectors.Vector(1..nq); - - begin - put("number of equations : "); put(nq,1); new_line; - put("number of variables : "); put(nv,1); new_line; - Parse(p,nq,A,c,fail); - if fail - then put_line("The system is not a binomial system."); - else put_line("The system is a binomial system."); - put_line("The exponent matrix :"); put(A); - put_line("The coefficient vector :"); put_line(c); - Test_Binomial_Solver(A,c); - end if; - end Test_Solver; - - function Create_Random_Binomial_System - ( nq,nv : natural ) return Poly_Sys is - - res : Poly_Sys(1..nq); - A : Standard_Integer_Matrices.Matrix(1..nv,1..nq); - c : constant Standard_Complex_Vectors.Vector(1..nq) - := Random_Vector(1,nq); - lower,upper : integer; - - begin - put(" give lower bound for exponents : "); get(lower); - put(" give upper bound for exponents : "); get(upper); - A := Random_Matrix(nv,nq,lower,upper); - put_line("The exponent matrix : "); put(A); - put_line("The coefficient vector : "); put_line(c); - res := Create(A,c); - put_line("The binomial system : "); put(res); - return res; - end Create_Random_Binomial_System; - - procedure Read_and_Test_Binomial_Solver ( n : in natural ) is - - A : Standard_Integer_Matrices.Matrix(1..n,1..n); - c : Standard_Complex_Vectors.Vector(1..n); - - begin - put("Give an "); put(n,1); put("-by-"); put(n,1); - put_line(" exponent matrix : "); get(A); - put("Give an "); put(n,1); - put_line("-vector for righthand side :"); get(c); - put_line("The exponent matrix is "); put(A); - put_line("The coefficient vector is "); put_line(c); - Radial_Solve(A,c); - -- Test_Binomial_Solver(A,c); - end Read_and_Test_Binomial_Solver; - - procedure Main is - - lp : Link_to_Poly_Sys; - ans : character; - nq,nv : natural; - - begin - new_line; - put_line("Creating witness sets for binomial systems."); - new_line; - put_line("MENU for testing the operations on binomial systems :"); - put_line(" 1. compute kernel of an exponent matrix;"); - put_line(" 2. create and solve a random binomial system;"); - put_line(" 3. give a polynomial system to test the solver;"); - put_line(" 4. give a system x^A = b to test the solver."); - put("Type 1, 2, 3, or 4 to select : "); - Ask_Alternative(ans,"1234"); - new_line; - if ans = '1' then - put_line("Computing the kernel of an exponent matrix..."); - put(" give the number of equations : "); get(nq); - put(" give the number of variables : "); get(nv); - Compute_Kernel(nv,nq); - elsif ans = '4' then - put("Give the dimension of the system : "); get(nq); - Read_and_Test_Binomial_Solver(nq); - else - if ans = '2' then - put_line("Creating a random binomial system..."); - put(" give the number of equations : "); get(nq); - put(" give the number of variables : "); get(nv); - lp := new Poly_Sys'(Create_Random_Binomial_System(nq,nv)); - else - put_line("Reading a binomial system..."); - get(lp); - end if; - Test_Solver(lp.all); - end if; - end Main; - -begin - Main; -end ts_binwit; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_cspsol.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_cspsol.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_cspsol.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_cspsol.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; with Standard_Complex_Numbers; @@ -52,7 +56,7 @@ first := Head_Of(s(i)); second := Head_Of(Tail_Of(s(i))); for j in A'range(2) loop - A(i,j) := integer(first(j)) - integer(second(j)); + A(i,j) := integer32(first(j)) - integer32(second(j)); end loop; b(i) := (-c(i)(1))/c(i)(2); end loop; @@ -60,13 +64,13 @@ procedure Solve_Binomial_System ( A : in Standard_Integer_Matrices.Matrix; - c : in Standard_Complex_Vectors.Vector; r : out natural; + c : in Standard_Complex_Vectors.Vector; r : out integer32; M,U : out Standard_Integer_Matrices.Matrix; Usols : out Standard_Complex_Solutions.Solution_List; Asols : out Standard_Complex_Solutions.Solution_List ) is - nv : constant natural := A'last(1); - nq : constant natural := A'last(2); + nv : constant integer32 := A'last(1); + nq : constant integer32 := A'last(2); rd : constant Standard_Floating_Vectors.Vector(c'range) := Standard_Radial_Solvers.Radii(c); ec : constant Standard_Complex_Vectors.Vector(c'range) @@ -102,16 +106,16 @@ tmp : Mixed_Subdivision := mcc; mic : Mixed_Cell; - dim : constant natural + dim : constant natural32 := Standard_Complex_Polynomials.Number_of_Unknowns(p(p'first)); deg : Standard_Complex_Polynomials.Degrees - := new Standard_Natural_Vectors.Vector(1..dim); + := new Standard_Natural_Vectors.Vector(1..integer32(dim)); cff : Standard_Complex_VecVecs.VecVec(p'range); A,M,U : Standard_Integer_Matrices.Matrix(p'range,p'range); b : Standard_Complex_Vectors.Vector(p'range); Usols,Asols : Standard_Complex_Solutions.Solution_List; - mv : natural := 0; - r,vol : natural; + mv,vol : natural32 := 0; + r : integer32; sum : double_float := 0.0; begin @@ -140,7 +144,7 @@ infile : file_type; mcc : Mixed_Subdivision; mix : Standard_Integer_Vectors.Link_to_Vector; - n,r : natural; + n,r : natural32; begin new_line; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_mapsubs.adb phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_mapsubs.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/ts_mapsubs.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/ts_mapsubs.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,7 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Communications_with_User; use Communications_with_User; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Integer_Matrices_io; use Standard_Integer_Matrices_io; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Binomials/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Binomials/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Binomials/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Binomials/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,11 @@ +Tue 15 Jun 2021 : fixed standard_monomial_map_substitutors.adb and + ts_mapsubs.adb, updated binomials.gpr. Updated binomials.gpr again + after fixing ts_cspsol.adb. + +Thu 10 Jun 2021 : added the exec_dir attribute to binomials.gpr. + +Wed 9 Jun 2021 : defined binomials.gpr to build the test procedures. + Thu 23 Jul 2020 : passed verbose level to black_box_simplex_solvers and black_box_binomial_solvers. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/demics.gpr phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/demics.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/demics.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/demics.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,210 @@ +project demics is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../../Math_Lib/Supports", + "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", "../../Deformations/Sweep", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../MixedVol", "../Dynlift", "../Symmetry", "../Puiseux", + "../../CtoPHC/Types", "../../CtoPHC/Structures", + "../../CtoPHC/Funky", "../../CtoPHC/State", + "../../Components/Samplers", "../../Components/Interpolators", + "../../Components/Factorization", + "../../Components/Decomposition", + "../../Components/Solver", "../../Components/Tropical", + "../../Schubert/SAGBI", "../../Schubert/Pieri", + "../../Schubert/Induction", + "../../PHCtoC", "../../PHCtoC/Main_noqd", + "../../Tasking", "../../Main" + ); + for Languages use ("Ada", "C", "C++"); + for Excluded_Source_Files use + ( + "corecount.c", "corecountwindows.c", + "adenewton_d.cpp", "adenewton_dd.cpp", "adenewton_qd.cpp", + "adeonepath_d.cpp", "adeonepath_dd.cpp", "adeonepath_qd.cpp", + "ademanypaths_d.cpp", "ademanypaths_dd.cpp", + "ademanypaths_qd.cpp", "ademanypaths.cpp", + "gpu2norm_d.cpp", "gpu2norm_dd.cpp", "gpu2norm_qd.cpp", + "gpunewton_d.cpp", "gpunewton_dd.cpp", "gpunewton_qd.cpp", + "gpuonepath_d.cpp", "gpuonepath_dd.cpp", "gpuonepath_qd.cpp", + "gpumanypaths_d.cpp", "gpumanypaths_dd.cpp", + "gpumanypaths_qd.cpp", "ts_ademanypaths.adb", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb", + "weighted_projective_transfos.ads", + "weighted_projective_transfos.adb" + ); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Series", "../../Math_Lib/Circuits", + "../../Math_Lib/Supports", + "../../Deformations/Solutions", "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", "../../Deformations/Sweep", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../Dynlift", "../MixedVol", "../Symmetry", "../Puiseux", + "../../CtoPHC/Types", "../../CtoPHC/Structures", + "../../CtoPHC/Funky", "../../CtoPHC/State", + "../../Components/Samplers", "../../Components/Interpolators", + "../../Components/Factorization", + "../../Components/Decomposition", + "../../Components/Solver", "../../Components/Tropical", + "../../Schubert/SAGBI", "../../Schubert/Pieri", + "../../Schubert/Induction", + "../../PHCtoC", "../../PHCtoC/Main_noqd", + "../../Tasking", "../../Main" + ); + for Excluded_Source_Files use + ( + "corecount.c", + "adenewton_d.cpp", "adenewton_dd.cpp", "adenewton_qd.cpp", + "adeonepath_d.cpp", "adeonepath_dd.cpp", "adeonepath_qd.cpp", + "ademanypaths_d.cpp", "ademanypaths_dd.cpp", + "ademanypaths_qd.cpp", "ademanypaths.cpp", + "gpu2norm_d.cpp", "gpu2norm_dd.cpp", "gpu2norm_qd.cpp", + "gpunewton_d.cpp", "gpunewton_dd.cpp", "gpunewton_qd.cpp", + "gpuonepath_d.cpp", "gpuonepath_dd.cpp", "gpuonepath_qd.cpp", + "gpumanypaths_d.cpp", "gpumanypaths_dd.cpp", + "gpumanypaths_qd.cpp", "ts_ademanypaths.adb", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb" + ); + for Languages use ("Ada", "C", "C++"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + -- "use_c2phc.adb", -- how to force compilation? + "ts_calldemics.adb", -- file based interface to DEMiCs + -- "main.cpp", -- the main of demics + "ts_outdata.adb", -- tests demics_output_data + -- "ts_outputData.cpp", -- tests output data from C++ + "ts_demicsrun.adb" -- tests the second interface to demics + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + for Switches ("use_c2phc.adb") use ("-c"); + + end Compiler; + + package Binder is + + for Switches ("use_c2phc.adb") use ("-n"); + for Switches ("ts_demicsrun.adb") use ("use_c2phc"); + + end Binder; + + package Linker is + + for Switches ("main.cpp") use ("-o demics"); + + -- for Switches ("use_c2phc.adb") use ("-c"); + + -- for Switches ("ts_demicsrun.adb") use ("use_c2phc.o"); + + end Linker; + +end demics; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/main.cpp phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/main.cpp --- phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/main.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/main.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -54,12 +54,12 @@ mvc MV_Comp; double cpuTime_start, cpuTime_end; - struct tms cpuTime; + // struct tms cpuTime; getInputPara(argc,argv,seedNum,output,&inputFileName); - times(&cpuTime); - cpuTime_start = (double) cpuTime.tms_utime; + //times(&cpuTime); + //cpuTime_start = (double) cpuTime.tms_utime; Data.getInputFile(inputFileName); @@ -67,8 +67,8 @@ MV_Comp.Enum(); - times(&cpuTime); - cpuTime_end = (double) cpuTime.tms_utime; + //times(&cpuTime); + //cpuTime_end = (double) cpuTime.tms_utime; MV_Comp.info_cpuTime(cpuTime_start,cpuTime_end); diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Dynamic Enumeration of all Mixed Cells in PHCv2.4.68 +Dynamic Enumeration of all Mixed Cells in PHCv2.4.85 This directory was added in version 2.4.53 to prepare the interface to DEMiCs, software for the dynamic enumeration of all mixed cells. @@ -43,6 +43,14 @@ the flag compile4phc is set. See the makefiles in the Objects folder for the compilation instructions. +The switches "-Dcompilewgpp=1" and "-Dcompile4phc=1" are critical, +see the demics.gpr file. + +Run "gprbuild demics.gpr" to make all test programs. +On windows, type "gprbuild demics.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean demics.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/ts_demicsrun.adb phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/ts_demicsrun.adb --- phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/ts_demicsrun.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/ts_demicsrun.adb 2021-06-30 23:22:40.000000000 +0000 @@ -15,6 +15,7 @@ with DEMiCs_Algorithm; use DEMiCs_Algorithm; with DEMiCs_Output_Data; with Drivers_for_Static_Lifting; +with use_c2phc; -- to force the compilation of use_c2phc.adb ... procedure ts_demicsrun is diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/DEMiCs/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/DEMiCs/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,18 @@ +Sun 27 Jun 2021 : updated demics.gpr to no longer exclude the C MixedVol. + Updated demics.gpr for the removal of the obsolete face_structures. + Updated demics.gpr for the removal of evaluate_schubert_conditions. + Updated demics.gpr for the removal of multprec_lattice_facets and its io. + Updated demics.gpr for the removal of pieri_count. + +Sat 26 Jun 2021 : updated demics.gpr to no longer exclude double_double.c. + +Thu 17 Jun 2021 : added "with use_c2phc;" to ts_demicsrun.adb, to force the + compilation in a standalone build. First version of demics.gpr to define + the instructions for ts_demicsrun and some other test procedures ... + +Thu 10 Jun 2021 : commented out the timer in main.cpp because + compiler errors prevented the compilation of demics. + Thu 20 Jun 2019 : added return in simplex.cpp for compiler warning. Fri 29 Mar 2019 : commented out the #include in global.h diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/dynlift.gpr phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/dynlift.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/dynlift.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/dynlift.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,75 @@ +project dynlift is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift" + ); + for Languages use ("Ada"); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift" + ); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_dyntri.adb", -- tests dynamic lifting + "ts_drivmink.adb", -- tests volume polynomials + "ts_drivdynl.adb" -- calls the main procedure + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + for Switches ("use_c2phc.adb") use ("-c"); + + end Compiler; + +end dynlift; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/face_structures.adb phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/face_structures.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/face_structures.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/face_structures.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -package body Face_Structures is - --- CONSTRUCTOR : - - procedure Compute_New_Faces - ( fs : in out Face_Structure; k,n : in natural; - point : in out Link_to_Vector; newfs : out Faces ) is - - procedure Append ( fc : in VecVec ) is - - f : Face; - - begin - f.points := Shallow_Create(fc); - Append(res,res_last,f); - end Append; - procedure EnumLis is new Enumerate_Faces_in_List(Append); - procedure EnumTri is new Enumerate_Faces_in_Triangulation(Append); - - begin - -- COMPUTE THE NEW FACES AND UPDATE fs : - if Is_Null(fs.t) - then - if Length_Of(fs.l) >= n - then - fs.t := Initial_Triangulation(n,fs.l,point); - if Is_Null(fs.t) - then EnumLis(fs.l,point,k); - else EnumTri(fs.t,point,k); - end if; - else - EnumLis(fs.l,point,k); - end if; - else - declare - newt : Triangulation; - begin - point(point'last) := Next_Lifting(fs.t,point.all); - Update(fs.t,point,newt); - Enumtri(newt,point,k); - end; - end if; - Append(fs.l,fs.last,point); - newfs := res; - end Compute_New_Faces; - --- FLATTENING : - - procedure Flatten ( f : in out Face ) is - begin - if f.normal /= null - then f.normal.all := (f.normal'range => 0); - f.normal(f.normal'last) := 1; - end if; - Flatten(f.points); - end Flatten; - - procedure Flatten ( fs : in out Faces ) is - - tmp : Faces := fs; - f : Face; - - begin - while not Is_Null(tmp) loop - f := Head_Of(tmp); - Flatten(f); - Set_Head(tmp,f); - tmp := Tail_Of(tmp); - end loop; - end Flatten; - - procedure Flatten ( fs : in out Face_Structure ) is - begin - Flatten(fs.l); Flatten(fs.t); Flatten(fs.f); - end Flatten; - - procedure Flatten ( fs : in out Array_of_Face_Structures ) is - begin - for i in fs'range loop - Flatten(fs(i)); - end loop; - end Flatten; - --- SELECTORS : - - function Is_In ( fs : Face_Structure; point : vector ) return boolean is - begin - if Is_Null(fs.t) - then return Is_In(fs.l,point); - else return Is_In(fs.t,point); - end if; - end Is_In; - --- DESTRUCTORS : - - procedure Deep_Clear ( fs : in out Face_Structure ) is - begin - Deep_Clear(fs.l); Deep_Clear(fs.f); Deep_Clear(fs.t); - end Deep_Clear; - - procedure Shallow_Clear ( fs : in out Face_Structure ) is - begin - Shallow_Clear(fs.l); Shallow_Clear(fs.f); Shallow_Clear(fs.t); - end Shallow_Clear; - - procedure Deep_Clear ( fs : in out Array_of_Face_Structures ) is - begin - for i in fs'range loop - Deep_Clear(fs(i)); - end loop; - end Deep_Clear; - - procedure Shallow_Clear ( fs : in out Array_of_Face_Structures ); - begin - for i in fs'range loop - Shallow_Clear(fs(i)); - end loop; - end Shallow_Clear; - -end Face_Structures; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/face_structures.ads phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/face_structures.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/face_structures.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/face_structures.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; -with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; -with Triangulations; use Triangulations; - -package Face_Structures is - --- DESCRIPTION : --- This package offers a data abstraction to work with face --- structures of tuples of polytopes. - --- DATA STRUCTURES : - - type Face_Structure is record - l,last : List; -- l contains the lifted points of the faces, - -- last is a pointer to the last element of l - t : Triangulation; -- triangulation of the points in l - f : Faces; -- k-faces of conv(l) - end record; - type Array_of_Face_Structures is array(integer range <>) of Face_Structure; - --- CONSTRUCTOR : - - procedure Compute_New_Faces - ( fs : in out Face_Structure; k,n : in natural; - point : in out Link_to_Vector; newfs : out Faces ); - - -- DESCRIPTION : - -- Given a point, the new faces will be computed and returned. - - -- ON ENTRY : - -- fs a face structure; - -- k dimension of the faces to generate; - -- n dimension without the lifting; - -- point point that has to be in all the faces. - - -- ON RETURN : - -- fs face structure with updated triangulation, - -- the new faces are not added, also the list is not updated; - -- point lifted conservatively w.r.t. fs.t; - -- newfs k-faces, which all contain the given point. - --- FLATTENING OPERATIONS : - - procedure Flatten ( l : in out List ); - procedure Flatten ( f : in out Face ); - procedure Flatten ( fs : in out Faces ); - procedure Flatten ( fs : in out Face_Structure ); - procedure Flatten ( fs : in out Array_of_Face_Structures ); - - -- DESCRIPTION : - -- These operations are use to flatten face structures. - --- SELECTORS : - - function Is_In ( fs : Face_Structure; point : vector ) return boolean; - - -- DESCRIPTION : - -- Returns true if the point belongs to the face structure. - --- DESTRUCTORS : - - procedure Deep_Clear ( fs : in out Face_Structure ); - procedure Shallow_Clear ( fs : in out Face_Structure ); - procedure Deep_Clear ( fs : in out Array_of_Face_Structures ); - procedure Shallow_Clear ( fs : in out Array_of_Face_Structures ); - -end Face_Structures; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,60 +1,64 @@ -Mixed-volume computation by dynamic lifting in PHCv2.4.83 - -The aim of dynamic lifting is to control the heights of the lifting values, -to obtain a stable evaluation of the polyhedral homotopy. - -When all supports are equal, then the mixed volume is reduced to an -ordinary volume, which is computed by a regular triangulation. - -1. Dynamic construction of regular triangulations : -2. The Cayley trick -3. Dynamic construction of mixed subdivision -4. The drivers and black-box computation - -A 64-bit version of the dynamic lifting algorithm was provided -in version 2.3.71. - -------------------------------------------------------------------------------- -file name : short descriptio -------------------------------------------------------------------------------- -standard_integer32_simplices : simplices of integer polytopes -standard_integer64_simplices : 64-bit version of simplices -standard_integer32_simplices_io : input/output of simplices -standard_integer64_simplices_io : input/output of 64-bit simplices -standard_integer32_triangulations : triangulations of integer polytopes -standard_integer64_triangulations : 64-bit version of triangulations -standard_integer64_triangulations_io : input/output of 64-bit triangulations -global_dynamic32_triangulation : global aspects of dynamic lifting -global_dynamic64_triangulation : 64-bit version of global dynamic lifting -dynamic32_lifting_functions : dynamic lifting functions -dynamic64_lifting_functions : 64-bit dynamic lifting functions -standard_dynamic32_triangulations : construction of placing triangulation -standard_dynamic64_triangulations : 64-bit placing triangulation algorithm -ts_dyntri : test on dynamic lifting -------------------------------------------------------------------------------- -cayley_embedding : embeds tuple in one support -cayley_trick : computing mixed subdivisions -minkowski_polynomials : volume polynomials -driver_for_minkowski_polynomials : driver to the volume polynomials -ts_drivmink : calls the driver for volume polynomials -------------------------------------------------------------------------------- -common_faces_of_polytope : computation of neighboring faces -enumerate_faces_of_polytope : extract faces of a triangulation -face_structures : management of faces of triangulations -frequency_graph : computes occurencies of points in supports -initial_mixed_cell : finds an initial mixed cell -flatten_mixed_subdivisions : flattening of mixed subdivisions -unfolding_subdivisions : re-lifting flattened parts of subdivisions -triangulations_and_subdivisions : convert triangulations <> subdivisions -dynamic_mixed_subdivisions : dynamic lifting in the mixed case -dynamic_polyhedral_continuation : incremental polyhedral continuation -------------------------------------------------------------------------------- -drivers_for_dynamic_lifting : menu driver for dynamic lifting -ts_drivdynl : calls the menu driver -black_mixed_volume_computations : blackbox mixed volume computation -apply_induced_permutations : applies induced permutations to systems -black_polyhedral_continuations : blackbox polyhedral continuation -------------------------------------------------------------------------------- - -The Cayley trick is an efficient way to construct all cells in a mixed -subdivision with the corresponding Minkowksi polynomial. +Mixed-volume computation by dynamic lifting in PHCv2.4.85 + +The aim of dynamic lifting is to control the heights of the lifting values, +to obtain a stable evaluation of the polyhedral homotopy. + +When all supports are equal, then the mixed volume is reduced to an +ordinary volume, which is computed by a regular triangulation. + +1. Dynamic construction of regular triangulations : +2. The Cayley trick +3. Dynamic construction of mixed subdivision +4. The drivers and black-box computation + +A 64-bit version of the dynamic lifting algorithm was provided +in version 2.3.71. + +Run "gprbuild dynlift.gpr" to make all test programs. +On windows, type "gprbuild dynlift.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean dynlift.gpr" removes all files created by gprbuild. + +------------------------------------------------------------------------------- +file name : short descriptio +------------------------------------------------------------------------------- +standard_integer32_simplices : simplices of integer polytopes +standard_integer64_simplices : 64-bit version of simplices +standard_integer32_simplices_io : input/output of simplices +standard_integer64_simplices_io : input/output of 64-bit simplices +standard_integer32_triangulations : triangulations of integer polytopes +standard_integer64_triangulations : 64-bit version of triangulations +standard_integer64_triangulations_io : input/output of 64-bit triangulations +global_dynamic32_triangulation : global aspects of dynamic lifting +global_dynamic64_triangulation : 64-bit version of global dynamic lifting +dynamic32_lifting_functions : dynamic lifting functions +dynamic64_lifting_functions : 64-bit dynamic lifting functions +standard_dynamic32_triangulations : construction of placing triangulation +standard_dynamic64_triangulations : 64-bit placing triangulation algorithm +ts_dyntri : test on dynamic lifting +------------------------------------------------------------------------------- +cayley_embedding : embeds tuple in one support +cayley_trick : computing mixed subdivisions +minkowski_polynomials : volume polynomials +driver_for_minkowski_polynomials : driver to the volume polynomials +ts_drivmink : calls the driver for volume polynomials +------------------------------------------------------------------------------- +common_faces_of_polytope : computation of neighboring faces +enumerate_faces_of_polytope : extract faces of a triangulation +frequency_graph : computes occurencies of points in supports +initial_mixed_cell : finds an initial mixed cell +flatten_mixed_subdivisions : flattening of mixed subdivisions +unfolding_subdivisions : re-lifting flattened parts of subdivisions +triangulations_and_subdivisions : convert triangulations <> subdivisions +dynamic_mixed_subdivisions : dynamic lifting in the mixed case +dynamic_polyhedral_continuation : incremental polyhedral continuation +------------------------------------------------------------------------------- +drivers_for_dynamic_lifting : menu driver for dynamic lifting +ts_drivdynl : calls the menu driver +black_mixed_volume_computations : blackbox mixed volume computation +apply_induced_permutations : applies induced permutations to systems +black_polyhedral_continuations : blackbox polyhedral continuation +------------------------------------------------------------------------------- + +The Cayley trick is an efficient way to construct all cells in a mixed +subdivision with the corresponding Minkowksi polynomial. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/triangulations_io.adb phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/triangulations_io.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/triangulations_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/triangulations_io.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,182 +0,0 @@ -with integer_io; use integer_io; -with Standard_Integer_Vectors; use Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with Standard_Integer_VecVecs_io; use Standard_Integer_VecVecs_io; -with Simplices,Simplices_io; use Simplices,Simplices_io; - -package body Triangulations_io is - - procedure get ( t : in out Triangulation ) is - begin - get(Standard_Input,t); - end get; - - procedure get ( n,m : in natural; t : in out Triangulation ) is - begin - get(Standard_Input,n,m,t); - end get; - - procedure get ( file : in file_type; t : in out Triangulation ) is - - n,m : natural; - - begin - get(file,n); get(file,m); - get(file,n,m,t); - end get; - - procedure get ( file : in file_type; n,m : in natural; - t : in out Triangulation ) is - begin - for k in 1..m loop - declare - s : Simplex; - begin - get(file,n,s); - Construct(s,t); - end; - end loop; - Connect(t); - end get; - - procedure put ( n : in natural; t : in Triangulation ) is - begin - put(Standard_Output,n,t); - end put; - - procedure put ( n : in natural; t : in Triangulation; v : out natural ) is - begin - put(Standard_Output,n,t,v); - end put; - - procedure put ( file : in file_type; - n : in natural; t : in Triangulation ) is - - tmp : Triangulation := t; - - begin - put(file,n,1); new_line(file); - put(file,Length_Of(t),1); new_line(file); - while not Is_Null(tmp) loop - put(file,Head_Of(tmp)); -- write the cell - put(file,0,1); new_line(file); -- write refinement of cell - tmp := Tail_Of(tmp); - end loop; - end put; - - procedure put ( file : in file_type; - n : in natural; t : in Triangulation; v : out natural ) is - - tmp : Triangulation := t; - res,cnt : natural := 0; - s : Simplex; - vol : natural; - - begin - put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); - put(file,"Number of simplices : "); put(file,Length_Of(t),1); - new_line(file); - put_line(file,"The simplices in the triangulation :"); - while not Is_Null(tmp) loop - cnt := cnt + 1; - put(file,"Simplex "); put(file,cnt,1); put_line(file," :"); - s := Head_Of(tmp); - put(file," with normal : "); put(file,Normal(s)); new_line(file); - put_line(file," spanned by the points :"); put(file,Vertices(s)); - vol := Volume(s); - put(file," ==> volume : "); put(file,vol,1); put_line(file,"."); - res := res + vol; - tmp := Tail_Of(tmp); - end loop; - v := res; - end put; - - function Position ( t : Triangulation; s : Simplex ) return natural is - - -- DESCRIPTION : - -- Returns the position number of the simplex in the triangulation. - -- Counting starts from one. If the simplex s does not occur in t, - -- then Length(t)+1 will be returned. - - res : natural := 1; - tmp : Triangulation := t; - s1 : Simplex; - - begin - while not Is_Null(tmp) loop - s1 := Head_Of(tmp); - if Equal(s1,s) - then return res; - else tmp := Tail_Of(tmp); - res := res + 1; - end if; - end loop; - return res; - end Position; - - function Connectivity ( t : Triangulation; s : Simplex ) return Vector is - - -- DESCRIPTION : - -- Returns the connectivity vector of the given simplex w.r.t. the - -- given triangulation. This connectivity vector, name it cv, is - -- defined as follows: - -- cv(i) = 0 if Neighbor(s,i) = Null_Simplex - -- cv(i) = k if Neighbor(s,i) /= Null_Simplex - -- and Position(t,Neighbor(s,i)) = k. - - res : Vector(1..Dimension(s)); - nei : Simplex; - - begin - for i in res'range loop - nei := Neighbor(s,i); - if nei = Null_Simplex - then res(i) := 0; - else res(i) := Position(t,nei); - end if; - end loop; - return res; - end Connectivity; - - procedure put ( n : natural; t : in Triangulation; - convecs : in out List; v : out natural ) is - begin - put(Standard_Output,n,t,convecs,v); - end put; - - procedure put ( file : in file_type; n : natural; t : in Triangulation; - convecs : in out List; v : out natural ) is - - tmp : Triangulation := t; - s : Simplex; - res,cnt : natural := 0; - last : List; - vol : natural; - - begin - put(file,"Dimension without lifting : "); put(file,n,1); new_line(file); - put(file,"Number of simplices : "); put(file,Length_Of(t),1); - new_line(file); - put_line(file,"The simplices in the triangulation :"); - while not Is_Null(tmp) loop - cnt := cnt + 1; - put(file,"Simplex "); put(file,cnt,1); put_line(file," :"); - s := Head_Of(tmp); - put(file," with normal : "); put(file,Normal(s)); new_line(file); - put_line(file," spanned by the points :"); put(file,Vertices(s)); - declare - cv : constant Vector := Connectivity(t,s); - lcv : Link_to_Vector := new Vector'(cv); - begin - put(file," connectivity vector : "); put(file,cv); new_line(file); - Append(convecs,last,lcv); - end; - vol := Volume(s); - put(file," ==> volume : "); put(file,vol,1); put_line(file,"."); - res := res + vol; - tmp := Tail_Of(tmp); - end loop; - v := res; - end put; - -end Triangulations_io; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/triangulations_io.ads phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/triangulations_io.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/triangulations_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/triangulations_io.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -with text_io; use text_io; -with Lists_of_Integer_Vectors; use Lists_of_Integer_Vectors; -with Triangulations; use Triangulations; - -package Triangulations_io is - --- DESCRIPTION : --- Input/output of triangulations of polytopes spanned by integer vertices. - - procedure get ( t : in out Triangulation ); - procedure get ( n,m : in natural; t : in out Triangulation ); - procedure get ( file : in file_type; t : in out Triangulation ); - procedure get ( file : in file_type; n,m : in natural; - t : in out Triangulation ); - - -- DESCRIPTION : - -- Reads first the dimension n and the number of simplices m. - -- if they are not specified as parameter. - -- Either from standard input or from file, m times n integer vectors - -- of length are read. - - procedure put ( n : in natural; t : in Triangulation ); - procedure put ( n : in natural; t : in Triangulation; v : out natural ); - procedure put ( file : in file_type; - n : in natural; t : in Triangulation ); - procedure put ( file : in file_type; - n : in natural; t : in Triangulation; v : out natural ); - - -- DESCRIPTION : - -- Writes the simplices in the triangulation on standard output - -- or on file. When the parameter `v' is supplied, the volume - -- will be computed and returned. Also, more text banners are provided. - - procedure put ( n : natural; t : in Triangulation; - convecs : in out List; v : out natural ); - procedure put ( file : in file_type; n : natural; t : in Triangulation; - convecs : in out List; v : out natural ); - - -- DESCRIPTION : - -- Also the connectivity vectors for each simplex will be written. - -- A connectivity vector cv for a simplex s is defined as follows: - -- cv(i) = 0 if Neighbor(s,i) = Null_Simplex - -- cv(i) = k if Neighbor(s,i) /= Null_Simplex - -- and Position(t,Neighbor(s,i)) = k. - -end Triangulations_io; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Dynlift/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Dynlift/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,12 @@ +Sun 27 Jun 2021 : removed the obsolete package face_structures. + +Sat 26 Jun 2021 : updated dynlift.gpr to no longer exclude double_double.c. + +Mon 14 Jun 2021 : bug fix in face_structures.adb. + +Thu 10 Jun 2021 : defined dynlift.gpr to build the test procedures. + Added Exec_Dir attribute to dynlift.gpr. + Sun 5 Dec 2020 : moved babldmvc into black_polyhedral_continuations. Sun 4 Oct 2020 : updated drivers_for_dynamic_lifting for package name changes. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Implift/implift.gpr phcpack-2.4.85/src/Ada/Root_Counts/Implift/implift.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Implift/implift.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Implift/implift.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,60 @@ +project implift is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Stalift", + "../../Schubert/SAGBI"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Stalift", + "../../Schubert/SAGBI"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_supports.adb", -- tests power lists + "ts_mainvpts.adb", -- tests the main vertex extraction + "ts_transfo.adb", -- tests transformations from vectors + "ts_tropelim.adb", -- tests transforming Laurent systems + "ts_impvol.adb", -- tests the mixed-volume computation + "ts_drivimpl.adb", -- tests the main implicit lifting + "ts_supspan.adb" -- tests the span computation + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end implift; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Implift/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Implift/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Implift/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Implift/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Polyhedral homotopies by implicit lifting in PHCpack version 2.4.82 +Polyhedral homotopies by implicit lifting in PHCpack version 2.4.85 This directory contains software for the computation of mixed volumes, according to the recursive formula Bershtein used in his proof. @@ -18,6 +18,11 @@ Version 2.3.86 offered a tool to transform a Laurent polynomial system with support sets of positive corank. +Run "gprbuild implift.gpr" to make all test programs. +On windows, type "gprbuild implift.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean implift.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Implift/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Implift/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Implift/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Implift/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,7 @@ +Thu 10 Jun 2021 : added the exec_dir attribute to implift.gpr. + +Wed 9 Jun 2021 : defined implift.gpr to build the test procedures. + Sun 8 Nov 2020 : updated drivers_for_coefficient_systems.adb because of the name change of drivers_for_poly_continuation into main_poly_continuation. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,118 @@ +/* The file "cell_stack1.c" contains the definitions of the prototypes + * in the file "cell_stack1.h". */ + +#include +#include +#include "cell_stack1.h" + +#define verbose_stack 0 + +void Cell_Init1 ( cell *c ) +{ + c->next=0; +} + +void Cell_Init2 ( cell *c, int n, int *J, cell *ptr ) +{ + int i; + + c->idx = (int*)calloc(n,sizeof(int)); + for(i=0; i< n; i++) c->idx[i] = J[i]; + c->next=ptr; +} + +void Cs_Init ( CellStack *cs, int n ) +{ + cs->size=n; + cs->count=0; + cs->cur=cs->top=0; +} + +void Cs_Push ( CellStack *cs, int *J ) +{ + cell *c; + + if(verbose_stack > 0) + { + int i; + + printf("Pushing indices of size %d on the stack :",cs->size); + for(i=0; i< cs->size; i++) printf(" %d",J[i]); printf("\n"); + } + + c = (cell*)calloc(1,sizeof(cell)); + + Cell_Init2(c,cs->size,J,cs->top); + + cs->cur = cs->top=c; + + ++(cs->count); +} + +void Cs_Pop ( CellStack *cs ) +{ + cell *ptr = cs->top; + + cs->cur = cs->top = (cs->top)->next; + free(ptr->idx); + free(ptr); + --(cs->count); +} + +int Cs_Next ( CellStack *cs ) +{ + if(cs->cur->next) + { + cs->cur = cs->cur->next; + return 1; + } + else + return 0; +} + +int *Cs_Cur ( CellStack *cs ) +{ + return cs->cur->idx; +} + +void Cs_Top ( CellStack *cs ) +{ + cs->cur = cs->top; +} + +int Cs_IsEmpty ( CellStack *cs ) +{ + if(cs->top==0) + return 1; + else + return 0; +} + +int Cs_Count ( CellStack *cs ) +{ + return cs->count; +} + +int *Csi ( CellStack *cs, int i ) +{ + if(-1< i && i< cs->count) + { + int c=0; + + cs->cur = cs->top; + while(ccur=cs->cur->next; + c++; + } + return cs->cur->idx; + } + else + return 0; +} + +void Cs_Del ( CellStack *cs ) +{ + while(!Cs_IsEmpty(cs)) Cs_Pop(cs); + cs->count = 0; +} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack1.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack1.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack1.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack1.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,96 @@ +/* The file "cell_stack1.h" collects the definition of a stack of mixed cells + * and the prototypes of the operations on the stack. */ + +#ifndef _CELL_STACK1_H_ +#define _CELL_STACK1_H_ + +typedef struct cell cell; +typedef struct CellStack CellStack; + +struct cell +{ + int *idx; /* labels of the points which span the mixed cell */ + cell *next; /* pointer to the next cell */ +}; + +struct CellStack +{ + int size; /* total #points which span a mixed cell */ + int count; /* number of elements in the stack */ + cell *top; /* top of the stack */ + cell *cur; /* pointer to the current cell in the stack */ +}; + +void Cell_Init1 ( cell *c ); +/* + * DESCRIPTION : + * Sets c->next to zero. */ + +void Cell_Init2 ( cell *c, int n, int *J, cell *ptr ); +/* + * DESCRIPTION : + * Defines the content of the cell with the indices in J. + * + * ON ENTRY : + * c memory allocated for one cell; + * n number of indices of J; + * J labels to the points spanning the mixed cell; + * ptr pointer for the the next cell. + * + * ON RETURN : + * c c->idx contains the values of J and + * c->next has the same value as ptr. */ + +void Cs_Init ( CellStack *cs, int n ); +/* + * DESCRIPTION : + * Initializes the stack cs to contain mixed cells spanned by n points. */ + +void Cs_Push ( CellStack *cs, int *J ); +/* + * DESCRIPTION : + * Pushes a mixed cell defined by the indices in J to the stack. */ + +void Cs_Pop ( CellStack *cs ); +/* + * DESCRIPTION : + * Pops the top element from the cell stack. */ + +int Cs_Next ( CellStack *cs ); +/* + * DESCRIPTION : + * Returns 0 if the next cell to the current cell is empty, + * otherwise returns 1 and puts the pointer to the current cell + * to the next cell. */ + +int *Cs_Cur ( CellStack *cs ); +/* + * DESCRIPTION : + * Returns the content of the current cell. */ + +void Cs_Top ( CellStack *cs ); +/* + * DESCRIPTION : + * Assigns the current cell pointer to the top of the stack. */ + +int Cs_IsEmpty ( CellStack *cs ); +/* + * DESCRIPTION : + * Returns 1 if the cell stack is empty, 0 otherwise. */ + +int Cs_Count ( CellStack *cs ); +/* + * DESCRIPTION : + * Returns the value of cs->count, the #cells in the stack. */ + +int *Csi ( CellStack *cs, int i ); +/* + * DESCRIPTION : + * Returns the content of the i-th cell in the stack. */ + +void Cs_Del ( CellStack *cs ); +/* + * DESCRIPTION : + * Pops all the cells of the stack, deallocating all memory. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,118 +0,0 @@ -/* The file "cell_stack.c" contains the definitions of the prototypes - * in the file "cell_stack.h". */ - -#include -#include -#include "cell_stack.h" - -#define verbose_stack 0 - -void Cell_Init1 ( cell *c ) -{ - c->next=0; -} - -void Cell_Init2 ( cell *c, int n, int *J, cell *ptr ) -{ - int i; - - c->idx = (int*)calloc(n,sizeof(int)); - for(i=0; i< n; i++) c->idx[i] = J[i]; - c->next=ptr; -} - -void Cs_Init ( CellStack *cs, int n ) -{ - cs->size=n; - cs->count=0; - cs->cur=cs->top=0; -} - -void Cs_Push ( CellStack *cs, int *J ) -{ - cell *c; - - if(verbose_stack > 0) - { - int i; - - printf("Pushing indices of size %d on the stack :",cs->size); - for(i=0; i< cs->size; i++) printf(" %d",J[i]); printf("\n"); - } - - c = (cell*)calloc(1,sizeof(cell)); - - Cell_Init2(c,cs->size,J,cs->top); - - cs->cur = cs->top=c; - - ++(cs->count); -} - -void Cs_Pop ( CellStack *cs ) -{ - cell *ptr = cs->top; - - cs->cur = cs->top = (cs->top)->next; - free(ptr->idx); - free(ptr); - --(cs->count); -} - -int Cs_Next ( CellStack *cs ) -{ - if(cs->cur->next) - { - cs->cur = cs->cur->next; - return 1; - } - else - return 0; -} - -int *Cs_Cur ( CellStack *cs ) -{ - return cs->cur->idx; -} - -void Cs_Top ( CellStack *cs ) -{ - cs->cur = cs->top; -} - -int Cs_IsEmpty ( CellStack *cs ) -{ - if(cs->top==0) - return 1; - else - return 0; -} - -int Cs_Count ( CellStack *cs ) -{ - return cs->count; -} - -int *Csi ( CellStack *cs, int i ) -{ - if(-1< i && i< cs->count) - { - int c=0; - - cs->cur = cs->top; - while(ccur=cs->cur->next; - c++; - } - return cs->cur->idx; - } - else - return 0; -} - -void Cs_Del ( CellStack *cs ) -{ - while(!Cs_IsEmpty(cs)) Cs_Pop(cs); - cs->count = 0; -} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/cell_stack.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/cell_stack.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* The file "cell_stack.h" collects the definition of a stack of mixed cells - * and the prototypes of the operations on the stack. */ - -#ifndef _CELL_STACK_H_ -#define _CELL_STACK_H_ - -typedef struct cell cell; -typedef struct CellStack CellStack; - -struct cell -{ - int *idx; /* labels of the points which span the mixed cell */ - cell *next; /* pointer to the next cell */ -}; - -struct CellStack -{ - int size; /* total #points which span a mixed cell */ - int count; /* number of elements in the stack */ - cell *top; /* top of the stack */ - cell *cur; /* pointer to the current cell in the stack */ -}; - -void Cell_Init1 ( cell *c ); -/* - * DESCRIPTION : - * Sets c->next to zero. */ - -void Cell_Init2 ( cell *c, int n, int *J, cell *ptr ); -/* - * DESCRIPTION : - * Defines the content of the cell with the indices in J. - * - * ON ENTRY : - * c memory allocated for one cell; - * n number of indices of J; - * J labels to the points spanning the mixed cell; - * ptr pointer for the the next cell. - * - * ON RETURN : - * c c->idx contains the values of J and - * c->next has the same value as ptr. */ - -void Cs_Init ( CellStack *cs, int n ); -/* - * DESCRIPTION : - * Initializes the stack cs to contain mixed cells spanned by n points. */ - -void Cs_Push ( CellStack *cs, int *J ); -/* - * DESCRIPTION : - * Pushes a mixed cell defined by the indices in J to the stack. */ - -void Cs_Pop ( CellStack *cs ); -/* - * DESCRIPTION : - * Pops the top element from the cell stack. */ - -int Cs_Next ( CellStack *cs ); -/* - * DESCRIPTION : - * Returns 0 if the next cell to the current cell is empty, - * otherwise returns 1 and puts the pointer to the current cell - * to the next cell. */ - -int *Cs_Cur ( CellStack *cs ); -/* - * DESCRIPTION : - * Returns the content of the current cell. */ - -void Cs_Top ( CellStack *cs ); -/* - * DESCRIPTION : - * Assigns the current cell pointer to the top of the stack. */ - -int Cs_IsEmpty ( CellStack *cs ); -/* - * DESCRIPTION : - * Returns 1 if the cell stack is empty, 0 otherwise. */ - -int Cs_Count ( CellStack *cs ); -/* - * DESCRIPTION : - * Returns the value of cs->count, the #cells in the stack. */ - -int *Csi ( CellStack *cs, int i ); -/* - * DESCRIPTION : - * Returns the content of the i-th cell in the stack. */ - -void Cs_Del ( CellStack *cs ); -/* - * DESCRIPTION : - * Pops all the cells of the stack, deallocating all memory. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/convsub.adb phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/convsub.adb --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/convsub.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/convsub.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,234 +0,0 @@ -with text_io; use text_io; -with Communications_with_User; use Communications_with_User; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with Standard_Floating_Vectors; -with Standard_Floating_Vectors_io; use Standard_Floating_Vectors_io; -with Standard_Floating_VecVecs; -with Standard_Floating_Matrices; use Standard_Floating_Matrices; -with Standard_Floating_Linear_Solvers; use Standard_Floating_Linear_Solvers; -with Lists_of_Floating_Vectors; use Lists_of_Floating_Vectors; -with Arrays_of_Floating_Vector_Lists; use Arrays_of_Floating_Vector_Lists; -with Floating_Mixed_Subdivisions; use Floating_Mixed_Subdivisions; -with Floating_Mixed_Subdivisions_io; use Floating_Mixed_Subdivisions_io; -with Mixed_Volume_Computation; use Mixed_Volume_Computation; - -procedure convsub is - --- DESCRIPTION : --- Converts the output file of Xing Li his program into --- a floating-point mixed subdivision. - - procedure Read_Lifted_Supports - ( file : in file_type; n : in integer32; - lifsup : out Standard_Floating_VecVecs.Array_of_VecVecs ) is - - -- DESCRIPTION : - -- Reads the lifted supports from file. - - k : integer32 := 0; - - begin - for i in lifsup'range loop - get(file,k); - declare - pts : Standard_Floating_VecVecs.VecVec(1..k); - lpt : Standard_Floating_Vectors.Vector(1..n+1); - begin - for j in 1..k loop - get(file,lpt); - pts(j) := new Standard_Floating_Vectors.Vector'(lpt); - end loop; - lifsup(i) := new Standard_Floating_VecVecs.VecVec'(pts); - end; - end loop; - end Read_Lifted_Supports; - - function Minimum ( lifsup : in Standard_Floating_VecVecs.VecVec; - v : Standard_Floating_Vectors.Vector ) - return double_float is - - -- DESCRIPTION : - -- Returns the minimal inner product the points in lifsup make - -- with the given vector v. - - use Standard_Floating_Vectors; - - min : double_float := lifsup(1).all*v; - ipr : double_float; - - begin - for i in 2..lifsup'last loop - ipr := lifsup(i).all*v; - if ipr < min - then min := ipr; - end if; - end loop; - return min; - end Minimum; - - procedure Test_Inner_Normal - ( n : in integer32; v : in Standard_Floating_Vectors.Vector; - lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; - pts : in Standard_Integer_Vectors.Vector ) is - - -- DESCRIPTION : - -- Checks whether the minimum really occurs at the points in pts. - - min,ipr : double_float; - cnt : integer32 := 0; - use Standard_Floating_Vectors; - - begin - for i in 1..n loop - min := Minimum(lifsup(i).all,v); - put("min : "); put(min,3); - cnt := cnt+1; - put(" at "); put(pts(cnt)+1,1); put(" : "); - ipr := lifsup(i)(pts(cnt)+1).all*v; - put(ipr,3); - cnt := cnt+1; - put(" at "); put(pts(cnt)+1,1); put(" : "); - ipr := lifsup(i)(pts(cnt)+1).all*v; - put(ipr,3); - new_line; - end loop; - end Test_Inner_Normal; - - procedure Create_Cell - ( file : in file_type; n : in integer32; - lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; - mic : out Mixed_Cell ) is - - -- DESCRIPTION : - -- Reads one line from file and returns the corresponding mixed cell. - -- This involves also the computation of the inner normal. - - pt1,pt2 : integer32 := 0; - mat : Matrix(1..n,1..n); - rhs : Standard_Floating_Vectors.Vector(1..n); - ipvt : Standard_Integer_Vectors.Vector(1..n); - info : integer32; - cnt : integer32 := 0; - pts : Standard_Integer_Vectors.Vector(1..2*n); - - begin - mic.pts := new Array_of_Lists(1..n); - for i in 1..n loop - get(file,pt1); cnt := cnt+1; pts(cnt) := pt1; - get(file,pt2); cnt := cnt+1; pts(cnt) := pt2; - declare - last : List; - point1 : Standard_Floating_Vectors.Vector := lifsup(i)(pt1+1).all; - point2 : Standard_Floating_Vectors.Vector := lifsup(i)(pt2+1).all; - begin - Append(mic.pts(i),last,point1); - Append(mic.pts(i),last,point2); - for j in 1..n loop - mat(i,j) := point1(j) - point2(j); - end loop; - rhs(i) := point2(n+1) - point1(n+1); - end; - end loop; - skip_line(file); - lufac(mat,n,ipvt,info); - lusolve(mat,n,ipvt,rhs); - mic.nor := new Standard_Floating_Vectors.Vector(1..n+1); - mic.nor(1..n) := rhs; - mic.nor(n+1) := 1.0; - Test_Inner_Normal(n,mic.nor.all,lifsup,pts); - end Create_Cell; - - procedure Create_Subdivision - ( file : in file_type; n,m : in integer32; - lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; - sub : out Mixed_Subdivision ) is - - -- DESCRIPTION : - -- Reads m lines from file and creates the mixed subdivision. - - mic : Mixed_Cell; - sub_last : Mixed_Subdivision; - - begin - for i in 1..m loop - Create_Cell(file,n,lifsup,mic); - Append(sub,sub_last,mic); - end loop; - end Create_Subdivision; - - procedure Read_Subdivision - ( file : in file_type; n : in integer32; - mix : out Standard_Integer_Vectors.Link_to_Vector; - sub : out Mixed_Subdivision ) is - - -- DESCRIPTION : - -- Reads the data from file and constructs a mixed subdivision. - -- The input dimension n has alredy been read. - - lifsup : Standard_Floating_VecVecs.Array_of_VecVecs(1..n); - m : integer32; - mv : natural32; - ans : character; - - begin - put("The dimension is "); put(n,1); put_line("."); - mix := new Standard_Integer_Vectors.Vector'(1..n => 1); - put("The type of mixture : "); put(mix.all); put_line("."); - Read_Lifted_Supports(file,n,lifsup); - put_line("The lifted supports : "); - for i in lifsup'range loop - put(lifsup(i)'last,1); new_line; - for j in lifsup(i)'range loop - for k in 1..n loop - put(" "); - put(integer32(lifsup(i)(j)(k)),1); - end loop; - put(lifsup(i)(j)(n+1)); new_line; - end loop; - end loop; - get(file,m); - put("The number of cells is "); put(m,1); put_line("."); - Create_Subdivision(file,n,m,lifsup,sub); - put("Do you want to continue ? (y/n) "); - Ask_Yes_or_No(ans); - if ans = 'y' then - put(natural32(n),mix.all,sub,mv); - put("The mixed volume is "); put(mv,1); put_line("."); - end if; - end Read_Subdivision; - - procedure Main is - - infile,outfile : file_type; - n : integer32 := 0; - mix : Standard_Integer_Vectors.Link_to_Vector; - sub : Mixed_Subdivision; - - begin - put_line("Reading the name of the input file."); - Read_Name_and_Open_File(infile); - new_line; - put_line("Reading the name of the output file."); - Read_Name_and_Create_File(outfile); - -- new_line; - -- put_line("See the output file for results..."); - -- new_line; - get(infile,n); - Read_Subdivision(infile,n,mix,sub); - put(outfile,natural32(n),mix.all,sub); - end Main; - -begin - new_line; - put_line("Converting output file of Xing Li's program" - & " into mixed subdivision."); - new_line; - Main; -end convsub; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/form_lp1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/form_lp1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/form_lp1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/form_lp1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,376 @@ +/* The file "form_lp1.c" contains the definitions of the two functions + * whose prototypes are documented in the file "form_lp1.h". */ + +#include +#include +#include +#include +#include "form_lp1.h" + +void form_LP + ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, + double **ElmMtrx, int *NonZero, int *Lvl2CoDim, double ***A, + int Lvl, LPdata *ptr, int *Cell, int *Cell_Orig, int *Lvl2LPdim, + int *Lvl2Spt, int *FixFrstPt, int *FixLstPt, int *MinNumPt, + int **PtIn, int *Strt1Pt, int *End1Pt, int **ToOrig, + int **Pre2Cur, int *LPdim, int *FrstPt, int *LstPt, + int *Cur2Pre, double *x, double **Binv, int *Bidx, int *info ) +{ + int ibrk,ell,i,j,jj,i1,j1,k,kout,EndOldPart,FixPt_Orig,FixPt,nPtIn; + double smallnum=1.0e-12,dtmp; + double Elm1Var[nVar+1]; + const int Lvl1 = Lvl-1; + const int ynFixLstPt = FixLstPt[Lvl]; + const int ynFixFrstPt = FixFrstPt[Lvl]; + const int CurSpt = Lvl2Spt[Lvl]; /* index of current support */ + const int CoDim = Lvl2CoDim[Lvl]; + const int PreLPdim = Lvl2LPdim[Lvl-1]; + + *LPdim = Lvl2LPdim[Lvl]; /* Step 1 : search for LP constraints */ + FixPt = Cell[Lvl]; /* last point fixed */ + if(Lvl == 2) + { + FixPt_Orig = FixPt; + FixPt = Pre2Cur[Lvl1][FixPt]; + } + else + FixPt_Orig = ToOrig[Lvl1][FixPt]; + + nPtIn = -1; /* #points involved in the constraints - 1 */ + for(i1=0; i1=0; kout--) + if(fabs(Elm1Var[kout]) > smallnum) + { + ibrk=1; + break; + } + if(!ibrk) + { + printf("form_LP : cannot find a variable to eliminate.\a\n"); + abort(); + } + for(i=0; i smallnum) /* to eliminate */ + { + for(j1=0; j1 smallnum) /* to eliminate */ + { + for(j1=0; j1 smallnum) /* eliminate alpha0 */ + { + for(i=0; iJJJ[i]; + if(Bidx[i] == FixPt_Orig) + { + k = i; + ibrk = 1; + break; + } + } + else + for(i=0; iJJJ[i]; + if(Bidx[i] == FixPt) + { + k = i; + ibrk = 1; + break; + } + } + if(!ibrk) + { + printf("form_LP : no index match for reused info\a\n"); + abort(); + } + for(i=k+1; iJJJ[i]; + + if(Lvl > 2) + { + for(i=0; i-1) + Bidx[i] = Pre2Cur[Lvl][Bidx[i]]; /* may = -1 if eliminated */ + } + else + { + for(i=0; i-1) + { + Bidx[i] = Pre2Cur[1][Bidx[i]]; /* from level 0 to level 1 */ + if(Bidx[i]>-1) + Bidx[i] = Pre2Cur[Lvl][Bidx[i]]; /* level 1 to level 2 */ + } + } + for(i=0; ixxx[i]; + for(i=kout+1; ixxx[i]; + + for(j=0; jINV[j][i]; + for(i=kout+1; iINV[j][i]; + } + for(j=k+1; jINV[j][i]; + for(i=kout+1; iINV[j][i]; + } + if(ynFixLstPt) /* the 1st round 1-pt test for next supp */ + { + x[*LPdim-1] = DBL_MAX; /* The variable alpha0 */ + ell = -1; + for(i=*Strt1Pt; i<=*End1Pt; i++) + { + dtmp = A[Lvl][i][nVar]; + for(i1=0; i1<*LPdim-1; i1++) dtmp -= A[Lvl][i][i1]*x[i1]; + + if(x[*LPdim-1] > dtmp) + { + ell = i; + x[*LPdim-1] = dtmp; + } + } + if(ell < 0) + { + printf("FormLP : no ell\a\n"); + abort(); + } + Bidx[*LPdim-1] = ell; /* constraint becomes last element of base */ + for(i=0; i<*LPdim; i++) /* update the inverse matrix */ + Binv[*LPdim-1][i] = 0.0; + + for(j=0; j<*LPdim-1; j++) + { + dtmp = A[Lvl][ell][0]*Binv[j][0]; + for(i=1; i<*LPdim-1; i++) dtmp += A[Lvl][ell][i]*Binv[j][i]; + + Binv[j][*LPdim-1] = -dtmp; + } + Binv[*LPdim-1][*LPdim-1] = 1.0; + } + for(i=FrstPt[Lvl]; i<*Strt1Pt; i++) PtIn[Lvl][i] = 1; + for(i=*Strt1Pt; i<=*End1Pt; i++) PtIn[Lvl][i] = 0; + *info = 0; +} + +void form_LP1 + ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, + double ***A, int Lvl, int *Cell, int *Lvl2LPdim, int *FixLstPt, + int *MinNumPt, int **PtIn, int **ToOrig, int **Pre2Cur, + int *FrstPt, int *LstPt, int *info ) +{ + int i,j,j1,FixPt,nPtIn,Strt1Pt; + const int Lvl1 = Lvl - 1; + const int ynFixLstPt = FixLstPt[Lvl]; + const int PreLPdim = Lvl2LPdim[Lvl-1]; + + FixPt = Cell[Lvl]; /* last point fixed */ + nPtIn = -1; /* #points involved to form the constraints - 1 */ + FrstPt[Lvl] = 0; + + for(i=SptIdx[0]; i 1. + * + * ON ENTRY : + * nVar number of variables, ambient dimension; + * nSpt number of different supports; + * SptType array of range 0..nSpt with #occurrences of each support; + * SptIdx SptIdx[i] indicates the start of the i-th support; + * RelTab the relation table records edges on lower hull of + * each support or on pairwise Minkowski sums; + * ElmMtrx elimination matrix has dimension the size of a cell; + * NonZero array of dimension equal to the size of a mixed cell, + * but only one entry will be updated; + * Lvl2CoDim array of dimension equal to the size of a mixed cell, + * counts the number of variables eliminated, + * only the element at position Lvl is used; + * A 3-dimensional matrix, first dimension is the cell size, + * then every A[i] is a coefficient matrix of constraints, + * of dimension #constraints times nVar + 1; + * Lvl index of the current level; + * ptr pointer to LP data, used only for consultation; + * Cell indices of the current mixed cell; + * Cell_Orig indices to the original mixed cell; + * Lvl2LPdim array of cell size, only entries at Lvl and Lvl-1 are used; + * Lvl2Spt array of cell size, only entry at Lvl is used; + * FixFrstPt array of cell size, only entry at Lvl is used; + * FixLstPt array of cell size, only entry at Lvl is used; + * MinNumPt array of cell size, only entry at Lvl is used; + * PtIn 2-dimensional matrix with as many rows as the cell size + * and as many columns as the total number of points, + * only the points in PtIn[Lvl] and PtIn[Lvl-1] are accessed; + * ToOrig 2-dimensional integer matrix, as many rows as cell size, + * and as many columns as the total number of points; + * Pre2Cur 2-dimensional integer matrix, as many rows as cell size, + * and as many columns as the total number of points; + * FrstPt array of size of a mixed cell, + * serves as index vector to first point in current support; + * LstPt array of size of mixed cell, + * serves as index vector to last point in current support; + * Cur2Pre array of dimension equal to total number of points; + * x solution vector of dimension nVar; + * Binv matrix of dimension nVar, basis inverse; + * Bidx index vector for points in Pre2Cur, of dimension nVar. + * + * ON RETURN : + * ElmMtrx updated elimination matrix; + * NonZero entry at Lvl2CoDim[Lvl] is updated; + * Cell_Orig updated indices of the original mixed cell; + * PtIn updated entries at row Lvl; + * Strt1Pt index for where to start the 1-point tests; + * End1Pt index for where to end the 1-point tests; + * ToOrig updated entries at rows Lvl-1 and Lvl; + * Pre2Cur updated entries at row 1 and row Lvl; + * LPdim equals Lvl2LPdim[Lvl]; + * Cur2Pre updated index vector; + * x updated solution vector; + * Binv updated basis inverse; + * Bidx updated index vector; + * info 0 if normal return, + * 1 if not enough points to extend, must backtrack. */ + +void form_LP1 + ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, + double ***A, int Lvl, int *Cell, int *Lvl2LPdim, int *FixLstPt, + int *MinNumPt, int **PtIn, int **ToOrig, int **Pre2Cur, + int *FrstPt, int *LstPt, int *info ); +/* + * DESCRIPTION : + * Defines the LP problems when the value of Lvl <= 1. + * + * ON ENTRY : + * nVar number of variables, ambient dimension; + * nSpt number of different supports; + * SptType array of range 0..nSpt with #occurrences of each support; + * SptIdx SptIdx[i] indicates the start of the i-th support; + * RelTab the relation table records edges on lower hull of + * each support or on pairwise Minkowski sums; + * A 3-dimensional matrix, first dimension is the cell size, + * then every A[i] is a coefficient matrix of constraints, + * of dimension #constraints times nVar + 1; + * Lvl index of the current level; + * Cell indices of the current mixed cell; + * Lvl2LPdim array of cell size, only entry at Lvl-1 is used; + * FixLstPt array of cell size, only entry at Lvl is used; + * MinNumPt array of cell size, only entry at Lvl is used; + * PtIn 2-dimensional matrix with as many rows as the cell size + * and as many columns as the total number of points, + * only the points in PtIn[Lvl] are accessed; + * ToOrig 2-dimensional integer matrix, as many rows as cell size, + * and as many columns as the total number of points; + * Pre2Cur 2-dimensional integer matrix, as many rows as cell size, + * and as many columns as the total number of points; + * FrstPt array of size of a mixed cell, + * serves as index vector to first point in current support; + * LstPt array of size of mixed cell, + * serves as index vector to last point in current support. + * + * ON RETURN : + * A constraints updated in A[Lvl], using A[Lvl-1]; + * PtIn updated entries in PtIn[Lvl]; + * ToOrig updated entries in ToOrig[Lvl]; + * Pre2Cur updated entries in Pre2Cur[Lvl]; + * FrstPt set FrstPt[Lvl] to zero; + * LstPt set LstPt[Lvl] to #constraints involved; + * info 0 if normal return, + * 1 if not enough points to extend, must backtrack. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/form_lp.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/form_lp.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/form_lp.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/form_lp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,376 +0,0 @@ -/* The file "form_lp.c" contains the definitions of the two functions - * whose prototypes are documented in the file "form_lp.h". */ - -#include -#include -#include -#include -#include "form_lp.h" - -void form_LP - ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, - double **ElmMtrx, int *NonZero, int *Lvl2CoDim, double ***A, - int Lvl, LPdata *ptr, int *Cell, int *Cell_Orig, int *Lvl2LPdim, - int *Lvl2Spt, int *FixFrstPt, int *FixLstPt, int *MinNumPt, - int **PtIn, int *Strt1Pt, int *End1Pt, int **ToOrig, - int **Pre2Cur, int *LPdim, int *FrstPt, int *LstPt, - int *Cur2Pre, double *x, double **Binv, int *Bidx, int *info ) -{ - int ibrk,ell,i,j,jj,i1,j1,k,kout,EndOldPart,FixPt_Orig,FixPt,nPtIn; - double smallnum=1.0e-12,dtmp; - double Elm1Var[nVar+1]; - const int Lvl1 = Lvl-1; - const int ynFixLstPt = FixLstPt[Lvl]; - const int ynFixFrstPt = FixFrstPt[Lvl]; - const int CurSpt = Lvl2Spt[Lvl]; /* index of current support */ - const int CoDim = Lvl2CoDim[Lvl]; - const int PreLPdim = Lvl2LPdim[Lvl-1]; - - *LPdim = Lvl2LPdim[Lvl]; /* Step 1 : search for LP constraints */ - FixPt = Cell[Lvl]; /* last point fixed */ - if(Lvl == 2) - { - FixPt_Orig = FixPt; - FixPt = Pre2Cur[Lvl1][FixPt]; - } - else - FixPt_Orig = ToOrig[Lvl1][FixPt]; - - nPtIn = -1; /* #points involved in the constraints - 1 */ - for(i1=0; i1=0; kout--) - if(fabs(Elm1Var[kout]) > smallnum) - { - ibrk=1; - break; - } - if(!ibrk) - { - printf("form_LP : cannot find a variable to eliminate.\a\n"); - abort(); - } - for(i=0; i smallnum) /* to eliminate */ - { - for(j1=0; j1 smallnum) /* to eliminate */ - { - for(j1=0; j1 smallnum) /* eliminate alpha0 */ - { - for(i=0; iJJJ[i]; - if(Bidx[i] == FixPt_Orig) - { - k = i; - ibrk = 1; - break; - } - } - else - for(i=0; iJJJ[i]; - if(Bidx[i] == FixPt) - { - k = i; - ibrk = 1; - break; - } - } - if(!ibrk) - { - printf("form_LP : no index match for reused info\a\n"); - abort(); - } - for(i=k+1; iJJJ[i]; - - if(Lvl > 2) - { - for(i=0; i-1) - Bidx[i] = Pre2Cur[Lvl][Bidx[i]]; /* may = -1 if eliminated */ - } - else - { - for(i=0; i-1) - { - Bidx[i] = Pre2Cur[1][Bidx[i]]; /* from level 0 to level 1 */ - if(Bidx[i]>-1) - Bidx[i] = Pre2Cur[Lvl][Bidx[i]]; /* level 1 to level 2 */ - } - } - for(i=0; ixxx[i]; - for(i=kout+1; ixxx[i]; - - for(j=0; jINV[j][i]; - for(i=kout+1; iINV[j][i]; - } - for(j=k+1; jINV[j][i]; - for(i=kout+1; iINV[j][i]; - } - if(ynFixLstPt) /* the 1st round 1-pt test for next supp */ - { - x[*LPdim-1] = DBL_MAX; /* The variable alpha0 */ - ell = -1; - for(i=*Strt1Pt; i<=*End1Pt; i++) - { - dtmp = A[Lvl][i][nVar]; - for(i1=0; i1<*LPdim-1; i1++) dtmp -= A[Lvl][i][i1]*x[i1]; - - if(x[*LPdim-1] > dtmp) - { - ell = i; - x[*LPdim-1] = dtmp; - } - } - if(ell < 0) - { - printf("FormLP : no ell\a\n"); - abort(); - } - Bidx[*LPdim-1] = ell; /* constraint becomes last element of base */ - for(i=0; i<*LPdim; i++) /* update the inverse matrix */ - Binv[*LPdim-1][i] = 0.0; - - for(j=0; j<*LPdim-1; j++) - { - dtmp = A[Lvl][ell][0]*Binv[j][0]; - for(i=1; i<*LPdim-1; i++) dtmp += A[Lvl][ell][i]*Binv[j][i]; - - Binv[j][*LPdim-1] = -dtmp; - } - Binv[*LPdim-1][*LPdim-1] = 1.0; - } - for(i=FrstPt[Lvl]; i<*Strt1Pt; i++) PtIn[Lvl][i] = 1; - for(i=*Strt1Pt; i<=*End1Pt; i++) PtIn[Lvl][i] = 0; - *info = 0; -} - -void form_LP1 - ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, - double ***A, int Lvl, int *Cell, int *Lvl2LPdim, int *FixLstPt, - int *MinNumPt, int **PtIn, int **ToOrig, int **Pre2Cur, - int *FrstPt, int *LstPt, int *info ) -{ - int i,j,j1,FixPt,nPtIn,Strt1Pt; - const int Lvl1 = Lvl - 1; - const int ynFixLstPt = FixLstPt[Lvl]; - const int PreLPdim = Lvl2LPdim[Lvl-1]; - - FixPt = Cell[Lvl]; /* last point fixed */ - nPtIn = -1; /* #points involved to form the constraints - 1 */ - FrstPt[Lvl] = 0; - - for(i=SptIdx[0]; i 1. - * - * ON ENTRY : - * nVar number of variables, ambient dimension; - * nSpt number of different supports; - * SptType array of range 0..nSpt with #occurrences of each support; - * SptIdx SptIdx[i] indicates the start of the i-th support; - * RelTab the relation table records edges on lower hull of - * each support or on pairwise Minkowski sums; - * ElmMtrx elimination matrix has dimension the size of a cell; - * NonZero array of dimension equal to the size of a mixed cell, - * but only one entry will be updated; - * Lvl2CoDim array of dimension equal to the size of a mixed cell, - * counts the number of variables eliminated, - * only the element at position Lvl is used; - * A 3-dimensional matrix, first dimension is the cell size, - * then every A[i] is a coefficient matrix of constraints, - * of dimension #constraints times nVar + 1; - * Lvl index of the current level; - * ptr pointer to LP data, used only for consultation; - * Cell indices of the current mixed cell; - * Cell_Orig indices to the original mixed cell; - * Lvl2LPdim array of cell size, only entries at Lvl and Lvl-1 are used; - * Lvl2Spt array of cell size, only entry at Lvl is used; - * FixFrstPt array of cell size, only entry at Lvl is used; - * FixLstPt array of cell size, only entry at Lvl is used; - * MinNumPt array of cell size, only entry at Lvl is used; - * PtIn 2-dimensional matrix with as many rows as the cell size - * and as many columns as the total number of points, - * only the points in PtIn[Lvl] and PtIn[Lvl-1] are accessed; - * ToOrig 2-dimensional integer matrix, as many rows as cell size, - * and as many columns as the total number of points; - * Pre2Cur 2-dimensional integer matrix, as many rows as cell size, - * and as many columns as the total number of points; - * FrstPt array of size of a mixed cell, - * serves as index vector to first point in current support; - * LstPt array of size of mixed cell, - * serves as index vector to last point in current support; - * Cur2Pre array of dimension equal to total number of points; - * x solution vector of dimension nVar; - * Binv matrix of dimension nVar, basis inverse; - * Bidx index vector for points in Pre2Cur, of dimension nVar. - * - * ON RETURN : - * ElmMtrx updated elimination matrix; - * NonZero entry at Lvl2CoDim[Lvl] is updated; - * Cell_Orig updated indices of the original mixed cell; - * PtIn updated entries at row Lvl; - * Strt1Pt index for where to start the 1-point tests; - * End1Pt index for where to end the 1-point tests; - * ToOrig updated entries at rows Lvl-1 and Lvl; - * Pre2Cur updated entries at row 1 and row Lvl; - * LPdim equals Lvl2LPdim[Lvl]; - * Cur2Pre updated index vector; - * x updated solution vector; - * Binv updated basis inverse; - * Bidx updated index vector; - * info 0 if normal return, - * 1 if not enough points to extend, must backtrack. */ - -void form_LP1 - ( int nVar, int nSpt, int *SptType, int *SptIdx, int **RelTab, - double ***A, int Lvl, int *Cell, int *Lvl2LPdim, int *FixLstPt, - int *MinNumPt, int **PtIn, int **ToOrig, int **Pre2Cur, - int *FrstPt, int *LstPt, int *info ); -/* - * DESCRIPTION : - * Defines the LP problems when the value of Lvl <= 1. - * - * ON ENTRY : - * nVar number of variables, ambient dimension; - * nSpt number of different supports; - * SptType array of range 0..nSpt with #occurrences of each support; - * SptIdx SptIdx[i] indicates the start of the i-th support; - * RelTab the relation table records edges on lower hull of - * each support or on pairwise Minkowski sums; - * A 3-dimensional matrix, first dimension is the cell size, - * then every A[i] is a coefficient matrix of constraints, - * of dimension #constraints times nVar + 1; - * Lvl index of the current level; - * Cell indices of the current mixed cell; - * Lvl2LPdim array of cell size, only entry at Lvl-1 is used; - * FixLstPt array of cell size, only entry at Lvl is used; - * MinNumPt array of cell size, only entry at Lvl is used; - * PtIn 2-dimensional matrix with as many rows as the cell size - * and as many columns as the total number of points, - * only the points in PtIn[Lvl] are accessed; - * ToOrig 2-dimensional integer matrix, as many rows as cell size, - * and as many columns as the total number of points; - * Pre2Cur 2-dimensional integer matrix, as many rows as cell size, - * and as many columns as the total number of points; - * FrstPt array of size of a mixed cell, - * serves as index vector to first point in current support; - * LstPt array of size of mixed cell, - * serves as index vector to last point in current support. - * - * ON RETURN : - * A constraints updated in A[Lvl], using A[Lvl-1]; - * PtIn updated entries in PtIn[Lvl]; - * ToOrig updated entries in ToOrig[Lvl]; - * Pre2Cur updated entries in Pre2Cur[Lvl]; - * FrstPt set FrstPt[Lvl] to zero; - * LstPt set LstPt[Lvl] to #constraints involved; - * info 0 if normal return, - * 1 if not enough points to extend, must backtrack. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,424 @@ +/* The file "index_tree_lp1.c" contains the definitions of the functions + * whose prototypes are documented in the file "index_tree_lp1.h". */ + +#include +#include +#include "index_tree_lp1.h" + +void LPdata_Init ( LPdata *p, int n, int *J, double *x, double **A ) +{ + int i,j; + + p->dim = n; + p->JJJ = (int*)calloc(n,sizeof(int)); + p->xxx = (double*)calloc(n,sizeof(double)); + p->INV = (double**)calloc(n,sizeof(double*)); + + for(i=0; iJJJ[i] = J[i]; + p->xxx[i] = x[i]; + p->INV[i] = (double*)calloc(n,sizeof(double)); + for(j=0; jINV[i][j] = A[i][j]; + } +} + +void IndexNode_Init ( IndexNode *p, int i, LPdata *ptr ) +{ + p->idx = i; + p->info = ptr; + p->S = 0; +} + +void LPPL_Init ( LPPL *p, LPdata *A, LPPL *N ) +{ + p->addr = A; + p->next = N; +} + +void IT_LP_Init ( IT_LP *p, int nSpt, int *type ) +{ + int i,j,sum,itmp=0; + + for(i=0; iMaxLevels = itmp + nSpt + 1; /* "+1" is for unused level 0 */ + p->CurLevel = 1; + + p->NP = (int*)calloc(p->MaxLevels,sizeof(int)); + p->DIM = (int*)calloc(p->MaxLevels,sizeof(int)); + p->cell = (int*)calloc(p->MaxLevels,sizeof(int)); + p->InSpt = (int*)calloc(p->MaxLevels,sizeof(int)); + p->minNP = (int*)calloc(p->MaxLevels,sizeof(int)); + + p->LP = (LPPL**)calloc(p->MaxLevels,sizeof(LPPL*)); + for(i=0; iMaxLevels; i++) + { + p->LP[i]=(LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP[i],0,0); + } + + p->IT = (IndexNode**)calloc(p->MaxLevels,sizeof(IndexNode*)); + p->last = (IndexNode**)calloc(p->MaxLevels,sizeof(IndexNode*)); + + memset(p->IT, 0, p->MaxLevels * sizeof(IndexNode*)); + memset(p->last, 0, p->MaxLevels * sizeof(IndexNode*)); + memset(p->NP, 0, p->MaxLevels * sizeof(int)); + memset(p->DIM, 0, p->MaxLevels * sizeof(int)); + memset(p->cell, 0, p->MaxLevels * sizeof(int)); + memset(p->InSpt, 0, p->MaxLevels * sizeof(int)); + memset(p->minNP, 0, p->MaxLevels * sizeof(int)); + + sum = 0; + p->DIM[sum] = itmp++; + for(i=0; iminNP[sum] = type[i]+1; + p->InSpt[sum] = i; + for(j=1; j<=type[i]; j++) + { + p->DIM[sum+j] = --itmp; + p->minNP[sum+j] = type[i]+1-j; + } + sum += type[i]+1; + if(sum < p->MaxLevels) p->DIM[sum] = itmp; + } + + p->IT[1]=(IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->IT[1],-1,0); + p->last[1] = p->prev = p->curr = p->IT[1]; /* points to dummy node */ + p->NP[1] = 1; +} + +int IT_IsEmpty ( IT_LP *p ) +{ + return (p->CurLevel<1); +} + +int IT_IsFull ( IT_LP *p ) +{ + return (p->CurLevel+1 >= p->MaxLevels); +} + +int IT_Level ( IT_LP *p ) +{ + return p->CurLevel; +} + +int IT_CurLPdim ( IT_LP *p ) +{ + return p->DIM[p->CurLevel]; +} + +int *IT_Cell ( IT_LP *p ) +{ + return p->cell + 1; +} + +int IT_CurSptIdx ( IT_LP *p ) +{ + return p->InSpt[p->CurLevel]; +} + +int IT_MinNumPt ( IT_LP *p ) +{ + return p->minNP[p->CurLevel]; +} + +int IT_NumPt ( IT_LP *p ) +{ + return p->NP[p->CurLevel]; +} + +IndexNode *IT_FixedIdxNdPtr ( IT_LP *p ) +{ + return (p->CurLevel>=0 ? p->IT[p->CurLevel] : 0); +} + +void IT_StepBack ( IT_LP *p ) +{ + (p->NP)[p->CurLevel--] = 0; +} + +int IT_Find ( IT_LP *p, int IDX ) +{ + for(p->curr=p->prev->S; + p->curr != p->last[p->CurLevel]->S; p->curr=p->curr->S) + { + if(IDX <= p->curr->idx) + { + if(IDX == p->curr->idx) + return 1; + else + return 0; + } + p->prev = p->prev->S; + } + return 0; +} + +IndexNode *IT_ResetCurLevelTo1 ( IT_LP *p ) +{ + p->prev = p->IT[1]; + p->curr = p->prev->S; + + while(p->curr) + { + p->prev->S = p->curr->S; + free(p->curr); + p->curr = p->prev->S; + } + p->NP[1]=1; + p->CurLevel=1; + + return p->IT[1]; +} + +void IT_RenewNP1 ( IT_LP *p ) +{ + for(p->prev=p->IT[1]; p->prev->S; p->prev=p->prev->S) + ++(p->NP[1]); + + p->last[1] = p->prev; + p->cell[1] = p->IT[1]->idx; +} + +int IT_NextLevel ( IT_LP *p ) +{ + IndexNode *tmp; + + if(p->CurLevel+1 >= p->MaxLevels) return 0; /* case 0 */ + else + { + if(p->NP[p->CurLevel] <= p->minNP[p->CurLevel]) return 0; /* case 1 */ + /* now IT[CurLevel] has enough points to go on */ + if(p->IT[p->CurLevel+1]) /* backtracking (next level non-empty) */ + { + tmp = p->IT[p->CurLevel+1]; + p->IT[p->CurLevel+1] = tmp->S; + tmp->S = (p->last[p->CurLevel])->S; + (p->last[p->CurLevel])->S = tmp; + tmp = p->IT[p->CurLevel]->S; + p->IT[p->CurLevel]->S = tmp->S; + tmp->S = p->IT[p->CurLevel+1]; + p->IT[p->CurLevel+1] = tmp; + } + else + { + tmp = p->IT[p->CurLevel]->S; + p->IT[p->CurLevel+1] = tmp; + p->IT[p->CurLevel]->S = tmp->S; + tmp->S = 0; + } + if(p->NP[p->CurLevel] == 2) p->last[p->CurLevel] = p->IT[p->CurLevel]; + --p->NP[p->CurLevel++]; + ++p->NP[p->CurLevel]; + p->last[p->CurLevel] = p->IT[p->CurLevel]; + p->curr = p->IT[p->CurLevel]; + p->cell[p->CurLevel] = p->curr->idx; + p->LPlast = p->LP[p->CurLevel]; + return 1; /* case 2 */ + } +} + +void IT_Add1 + ( IT_LP *p, int n, int *J, int nn, int *JJ, double *X, double **A ) +{ + int i,j,k; + int AddIdx = 0; + LPdata *lpp; + IndexNode *ptr; + + p->prev = p->IT[p->CurLevel]; /* moved out of for loop */ + /* Create or Overwrite LP: */ + for(i=0; iLPlast->next) + { + lpp = p->LPlast->next->addr; + for(k=0; kJJJ[k] = JJ[k]; + lpp->xxx[k] = X[k]; + for(j=0; jINV[k][j] = A[k][j]; + } + } + else + { + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,nn,JJ,X,A); + p->LPlast->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LPlast->next,lpp,0); + } + p->LPlast = p->LPlast->next; + AddIdx = 1; + break; + } + } + while(AddIdx) + { + if(!p->last[p->CurLevel]->S) /* IT[CurLevel] is full */ + { + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[i],lpp); + p->curr->S = p->prev->S; + p->prev = p->prev->S = p->curr; + if( (p->last[p->CurLevel])==(p->IT[p->CurLevel]) + || p->last[p->CurLevel]->idx < J[i] ) + p->last[p->CurLevel] = p->curr; + } /* spare slots for LP data */ + else if(p->last[p->CurLevel] == p->prev) /* after *last[CurLevel] */ + { + ptr = p->prev->S; + ptr->idx = J[i]; + ptr->info = lpp; + p->last[p->CurLevel] = ptr; + p->prev = ptr; + } + else /* intermediate position */ + { + ptr = p->last[p->CurLevel]->S; + ptr->idx = J[i]; + ptr->info = lpp; + p->prev->S = ptr; + p->last[p->CurLevel]->S = ptr->S; + ptr->S = p->curr; + p->prev = ptr; + } + ++p->NP[p->CurLevel]; + AddIdx = 0; + for(++i; iprev = p->IT[p->CurLevel]; + if(!IT_Find(p,oneidx)) /* add oneidx after prev */ + { + if(p->LPlast->next) + { + lpp = p->LPlast->next->addr; + for(i=0; iJJJ[i] = JJ[i]; + lpp->xxx[i] = X[i]; + for(j=0; jINV[i][j] = A[i][j]; + } + } + else + { + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,nn,JJ,X,A); + p->LPlast->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LPlast->next,lpp,0); + } + p->LPlast = p->LPlast->next; + + if(!p->last[p->CurLevel]->S) /* IT[CurLevel] is full */ + { + /* LPdata* LP = new LPdata(nn,JJ,X,A);*/ + p->curr=(IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,oneidx,lpp); + p->curr->S = p->prev->S; + p->prev = p->prev->S = p->curr; + if( p->last[p->CurLevel]->idx < oneidx ) + p->last[p->CurLevel] = p->curr; + } /* have spare slots for LP data .... */ + else if(p->last[p->CurLevel] == p->prev) /* after *last[CurLevel] */ + { + ptr = p->prev->S; + ptr->idx = oneidx; + ptr->info = lpp; + + p->last[p->CurLevel] = ptr; + p->prev = ptr; + } + else /* intermediate position before last, though last->S !=0 */ + { + ptr = p->last[p->CurLevel]->S; + ptr->idx = oneidx; + ptr->info = lpp; + p->prev->S = ptr; + p->last[p->CurLevel]->S = ptr->S; + ptr->S = p->curr; + p->prev = ptr; + } + ++p->NP[p->CurLevel]; + } +} + +void IT_LP_DEL ( IT_LP *p ) +{ + IT_FreeIT(p); + IT_FreeLP(p); + free(p->IT); + free(p->last); + free(p->LP); + free(p->NP); + free(p->DIM); + free(p->cell); + free(p->InSpt); + free(p->minNP); +} + +void IT_FreeIT ( IT_LP *p ) +{ + p->CurLevel = p->MaxLevels-1; + while( p->CurLevel > 1 ) + { + p->prev = p->IT[p->CurLevel]; + p->curr = p->prev->S; + while(p->curr) + { + p->prev->S = p->curr->S; + free(p->curr); + p->curr = p->prev->S; + } + --p->CurLevel; + } + for(p->CurLevel=0; p->CurLevelMaxLevels; p->CurLevel++) + free(p->IT[p->CurLevel]); +} + +void IT_FreeLP ( IT_LP *p ) +{ + int i; + LPdata *lpp; + + p->CurLevel = p->MaxLevels-1; + while(p->CurLevel > 1) + { + p->LPlast = (p->LP[p->CurLevel])->next; + while(p->LPlast) + { + p->LP[p->CurLevel]->next = p->LPlast->next; + lpp = p->LPlast->addr; + if(lpp) + { + free(lpp->JJJ); + free(lpp->xxx); + for(i=0; idim; i++) free(lpp->INV[i]); + free(lpp->INV); + } + free(p->LPlast); + p->LPlast = p->LP[p->CurLevel]->next; + } + --p->CurLevel; + } + for(p->CurLevel=0; p->CurLevelMaxLevels; p->CurLevel++) + free(p->LP[p->CurLevel]); +} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp1.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp1.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp1.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp1.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,261 @@ +/* The file "index_tree_lp1.h" defines the general data structures for an + * index tree of LP problems, with unused level 0, treated separtedly by + * the data structures and prototypes in zero_index_tree1.h. */ + +#ifndef _IT_LP1_H_ +#define _IT_LP1_H_ + +#include + +typedef struct LPdata LPdata; +typedef struct LPPL LPPL; +typedef struct IndexNode IndexNode; +typedef struct IT_LP IT_LP; + +struct LPdata /* LP data = indices to active constraints, */ +{ /* feasible solution, and basis inverse */ + int dim; /* size of the vectors xxx, JJJ, and matrix INV */ + double *xxx; /* vector of range 0..dim-1, solution vector */ + double **INV; /* matrix of dimension dim, basis inverse */ + int *JJJ; /* index vector for the solution to the LP problem */ +}; + +struct LPPL /* LP pointer linked list */ +{ + LPdata *addr; /* information of one node in the list */ + LPPL *next; /* pointer to the next item in the list */ +}; + +struct IndexNode /* node in linked list of LPdata */ +{ + int idx; /* index of the node is just a number */ + LPdata *info; /* information for an LP problem */ + IndexNode *S; /* points to next element in linked list */ +}; + +struct IT_LP /* index tree for LP problems */ +{ + int MaxLevels; /* maximal #levels for IT[] */ + int CurLevel; /* index to the current level */ + /* the next 5 items are arrays of dimension MaxLevels */ + int *DIM; /* dimension of LP in each level */ + int *NP; /* NP[L] = #nodes in IT[L], including fixed node. */ + int *cell; /* indices in horizontal branch of tree when full */ + int *InSpt; /* indices to the supports */ + int *minNP; /* minimal #nodes in IT[L], excluding fixed node. */ + + LPPL **LP; /* array of dimension MaxLevels of LP problems */ + LPPL *LPlast; /* points to the last valid node in LP[CurLevel] */ + + IndexNode **IT; /* array of size MaxLevels, IT[0] is not used */ + IndexNode **last; /* last[] points to the last valid node in IT[] */ + IndexNode *curr; /* pointer to the current IT node */ + IndexNode *prev; /* pointer to the previous IT node */ +}; + +void LPdata_Init ( LPdata *p, int n, int *J, double *x, double **A ); +/* + * DESCRIPTION : + * Initializes the data in p with the given parameters. + * + * ON ENTRY : + * p memory allocated to hold one structure of type LPdata; + * n dimension of the LP problem; + * J index vector for the solution of the LP problem; + * x vector of range 0..n-1, a solution vector; + * A matrix of dimension n, basis inverse used in LP. + * + * ON RETURN : + * p copies of J, x, and A are stored in p. */ + +void IndexNode_Init ( IndexNode *p, int i, LPdata *ptr ); +/* + * DESCRIPTION : + * Initializes the index node p with i and the LP data. + * + * ON ENTRY : + * p memory allocated to hold one IndexNode structure; + * i value for p->idx; + * ptr data of the LP problem. + * + * ON RETURN : + * p the pointer fields in p are assigned to i and ptr, + * no deep copies of the fields in ptr are made. */ + +void LPPL_Init ( LPPL *p, LPdata *A, LPPL *N ); +/* + * DESCRIPTION : + * Initializes the linked list of LP problems with the LP data in A + * and pointer to the next item in the list N. + * + * ON ENTRY : + * p memory allocated for one structure; + * A data for one LP problem; + * N pointer information to the next item in the list. + * + * ON RETURN : + * p structure with its two fields assigned to using A and N, + * no deep copies of the fields in p are made. */ + +void IT_LP_Init ( IT_LP *p, int nSpt, int *type ); +/* + * DESCRIPTION : + * Initialization of the index tree of linear programs p. + * + * ON ENTRY : + * p memory allocated for one structure; + * nSpt number of different supports; + * type type of mixture of the supports, + * given by an array of range 0..nSpt-1. + * + * ON RETURN : + * p allocated memory for all its members. */ + +int IT_IsEmpty ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the outcome of the test p->CurLevel < 1. */ + +int IT_IsFull ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the outcome of the test p->CurLevel+1 >= p->MaxLevels. */ + +int IT_Level ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the value of p->CurLevel, + * i.e.: the value of the current level in the index tree. */ + +int IT_CurLPdim ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the value of p->DIM[p->CurLevel], + * i.e.: the dimension of the LP problems at the current level. */ + +int *IT_Cell ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the address of p->cell + 1, + * i.e.: the pointer containing the indices of a horizontal branch. */ + +int IT_CurSptIdx ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the value of p->InSpt[p->CurLevel], + * i.e.: the index of the support concerning the current node. */ + +int IT_MinNumPt ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the value of p->minNP[p->CurLevel], + * i.e.: the minimal #points required for moving to the next level. */ + +int IT_NumPt ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns the value of p->NP[p->CurLevel], + * i.e.: the #points in the current vertical branch of the index tree. */ + +IndexNode *IT_FixedIdxNdPtr ( IT_LP *p ); +/* + * DESCRIPTION : + * For p nonempty, returns p->IT[p->CurLevel], + * i.e.: the current head of the vertical branch in the tree. */ + +void IT_StepBack ( IT_LP *p ); +/* + * DESCRIPTION : + * Sets the number of points at the current level to zero + * and decreases the value of p->CurLevel by one. */ + +int IT_Find ( IT_LP *p, int IDX ); +/* + * DESCRIPTION : + * Returns 0 if there is no index node in p with index equal to IDX, + * otherwise, 1 is returned and the p->curr->idx == IDX. + * + * ON ENTRY : + * p index tree with LP problems; + * IDX label to an index node. + * + * ON RETURN : + * 0 if there is no index node with index equal to IDX, + * 1 otherwise, in which case: p->curr->idx == IDX. */ + +IndexNode *IT_ResetCurLevelTo1 ( IT_LP *p ); +/* + * DESCRIPTION : + * Resets the value of p->CurLevel to 1, sets p->NP[1] to 1, + * sets p->prev to p->IT[1] and deallocates other entries; + * returns p->IT[1]. */ + +void IT_RenewNP1 ( IT_LP *p ); +/* + * DESCRIPTION : + * Increases the count of p->NP[1] by the number of elements in p->IT[1]. + * The values of p->last[1] and p->cell[1] are changed as well. */ + +int IT_NextLevel ( IT_LP *p ); +/* + * DESCRIPTION : + * Returns 0 if p->CurLevel is equal to the p->MaxLevels, or + * if the number of nodes at the current level is fewer + * than the minimal number of nodes at that level, + * otherwise 1 is returned and pointers are swapped to move through + * to the next level in the index tree of LP problems. */ + +void IT_Add1 + ( IT_LP *p, int n, int *J, int nn, int *JJ, double *X, double **A ); +/* + * DESCRIPTION : + * Updates the index tree of LP problems with data for one LP problem, + * for an array of indices to points. + * + * ON ENTRY : + * p index tree of LP problems; + * n dimension of the array J; + * J labels of points; + * nn dimension of the LP problem; + * JJ array of dimension nn with indices of the constraints involved; + * X solution vector of dimension nn; + * A basis inverse, matrix of dimension nn. + * + * ON RETURN : + * p updated index tree of LP problems. */ + +void IT_Add2 + ( IT_LP *p, int oneidx, int nn, int *JJ, double *X, double **A ); +/* + * DESCRIPTION : + * Updates the index tree of LP problems with data for one LP problem, + * for just one point. + * + * ON ENTRY : + * p index tree of LP problems; + * oneidx index to the point in the support; + * nn dimension of the LP problem; + * JJ array of dimension nn with indices of the constraints involved; + * X solution vector of dimension nn; + * A basis inverse, matrix of dimension nn. + * + * ON RETURN : + * p updated index tree of LP problems. */ + +void IT_LP_DEL ( IT_LP *p ); +/* + * DESCRIPTION : + * This is the main function to deallocate all memory occupied by p, + * it calls the other two IT_Free routines below. */ + +void IT_FreeIT ( IT_LP *p ); +/* + * DESCRIPTION : + * Deallocation of the index tree structures in p->IT. */ + +void IT_FreeLP ( IT_LP *p ); +/* + * DESCRIPTION : + * Deallocation of all the LP data in p->LP. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,424 +0,0 @@ -/* The file "index_tree_lp.c" contains the definitions of the functions - * whose prototypes are documented in the file "index_tree_lp.h". */ - -#include -#include -#include "index_tree_lp.h" - -void LPdata_Init ( LPdata *p, int n, int *J, double *x, double **A ) -{ - int i,j; - - p->dim = n; - p->JJJ = (int*)calloc(n,sizeof(int)); - p->xxx = (double*)calloc(n,sizeof(double)); - p->INV = (double**)calloc(n,sizeof(double*)); - - for(i=0; iJJJ[i] = J[i]; - p->xxx[i] = x[i]; - p->INV[i] = (double*)calloc(n,sizeof(double)); - for(j=0; jINV[i][j] = A[i][j]; - } -} - -void IndexNode_Init ( IndexNode *p, int i, LPdata *ptr ) -{ - p->idx = i; - p->info = ptr; - p->S = 0; -} - -void LPPL_Init ( LPPL *p, LPdata *A, LPPL *N ) -{ - p->addr = A; - p->next = N; -} - -void IT_LP_Init ( IT_LP *p, int nSpt, int *type ) -{ - int i,j,sum,itmp=0; - - for(i=0; iMaxLevels = itmp + nSpt + 1; /* "+1" is for unused level 0 */ - p->CurLevel = 1; - - p->NP = (int*)calloc(p->MaxLevels,sizeof(int)); - p->DIM = (int*)calloc(p->MaxLevels,sizeof(int)); - p->cell = (int*)calloc(p->MaxLevels,sizeof(int)); - p->InSpt = (int*)calloc(p->MaxLevels,sizeof(int)); - p->minNP = (int*)calloc(p->MaxLevels,sizeof(int)); - - p->LP = (LPPL**)calloc(p->MaxLevels,sizeof(LPPL*)); - for(i=0; iMaxLevels; i++) - { - p->LP[i]=(LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP[i],0,0); - } - - p->IT = (IndexNode**)calloc(p->MaxLevels,sizeof(IndexNode*)); - p->last = (IndexNode**)calloc(p->MaxLevels,sizeof(IndexNode*)); - - memset(p->IT, 0, p->MaxLevels * sizeof(IndexNode*)); - memset(p->last, 0, p->MaxLevels * sizeof(IndexNode*)); - memset(p->NP, 0, p->MaxLevels * sizeof(int)); - memset(p->DIM, 0, p->MaxLevels * sizeof(int)); - memset(p->cell, 0, p->MaxLevels * sizeof(int)); - memset(p->InSpt, 0, p->MaxLevels * sizeof(int)); - memset(p->minNP, 0, p->MaxLevels * sizeof(int)); - - sum = 0; - p->DIM[sum] = itmp++; - for(i=0; iminNP[sum] = type[i]+1; - p->InSpt[sum] = i; - for(j=1; j<=type[i]; j++) - { - p->DIM[sum+j] = --itmp; - p->minNP[sum+j] = type[i]+1-j; - } - sum += type[i]+1; - if(sum < p->MaxLevels) p->DIM[sum] = itmp; - } - - p->IT[1]=(IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->IT[1],-1,0); - p->last[1] = p->prev = p->curr = p->IT[1]; /* points to dummy node */ - p->NP[1] = 1; -} - -int IT_IsEmpty ( IT_LP *p ) -{ - return (p->CurLevel<1); -} - -int IT_IsFull ( IT_LP *p ) -{ - return (p->CurLevel+1 >= p->MaxLevels); -} - -int IT_Level ( IT_LP *p ) -{ - return p->CurLevel; -} - -int IT_CurLPdim ( IT_LP *p ) -{ - return p->DIM[p->CurLevel]; -} - -int *IT_Cell ( IT_LP *p ) -{ - return p->cell + 1; -} - -int IT_CurSptIdx ( IT_LP *p ) -{ - return p->InSpt[p->CurLevel]; -} - -int IT_MinNumPt ( IT_LP *p ) -{ - return p->minNP[p->CurLevel]; -} - -int IT_NumPt ( IT_LP *p ) -{ - return p->NP[p->CurLevel]; -} - -IndexNode *IT_FixedIdxNdPtr ( IT_LP *p ) -{ - return (p->CurLevel>=0 ? p->IT[p->CurLevel] : 0); -} - -void IT_StepBack ( IT_LP *p ) -{ - (p->NP)[p->CurLevel--] = 0; -} - -int IT_Find ( IT_LP *p, int IDX ) -{ - for(p->curr=p->prev->S; - p->curr != p->last[p->CurLevel]->S; p->curr=p->curr->S) - { - if(IDX <= p->curr->idx) - { - if(IDX == p->curr->idx) - return 1; - else - return 0; - } - p->prev = p->prev->S; - } - return 0; -} - -IndexNode *IT_ResetCurLevelTo1 ( IT_LP *p ) -{ - p->prev = p->IT[1]; - p->curr = p->prev->S; - - while(p->curr) - { - p->prev->S = p->curr->S; - free(p->curr); - p->curr = p->prev->S; - } - p->NP[1]=1; - p->CurLevel=1; - - return p->IT[1]; -} - -void IT_RenewNP1 ( IT_LP *p ) -{ - for(p->prev=p->IT[1]; p->prev->S; p->prev=p->prev->S) - ++(p->NP[1]); - - p->last[1] = p->prev; - p->cell[1] = p->IT[1]->idx; -} - -int IT_NextLevel ( IT_LP *p ) -{ - IndexNode *tmp; - - if(p->CurLevel+1 >= p->MaxLevels) return 0; /* case 0 */ - else - { - if(p->NP[p->CurLevel] <= p->minNP[p->CurLevel]) return 0; /* case 1 */ - /* now IT[CurLevel] has enough points to go on */ - if(p->IT[p->CurLevel+1]) /* backtracking (next level non-empty) */ - { - tmp = p->IT[p->CurLevel+1]; - p->IT[p->CurLevel+1] = tmp->S; - tmp->S = (p->last[p->CurLevel])->S; - (p->last[p->CurLevel])->S = tmp; - tmp = p->IT[p->CurLevel]->S; - p->IT[p->CurLevel]->S = tmp->S; - tmp->S = p->IT[p->CurLevel+1]; - p->IT[p->CurLevel+1] = tmp; - } - else - { - tmp = p->IT[p->CurLevel]->S; - p->IT[p->CurLevel+1] = tmp; - p->IT[p->CurLevel]->S = tmp->S; - tmp->S = 0; - } - if(p->NP[p->CurLevel] == 2) p->last[p->CurLevel] = p->IT[p->CurLevel]; - --p->NP[p->CurLevel++]; - ++p->NP[p->CurLevel]; - p->last[p->CurLevel] = p->IT[p->CurLevel]; - p->curr = p->IT[p->CurLevel]; - p->cell[p->CurLevel] = p->curr->idx; - p->LPlast = p->LP[p->CurLevel]; - return 1; /* case 2 */ - } -} - -void IT_Add1 - ( IT_LP *p, int n, int *J, int nn, int *JJ, double *X, double **A ) -{ - int i,j,k; - int AddIdx = 0; - LPdata *lpp; - IndexNode *ptr; - - p->prev = p->IT[p->CurLevel]; /* moved out of for loop */ - /* Create or Overwrite LP: */ - for(i=0; iLPlast->next) - { - lpp = p->LPlast->next->addr; - for(k=0; kJJJ[k] = JJ[k]; - lpp->xxx[k] = X[k]; - for(j=0; jINV[k][j] = A[k][j]; - } - } - else - { - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,nn,JJ,X,A); - p->LPlast->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LPlast->next,lpp,0); - } - p->LPlast = p->LPlast->next; - AddIdx = 1; - break; - } - } - while(AddIdx) - { - if(!p->last[p->CurLevel]->S) /* IT[CurLevel] is full */ - { - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[i],lpp); - p->curr->S = p->prev->S; - p->prev = p->prev->S = p->curr; - if( (p->last[p->CurLevel])==(p->IT[p->CurLevel]) - || p->last[p->CurLevel]->idx < J[i] ) - p->last[p->CurLevel] = p->curr; - } /* spare slots for LP data */ - else if(p->last[p->CurLevel] == p->prev) /* after *last[CurLevel] */ - { - ptr = p->prev->S; - ptr->idx = J[i]; - ptr->info = lpp; - p->last[p->CurLevel] = ptr; - p->prev = ptr; - } - else /* intermediate position */ - { - ptr = p->last[p->CurLevel]->S; - ptr->idx = J[i]; - ptr->info = lpp; - p->prev->S = ptr; - p->last[p->CurLevel]->S = ptr->S; - ptr->S = p->curr; - p->prev = ptr; - } - ++p->NP[p->CurLevel]; - AddIdx = 0; - for(++i; iprev = p->IT[p->CurLevel]; - if(!IT_Find(p,oneidx)) /* add oneidx after prev */ - { - if(p->LPlast->next) - { - lpp = p->LPlast->next->addr; - for(i=0; iJJJ[i] = JJ[i]; - lpp->xxx[i] = X[i]; - for(j=0; jINV[i][j] = A[i][j]; - } - } - else - { - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,nn,JJ,X,A); - p->LPlast->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LPlast->next,lpp,0); - } - p->LPlast = p->LPlast->next; - - if(!p->last[p->CurLevel]->S) /* IT[CurLevel] is full */ - { - /* LPdata* LP = new LPdata(nn,JJ,X,A);*/ - p->curr=(IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,oneidx,lpp); - p->curr->S = p->prev->S; - p->prev = p->prev->S = p->curr; - if( p->last[p->CurLevel]->idx < oneidx ) - p->last[p->CurLevel] = p->curr; - } /* have spare slots for LP data .... */ - else if(p->last[p->CurLevel] == p->prev) /* after *last[CurLevel] */ - { - ptr = p->prev->S; - ptr->idx = oneidx; - ptr->info = lpp; - - p->last[p->CurLevel] = ptr; - p->prev = ptr; - } - else /* intermediate position before last, though last->S !=0 */ - { - ptr = p->last[p->CurLevel]->S; - ptr->idx = oneidx; - ptr->info = lpp; - p->prev->S = ptr; - p->last[p->CurLevel]->S = ptr->S; - ptr->S = p->curr; - p->prev = ptr; - } - ++p->NP[p->CurLevel]; - } -} - -void IT_LP_DEL ( IT_LP *p ) -{ - IT_FreeIT(p); - IT_FreeLP(p); - free(p->IT); - free(p->last); - free(p->LP); - free(p->NP); - free(p->DIM); - free(p->cell); - free(p->InSpt); - free(p->minNP); -} - -void IT_FreeIT ( IT_LP *p ) -{ - p->CurLevel = p->MaxLevels-1; - while( p->CurLevel > 1 ) - { - p->prev = p->IT[p->CurLevel]; - p->curr = p->prev->S; - while(p->curr) - { - p->prev->S = p->curr->S; - free(p->curr); - p->curr = p->prev->S; - } - --p->CurLevel; - } - for(p->CurLevel=0; p->CurLevelMaxLevels; p->CurLevel++) - free(p->IT[p->CurLevel]); -} - -void IT_FreeLP ( IT_LP *p ) -{ - int i; - LPdata *lpp; - - p->CurLevel = p->MaxLevels-1; - while(p->CurLevel > 1) - { - p->LPlast = (p->LP[p->CurLevel])->next; - while(p->LPlast) - { - p->LP[p->CurLevel]->next = p->LPlast->next; - lpp = p->LPlast->addr; - if(lpp) - { - free(lpp->JJJ); - free(lpp->xxx); - for(i=0; idim; i++) free(lpp->INV[i]); - free(lpp->INV); - } - free(p->LPlast); - p->LPlast = p->LP[p->CurLevel]->next; - } - --p->CurLevel; - } - for(p->CurLevel=0; p->CurLevelMaxLevels; p->CurLevel++) - free(p->LP[p->CurLevel]); -} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/index_tree_lp.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/index_tree_lp.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,261 +0,0 @@ -/* The file "index_tree_lp.h" defines the general data structures for an - * index tree of LP problems, with unused level 0, treated separtedly by - * the data structures and prototypes in zero_index_tree.h. */ - -#ifndef _IT_LP_H_ -#define _IT_LP_H_ - -#include - -typedef struct LPdata LPdata; -typedef struct LPPL LPPL; -typedef struct IndexNode IndexNode; -typedef struct IT_LP IT_LP; - -struct LPdata /* LP data = indices to active constraints, */ -{ /* feasible solution, and basis inverse */ - int dim; /* size of the vectors xxx, JJJ, and matrix INV */ - double *xxx; /* vector of range 0..dim-1, solution vector */ - double **INV; /* matrix of dimension dim, basis inverse */ - int *JJJ; /* index vector for the solution to the LP problem */ -}; - -struct LPPL /* LP pointer linked list */ -{ - LPdata *addr; /* information of one node in the list */ - LPPL *next; /* pointer to the next item in the list */ -}; - -struct IndexNode /* node in linked list of LPdata */ -{ - int idx; /* index of the node is just a number */ - LPdata *info; /* information for an LP problem */ - IndexNode *S; /* points to next element in linked list */ -}; - -struct IT_LP /* index tree for LP problems */ -{ - int MaxLevels; /* maximal #levels for IT[] */ - int CurLevel; /* index to the current level */ - /* the next 5 items are arrays of dimension MaxLevels */ - int *DIM; /* dimension of LP in each level */ - int *NP; /* NP[L] = #nodes in IT[L], including fixed node. */ - int *cell; /* indices in horizontal branch of tree when full */ - int *InSpt; /* indices to the supports */ - int *minNP; /* minimal #nodes in IT[L], excluding fixed node. */ - - LPPL **LP; /* array of dimension MaxLevels of LP problems */ - LPPL *LPlast; /* points to the last valid node in LP[CurLevel] */ - - IndexNode **IT; /* array of size MaxLevels, IT[0] is not used */ - IndexNode **last; /* last[] points to the last valid node in IT[] */ - IndexNode *curr; /* pointer to the current IT node */ - IndexNode *prev; /* pointer to the previous IT node */ -}; - -void LPdata_Init ( LPdata *p, int n, int *J, double *x, double **A ); -/* - * DESCRIPTION : - * Initializes the data in p with the given parameters. - * - * ON ENTRY : - * p memory allocated to hold one structure of type LPdata; - * n dimension of the LP problem; - * J index vector for the solution of the LP problem; - * x vector of range 0..n-1, a solution vector; - * A matrix of dimension n, basis inverse used in LP. - * - * ON RETURN : - * p copies of J, x, and A are stored in p. */ - -void IndexNode_Init ( IndexNode *p, int i, LPdata *ptr ); -/* - * DESCRIPTION : - * Initializes the index node p with i and the LP data. - * - * ON ENTRY : - * p memory allocated to hold one IndexNode structure; - * i value for p->idx; - * ptr data of the LP problem. - * - * ON RETURN : - * p the pointer fields in p are assigned to i and ptr, - * no deep copies of the fields in ptr are made. */ - -void LPPL_Init ( LPPL *p, LPdata *A, LPPL *N ); -/* - * DESCRIPTION : - * Initializes the linked list of LP problems with the LP data in A - * and pointer to the next item in the list N. - * - * ON ENTRY : - * p memory allocated for one structure; - * A data for one LP problem; - * N pointer information to the next item in the list. - * - * ON RETURN : - * p structure with its two fields assigned to using A and N, - * no deep copies of the fields in p are made. */ - -void IT_LP_Init ( IT_LP *p, int nSpt, int *type ); -/* - * DESCRIPTION : - * Initialization of the index tree of linear programs p. - * - * ON ENTRY : - * p memory allocated for one structure; - * nSpt number of different supports; - * type type of mixture of the supports, - * given by an array of range 0..nSpt-1. - * - * ON RETURN : - * p allocated memory for all its members. */ - -int IT_IsEmpty ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the outcome of the test p->CurLevel < 1. */ - -int IT_IsFull ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the outcome of the test p->CurLevel+1 >= p->MaxLevels. */ - -int IT_Level ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the value of p->CurLevel, - * i.e.: the value of the current level in the index tree. */ - -int IT_CurLPdim ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the value of p->DIM[p->CurLevel], - * i.e.: the dimension of the LP problems at the current level. */ - -int *IT_Cell ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the address of p->cell + 1, - * i.e.: the pointer containing the indices of a horizontal branch. */ - -int IT_CurSptIdx ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the value of p->InSpt[p->CurLevel], - * i.e.: the index of the support concerning the current node. */ - -int IT_MinNumPt ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the value of p->minNP[p->CurLevel], - * i.e.: the minimal #points required for moving to the next level. */ - -int IT_NumPt ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns the value of p->NP[p->CurLevel], - * i.e.: the #points in the current vertical branch of the index tree. */ - -IndexNode *IT_FixedIdxNdPtr ( IT_LP *p ); -/* - * DESCRIPTION : - * For p nonempty, returns p->IT[p->CurLevel], - * i.e.: the current head of the vertical branch in the tree. */ - -void IT_StepBack ( IT_LP *p ); -/* - * DESCRIPTION : - * Sets the number of points at the current level to zero - * and decreases the value of p->CurLevel by one. */ - -int IT_Find ( IT_LP *p, int IDX ); -/* - * DESCRIPTION : - * Returns 0 if there is no index node in p with index equal to IDX, - * otherwise, 1 is returned and the p->curr->idx == IDX. - * - * ON ENTRY : - * p index tree with LP problems; - * IDX label to an index node. - * - * ON RETURN : - * 0 if there is no index node with index equal to IDX, - * 1 otherwise, in which case: p->curr->idx == IDX. */ - -IndexNode *IT_ResetCurLevelTo1 ( IT_LP *p ); -/* - * DESCRIPTION : - * Resets the value of p->CurLevel to 1, sets p->NP[1] to 1, - * sets p->prev to p->IT[1] and deallocates other entries; - * returns p->IT[1]. */ - -void IT_RenewNP1 ( IT_LP *p ); -/* - * DESCRIPTION : - * Increases the count of p->NP[1] by the number of elements in p->IT[1]. - * The values of p->last[1] and p->cell[1] are changed as well. */ - -int IT_NextLevel ( IT_LP *p ); -/* - * DESCRIPTION : - * Returns 0 if p->CurLevel is equal to the p->MaxLevels, or - * if the number of nodes at the current level is fewer - * than the minimal number of nodes at that level, - * otherwise 1 is returned and pointers are swapped to move through - * to the next level in the index tree of LP problems. */ - -void IT_Add1 - ( IT_LP *p, int n, int *J, int nn, int *JJ, double *X, double **A ); -/* - * DESCRIPTION : - * Updates the index tree of LP problems with data for one LP problem, - * for an array of indices to points. - * - * ON ENTRY : - * p index tree of LP problems; - * n dimension of the array J; - * J labels of points; - * nn dimension of the LP problem; - * JJ array of dimension nn with indices of the constraints involved; - * X solution vector of dimension nn; - * A basis inverse, matrix of dimension nn. - * - * ON RETURN : - * p updated index tree of LP problems. */ - -void IT_Add2 - ( IT_LP *p, int oneidx, int nn, int *JJ, double *X, double **A ); -/* - * DESCRIPTION : - * Updates the index tree of LP problems with data for one LP problem, - * for just one point. - * - * ON ENTRY : - * p index tree of LP problems; - * oneidx index to the point in the support; - * nn dimension of the LP problem; - * JJ array of dimension nn with indices of the constraints involved; - * X solution vector of dimension nn; - * A basis inverse, matrix of dimension nn. - * - * ON RETURN : - * p updated index tree of LP problems. */ - -void IT_LP_DEL ( IT_LP *p ); -/* - * DESCRIPTION : - * This is the main function to deallocate all memory occupied by p, - * it calls the other two IT_Free routines below. */ - -void IT_FreeIT ( IT_LP *p ); -/* - * DESCRIPTION : - * Deallocation of the index tree structures in p->IT. */ - -void IT_FreeLP ( IT_LP *p ); -/* - * DESCRIPTION : - * Deallocation of all the LP data in p->LP. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mixedvol.gpr phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mixedvol.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mixedvol.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mixedvol.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,83 @@ +project mixedvol is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../../CtoPHC/Types" + ); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../../CtoPHC/Types" + ); + end case; + + for Languages use ("Ada", "C"); + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_convsub.adb", -- tests a subdivision conversion + "ts_mv2c.adb", -- tests the C program mv + "ts_mv.adb", -- tests the Ada translation of mv + "ts_mva" -- tests the code in MixedVol_Algorithm + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + for Switches ("use_c2phc.adb") use ("-c"); + + end Compiler; + + package Linker is + + for Switches ("ts_mv2c.adb") use ("-lm"); + + end Linker; + +end mixedvol; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mixed_volume1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mixed_volume1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mixed_volume1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mixed_volume1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,419 @@ +/* The file "mixed_volume1.c" contains the definitions of the prototypes + * in the file "mixed_volume1.h". */ + +#include +#include +#include +#include +#include +#include "mixed_volume1.h" +#include "index_tree_lp1.h" +#include "form_lp1.h" +#include "relation_table1.h" +#include "one_level_lp1.h" + +void write_relation_table ( int n, int **RelTab ) +{ + int i,j; + + for(i=0; iidx; + /* The index of the point to be fixed */ + ptr = IT_FixedIdxNdPtr(ItLp)->info; + /* The ptr to saved x, Binv and jj */ + + if(Lvl <= 1) /* eliminate and form new system Ax <= b */ + { + Cell_Orig[Lvl] = Cell[Lvl]; + form_LP1(nVar,nSpt,SptType,SptIdx,RelTab,A,Lvl,Cell, + Lvl2LPdim,FixLstPt,MinNumPt,PtIn, + ToOrig,Pre2Cur,FrstPt,LstPt,&info); + } + else /* eliminate, form new Ax <= b and solve the LP */ + { + form_LP(nVar,nSpt,SptType,SptIdx,RelTab,ElmMtrx,NonZero, + Lvl2CoDim,A,Lvl,ptr,Cell,Cell_Orig,Lvl2LPdim,Lvl2Spt, + FixFrstPt,FixLstPt,MinNumPt,PtIn, + &Strt1Pt,&End1Pt,ToOrig,Pre2Cur,&LPdim, + FrstPt,LstPt,Cur2Pre,x,Binv,Bidx,&info); + + if(info == 0) + one_level_LP(Strt1Pt,End1Pt,PtIn[Lvl], + LPdim,A[Lvl],nVar,x,Binv,Bidx,ItLp); + } + } /* This level finished */ + while(!IT_NextLevel(ItLp) && !IT_IsEmpty(ItLp)) + { + if(IT_IsFull(ItLp)) + { + labels[0] = IT_Cell(ItLp)[0]; + labels[1] = IT_Cell(ItLp)[1]; + for(i=2; i maxvalue) + { + maxvalue = temp; + pivot = j; + } + } + if(maxvalue == 0.0) return 0; + + if(pivot != i) /* swap two rows */ + { + for(k=0; k=0; --i ) + { + for(p = b+i+1, q=A[i]+i+1; p < b + n; ) + b[i] -= (*p++)*(*q++); + + b[i] /= A[i][i]; + } + return 1; +} + +void write_cells + ( int ncfn, char output_file[ncfn], + int nVar, int nSpt, int *SptType, int **Spt, double *lft, + int CellSize, int nMCells, CellStack *MCells ) +{ + FILE *fp; + int i,k,m,kk,d,dd; + double A[nVar][nVar]; + double rhs[nVar]; + int *labels = (int*)calloc(CellSize,sizeof(int)); + + if((fp=fopen(output_file,"w")) == NULL) + { + printf("Opening the file %s for writing failed.\n",output_file); + exit(1); + } + + fprintf(fp,"%d\n",nVar); + fprintf(fp,"%d\n",nSpt); + + for(i=0; i -#include -#include -#include -#include -#include "mixed_volume.h" -#include "index_tree_lp.h" -#include "form_lp.h" -#include "relation_table.h" - -void write_relation_table ( int n, int **RelTab ) -{ - int i,j; - - for(i=0; iidx; - /* The index of the point to be fixed */ - ptr = IT_FixedIdxNdPtr(ItLp)->info; - /* The ptr to saved x, Binv and jj */ - - if(Lvl <= 1) /* eliminate and form new system Ax <= b */ - { - Cell_Orig[Lvl] = Cell[Lvl]; - form_LP1(nVar,nSpt,SptType,SptIdx,RelTab,A,Lvl,Cell, - Lvl2LPdim,FixLstPt,MinNumPt,PtIn, - ToOrig,Pre2Cur,FrstPt,LstPt,&info); - } - else /* eliminate, form new Ax <= b and solve the LP */ - { - form_LP(nVar,nSpt,SptType,SptIdx,RelTab,ElmMtrx,NonZero, - Lvl2CoDim,A,Lvl,ptr,Cell,Cell_Orig,Lvl2LPdim,Lvl2Spt, - FixFrstPt,FixLstPt,MinNumPt,PtIn, - &Strt1Pt,&End1Pt,ToOrig,Pre2Cur,&LPdim, - FrstPt,LstPt,Cur2Pre,x,Binv,Bidx,&info); - - if(info == 0) - one_level_LP(Strt1Pt,End1Pt,PtIn[Lvl], - LPdim,A[Lvl],nVar,x,Binv,Bidx,ItLp); - } - } /* This level finished */ - while(!IT_NextLevel(ItLp) && !IT_IsEmpty(ItLp)) - { - if(IT_IsFull(ItLp)) - { - labels[0] = IT_Cell(ItLp)[0]; - labels[1] = IT_Cell(ItLp)[1]; - for(i=2; i maxvalue) - { - maxvalue = temp; - pivot = j; - } - } - if(maxvalue == 0.0) return 0; - - if(pivot != i) /* swap two rows */ - { - for(k=0; k=0; --i ) - { - for(p = b+i+1, q=A[i]+i+1; p < b + n; ) - b[i] -= (*p++)*(*q++); - - b[i] /= A[i][i]; - } - return 1; -} - -void write_cells - ( int ncfn, char output_file[ncfn], - int nVar, int nSpt, int *SptType, int **Spt, double *lft, - int CellSize, int nMCells, CellStack *MCells ) -{ - FILE *fp; - int i,k,m,kk,d,dd; - double A[nVar][nVar]; - double rhs[nVar]; - int *labels = (int*)calloc(CellSize,sizeof(int)); - - if((fp=fopen(output_file,"w")) == NULL) - { - printf("Opening the file %s for writing failed.\n",output_file); - exit(1); - } - - fprintf(fp,"%d\n",nVar); - fprintf(fp,"%d\n",nSpt); - - for(i=0; i +#include +#include +#include +#include "prepare_for_mv1.h" +#include "mixed_volume1.h" + +int max ( int x, int y ); /* returns max(x,y) */ +int min ( int x, int y ); /* returns min(x,y) */ + +int quick_return ( int nVar, int *SptIdx, int **Spt ); +/* + * DESCRITION : + * Returns 1 if the system is univariate, or linear, or if some supports + * have fewer than two terms in them, printing a message; + * otherwise 0 is returned. */ + +int mv1 ( int fns, int *fn, int nVar, int nPts, int *ind, int *cnt, int *sup ) +{ + int i,j,p,nS,nSpt,CellSize,MVol,nbCells; + int *SptIdx,**Spt,*SptType,*VtxIdx,**Vtx,*NuIdx2OldIdx; + double *lft; + CellStack *MCells; + char output_file[fns+1]; + + for(i=0; i < fns; i++) output_file[i] = (char) fn[i]; + output_file[fns] = '\0'; + + SptIdx = (int*)calloc(nVar+1,sizeof(int)); /* prepare supports */ + for(i=0; i=0; i--) + SptIdx[i] = SptIdx[i+1] - SptIdx[i]; + + if(quick_return(nVar,SptIdx,Spt) == 1) exit(0); + + SptType = (int*)calloc(nVar,sizeof(int)); /* preprocessing phase */ + VtxIdx = (int*)calloc(nVar+1,sizeof(int)); + Vtx = (int**)calloc(nPts,sizeof(int*)); + for(i=0; i=y) + return x; + else + return y; +} + +int min ( int x, int y ) +{ + if(x<=y) + return x; + else + return y; +} + +int quick_return ( int nVar, int *SptIdx, int **Spt ) +{ + int i,j,k,kmin,kmax; + + k = -1; + for(i=0; i= 0) + { + printf("The %d-th support has less than 2 points\n",k+1); + return 1; /* end of the case: too few terms */ + } + if(nVar == 1) + { + kmin = INT_MAX/2; + kmax = -INT_MAX/2; + for(i=0; i 1 || k > 1) + { + j = -1; + break; + } + } + if(j != -1) + { + printf("A linear support, its mixed volume <= 1\n"); + return 1; /* end of the case: linear system */ + } + return 0; /* no quick return */ +} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv1.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv1.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv1.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv1.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,13 @@ +int mv1 ( int ns, int *fn, int nVar, int nPts, int *ind, int *cnt, int *sup ); +/* + * DESCRITPION : + * Computes the mixed volume of the polytopes spanned by given supports. + * + * ON ENTRY : + * ns number of 'characters' in the file name fn; + * fn name of the output file for the mixed-cell configuration; + * nVar ambient dimension, length of the vectors in supports; + * nPts total number of points in the supports; + * ind ind(i) is the start of the i-th support; + * cnt cnt(i) counts the length of the i-th support; + * sup coordinates of the points in the supports. */ diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ -/* This is the main program to compute the mixed volume of an n-tuple - * of Newton polytopes, derived from the software MixVol of Tangan Gao, - * Tien-Yien Li, Li Xing, and Mengnien Wu. */ - -#include -#include -#include -#include -#include "prepare_for_mv.h" -#include "mixed_volume.h" - -int max ( int x, int y ); /* returns max(x,y) */ -int min ( int x, int y ); /* returns min(x,y) */ - -int quick_return ( int nVar, int *SptIdx, int **Spt ); -/* - * DESCRITION : - * Returns 1 if the system is univariate, or linear, or if some supports - * have fewer than two terms in them, printing a message; - * otherwise 0 is returned. */ - -int mv ( int fns, int *fn, int nVar, int nPts, int *ind, int *cnt, int *sup ) -{ - int i,j,p,nS,nSpt,CellSize,MVol,nbCells; - int *SptIdx,**Spt,*SptType,*VtxIdx,**Vtx,*NuIdx2OldIdx; - double *lft; - CellStack *MCells; - char output_file[fns+1]; - - for(i=0; i < fns; i++) output_file[i] = (char) fn[i]; - output_file[fns] = '\0'; - - SptIdx = (int*)calloc(nVar+1,sizeof(int)); /* prepare supports */ - for(i=0; i=0; i--) - SptIdx[i] = SptIdx[i+1] - SptIdx[i]; - - if(quick_return(nVar,SptIdx,Spt) == 1) exit(0); - - SptType = (int*)calloc(nVar,sizeof(int)); /* preprocessing phase */ - VtxIdx = (int*)calloc(nVar+1,sizeof(int)); - Vtx = (int**)calloc(nPts,sizeof(int*)); - for(i=0; i=y) - return x; - else - return y; -} - -int min ( int x, int y ) -{ - if(x<=y) - return x; - else - return y; -} - -int quick_return ( int nVar, int *SptIdx, int **Spt ) -{ - int i,j,k,kmin,kmax; - - k = -1; - for(i=0; i= 0) - { - printf("The %d-th support has less than 2 points\n",k+1); - return 1; /* end of the case: too few terms */ - } - if(nVar == 1) - { - kmin = INT_MAX/2; - kmax = -INT_MAX/2; - for(i=0; i 1 || k > 1) - { - j = -1; - break; - } - } - if(j != -1) - { - printf("A linear support, its mixed volume <= 1\n"); - return 1; /* end of the case: linear system */ - } - return 0; /* no quick return */ -} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/mv.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/mv.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -int mv ( int ns, int *fn, int nVar, int nPts, int *ind, int *cnt, int *sup ); -/* - * DESCRITPION : - * Computes the mixed volume of the polytopes spanned by given supports. - * - * ON ENTRY : - * ns number of 'characters' in the file name fn; - * fn name of the output file for the mixed-cell configuration; - * nVar ambient dimension, length of the vectors in supports; - * nPts total number of points in the supports; - * ind ind(i) is the start of the i-th support; - * cnt cnt(i) counts the length of the i-th support; - * sup coordinates of the points in the supports. */ diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/one_level_lp1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/one_level_lp1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/one_level_lp1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/one_level_lp1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,439 @@ +/* The file "one_level_lp1.c" collects the definitions of the functions + * with prototypes in "one_level_lp1.h". */ + +#include +#include +#include +#include +#include +#include "one_level_lp1.h" + +#define verbose_sort 0 +#define verbose_one_level_lp 0 +#define verbose_dnulp2_a 0 + +void one_level_LP + ( int Strt1Pt, int End1Pt, int *PtIn, int LPdim, double **A, + int nVar, double *x, double **Binv, int *Bidx, IT_LP *ItLp ) +{ + int i,j,info,TstPt; + int *labels = (int*)calloc(nVar,sizeof(int)); + double *c = (double*)calloc(nVar+2,sizeof(double)); + + if(verbose_one_level_lp > 0) + { + printf("entered one_level_LP "); + printf("with Strt1Pt = %d and End1Pt = %d\n",Strt1Pt,End1Pt); + } + /* extend the cells by using 1-point test */ + TstPt = Strt1Pt; + for(i=0; i= TstPt) + { + PtIn[Bidx[i]] = 1; + labels[++j] = Bidx[i]; + } + if(++j > 0) + { + Sort(j,labels); + IT_Add1(ItLp,j,labels,LPdim,Bidx,x,Binv); + } + if(info >= 0) /* perform 1-point test for other points */ + { + for(TstPt=Strt1Pt+1; TstPt<=End1Pt; TstPt++) + { + if(!PtIn[TstPt]) + { + for(i=0; i 0) + { + printf("entered dnulp2_a with ma = %d and na = %d\n",ma,na); + } + + while(1) + { + ibrk = 0; /* step 1 : search outgoing constraint */ + for(i=0; i vmax) + { + bot = dtmp; + vmax = fabs(bot); + k = i; + } + } + if(vmax > eps) + if(bot >= 0.0) + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) break; /* found optimal solution, solve smaller LP */ + for(i=0; i= -eps) continue; + top = -a[i][nVar]; + for(j=0; j= sigj) continue; + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("dnulp2_a : LP unbounded\n\a"); + abort(); + } /* step 3: update x, Bidx, Binv */ + for(i=0; i -1) ++*info; + + if(*info == na) return; /* case of full rank */ + + k = 0; + while(k < na) + { + if(Bidx[k] > -1 || k == k1 ) + { + ++k; + continue; + } + for(i=0; i= -eps) continue; + + top = -a[i][nVar]; + for(j=0; j= sigj) continue; + sigj = top; + ell = i; + } + ibrk = 0; + if(ell < 0) + if(flag == 1) + { + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) return; /* leave with optimal solution */ + sigj = DBL_MAX; /* step 2 : search incoming constraint */ + ell = -1; + for(i=0; i= -eps) continue; + top = -a[i][nVar]; + for(j=0; j= sigj) continue; + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("dlp2_1pts : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + + for(i=0; i= TstPt && !PtIn[ell]) /* save Bidx, x, Binv */ + { + PtIn[ell] = 1; + IT_Add2(ItLp,ell,na,Bidx,x,Binv); + } + } +} + +void dlp1_1pts + ( int ma, int na, double **a, int nVar, double *c, int TstPt, + int *Bidx, double *x, double **Binv, int *PtIn, IT_LP *ItLp ) +{ + int ibrk,i,j,k,ell; + double eps=1.0e-6,vmax,top,bot,sigj,dtmp; + + while(1) + { + vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if (vmax < eps) return; /* leave with optimal solution */ + sigj = DBL_MAX; /* step 2 : search for incoming constraint */ + ell = -1; + for(i=0; i -eps) continue; + top = -a[i][nVar]; + for(j=0; j sigj) continue; + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("dlp1_1pts.cpp: LP unbounded\n\a"); + abort(); + } /* step 3: update x, Bidx, Binv */ + for(i=0; i= TstPt && !PtIn[ell]) /* save Bidx, x, Binv */ + { + PtIn[ell] = 1; + IT_Add2(ItLp,ell,na,Bidx,x,Binv); + } + } +} + +void Sort ( int n, int *a ) +{ + int j,itmp,i; + + if(verbose_sort>0) + { + printf("array (n=%d) before sort :",n); + for(i=0; i0 && itmp0) + { + printf("array after sort :"); + for(i=0; i= 0. + * + * ON ENTRY : + * ma #constraints involved in the LP problem; + * na dimension of the LP problem; + * a matrix with coefficients of the inequality constraints; + * nVar number of variables; + * c vector of dimension nVar+2, + * used to determine the outgoing constraint; + * TstPt index of a point ranging between Strt1Pt+1 and End1Pt + * of the routine one_level_LP from above; + * Bidx index vector of dimension nVar; + * x solution vector of dimension nVar; + * Binv basis inverse, matrix of dimension nVar; + * PtIn one row of a matrix with as many columns as the + * total number of points in the supports; + * ItLp index tree with data for LP problems. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated basis inverse; + * PtIn vector with one updated entry; + * ItLp updated index tree with data for LP problems. */ + +void dlp1_1pts + ( int ma, int na, double **a, int nVar, double *c, int TstPt, + int *Bidx, double *x, double **Binv, int *PtIn, IT_LP *ItLp ); +/* + * DESCRIPTION : + * Auxiliary routine called by one_level_LP, + * invoked after the first time, when dnulp2_a returns info < 0. + * + * ON ENTRY : + * ma #constraints involved in the LP problem; + * na dimension of the LP problem; + * a matrix with coefficients of the inequality constraints; + * nVar number of variables; + * c vector of dimension nVar+2, + * used to determine the outgoing constraint; + * TstPt index of a point ranging between Strt1Pt+1 and End1Pt + * of the routine one_level_LP from above; + * Bidx index vector of dimension nVar; + * x solution vector of dimension nVar; + * Binv basis inverse, matrix of dimension nVar; + * PtIn one row of a matrix with as many columns as the + * total number of points in the supports; + * ItLp index tree with data for LP problems. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated basis inverse; + * PtIn vector with one updated entry; + * ItLp updated index tree with data for LP problems. */ + +void Sort ( int n, int *a ); +/* + * DESCRIPTION : + * Sorts the first n numbers in the array a in ascending order. + * + * ON ENTRY : + * n dimension of the array a; + * a sequence of n integer numbers. + * + * ON RETURN : + * a sequence sorted in ascending order. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/one_level_lp.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/one_level_lp.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/one_level_lp.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/one_level_lp.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,439 +0,0 @@ -/* The file "one_level_lp.c" collects the definitions of the functions - * with prototypes in "one_level_lp.h". */ - -#include -#include -#include -#include -#include -#include "one_level_lp.h" - -#define verbose_sort 0 -#define verbose_one_level_lp 0 -#define verbose_dnulp2_a 0 - -void one_level_LP - ( int Strt1Pt, int End1Pt, int *PtIn, int LPdim, double **A, - int nVar, double *x, double **Binv, int *Bidx, IT_LP *ItLp ) -{ - int i,j,info,TstPt; - int *labels = (int*)calloc(nVar,sizeof(int)); - double *c = (double*)calloc(nVar+2,sizeof(double)); - - if(verbose_one_level_lp > 0) - { - printf("entered one_level_LP "); - printf("with Strt1Pt = %d and End1Pt = %d\n",Strt1Pt,End1Pt); - } - /* extend the cells by using 1-point test */ - TstPt = Strt1Pt; - for(i=0; i= TstPt) - { - PtIn[Bidx[i]] = 1; - labels[++j] = Bidx[i]; - } - if(++j > 0) - { - Sort(j,labels); - IT_Add1(ItLp,j,labels,LPdim,Bidx,x,Binv); - } - if(info >= 0) /* perform 1-point test for other points */ - { - for(TstPt=Strt1Pt+1; TstPt<=End1Pt; TstPt++) - { - if(!PtIn[TstPt]) - { - for(i=0; i 0) - { - printf("entered dnulp2_a with ma = %d and na = %d\n",ma,na); - } - - while(1) - { - ibrk = 0; /* step 1 : search outgoing constraint */ - for(i=0; i vmax) - { - bot = dtmp; - vmax = fabs(bot); - k = i; - } - } - if(vmax > eps) - if(bot >= 0.0) - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) break; /* found optimal solution, solve smaller LP */ - for(i=0; i= -eps) continue; - top = -a[i][nVar]; - for(j=0; j= sigj) continue; - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("dnulp2_a : LP unbounded\n\a"); - abort(); - } /* step 3: update x, Bidx, Binv */ - for(i=0; i -1) ++*info; - - if(*info == na) return; /* case of full rank */ - - k = 0; - while(k < na) - { - if(Bidx[k] > -1 || k == k1 ) - { - ++k; - continue; - } - for(i=0; i= -eps) continue; - - top = -a[i][nVar]; - for(j=0; j= sigj) continue; - sigj = top; - ell = i; - } - ibrk = 0; - if(ell < 0) - if(flag == 1) - { - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) return; /* leave with optimal solution */ - sigj = DBL_MAX; /* step 2 : search incoming constraint */ - ell = -1; - for(i=0; i= -eps) continue; - top = -a[i][nVar]; - for(j=0; j= sigj) continue; - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("dlp2_1pts : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - - for(i=0; i= TstPt && !PtIn[ell]) /* save Bidx, x, Binv */ - { - PtIn[ell] = 1; - IT_Add2(ItLp,ell,na,Bidx,x,Binv); - } - } -} - -void dlp1_1pts - ( int ma, int na, double **a, int nVar, double *c, int TstPt, - int *Bidx, double *x, double **Binv, int *PtIn, IT_LP *ItLp ) -{ - int ibrk,i,j,k,ell; - double eps=1.0e-6,vmax,top,bot,sigj,dtmp; - - while(1) - { - vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if (vmax < eps) return; /* leave with optimal solution */ - sigj = DBL_MAX; /* step 2 : search for incoming constraint */ - ell = -1; - for(i=0; i -eps) continue; - top = -a[i][nVar]; - for(j=0; j sigj) continue; - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("dlp1_1pts.cpp: LP unbounded\n\a"); - abort(); - } /* step 3: update x, Bidx, Binv */ - for(i=0; i= TstPt && !PtIn[ell]) /* save Bidx, x, Binv */ - { - PtIn[ell] = 1; - IT_Add2(ItLp,ell,na,Bidx,x,Binv); - } - } -} - -void Sort ( int n, int *a ) -{ - int j,itmp,i; - - if(verbose_sort>0) - { - printf("array (n=%d) before sort :",n); - for(i=0; i0 && itmp0) - { - printf("array after sort :"); - for(i=0; i= 0. - * - * ON ENTRY : - * ma #constraints involved in the LP problem; - * na dimension of the LP problem; - * a matrix with coefficients of the inequality constraints; - * nVar number of variables; - * c vector of dimension nVar+2, - * used to determine the outgoing constraint; - * TstPt index of a point ranging between Strt1Pt+1 and End1Pt - * of the routine one_level_LP from above; - * Bidx index vector of dimension nVar; - * x solution vector of dimension nVar; - * Binv basis inverse, matrix of dimension nVar; - * PtIn one row of a matrix with as many columns as the - * total number of points in the supports; - * ItLp index tree with data for LP problems. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated basis inverse; - * PtIn vector with one updated entry; - * ItLp updated index tree with data for LP problems. */ - -void dlp1_1pts - ( int ma, int na, double **a, int nVar, double *c, int TstPt, - int *Bidx, double *x, double **Binv, int *PtIn, IT_LP *ItLp ); -/* - * DESCRIPTION : - * Auxiliary routine called by one_level_LP, - * invoked after the first time, when dnulp2_a returns info < 0. - * - * ON ENTRY : - * ma #constraints involved in the LP problem; - * na dimension of the LP problem; - * a matrix with coefficients of the inequality constraints; - * nVar number of variables; - * c vector of dimension nVar+2, - * used to determine the outgoing constraint; - * TstPt index of a point ranging between Strt1Pt+1 and End1Pt - * of the routine one_level_LP from above; - * Bidx index vector of dimension nVar; - * x solution vector of dimension nVar; - * Binv basis inverse, matrix of dimension nVar; - * PtIn one row of a matrix with as many columns as the - * total number of points in the supports; - * ItLp index tree with data for LP problems. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated basis inverse; - * PtIn vector with one updated entry; - * ItLp updated index tree with data for LP problems. */ - -void Sort ( int n, int *a ); -/* - * DESCRIPTION : - * Sorts the first n numbers in the array a in ascending order. - * - * ON ENTRY : - * n dimension of the array a; - * a sequence of n integer numbers. - * - * ON RETURN : - * a sequence sorted in ascending order. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/prepare_for_mv1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/prepare_for_mv1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/prepare_for_mv1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/prepare_for_mv1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,671 @@ +/* The file "prepare_for_mv1.c" contains the definitions of the prototypes + * in the file "prepare_for_mv1.h". */ + +#include +#include +#include +#include +#include +#include +#include "prepare_for_mv1.h" + +#define verbose_prepare 0 + /* 0 : no output; 1 : one line messages; 2 : extra data */ + +void write_coordinates ( int n, int p[n] ) +/* + * DESCRIPTION : + * Writes the coordinates of the point to screen. + * Auxilary routine only useful in verbose mode. */ +{ + int i; + + for(i=0; i0) + { + printf("entering Pre4MV with nVar = %d and nSpt = %d\n",nVar,nSpt); + printf("indices to supports : "); + for(i=0; i<=nVar; i++) printf(" %d", SptIdx[i]); printf("\n"); + if(verbose_prepare>1) write_supports(nVar,nSpt,Spt,SptIdx); + } + + SortSpt(nVar,nSpt,Spt,SptIdx); + + for(i=0; i 0) + { + printf("leaving Pre4MV with nS = %d\n",*nS); + printf("Type of mixture : "); + for(i=0; i<*nS; i++) printf(" %d",SptType[i]); printf("\n"); + printf("indices to supports : "); + for(i=0; i<=*nS; i++) printf(" %d", VtxIdx[i]); printf("\n"); + write_supports(nVar,*nS,Vtx,VtxIdx); + printf("The old indices : "); + for(i=0; i Spt[idx][k]) + { + idx = j; + break; /* LexiGt = 1; */ + } + } + } + } + if(idx>i) + { + for(j=0; j dtmp) + { + dtmp = fabs(A[k][i]); + itmp = i; + } + if(itmp >= 0) /* nonzero row */ + { /* To change aa(k,*) into e_itmp */ + for(i=0; i -eps) return; /* found the optimal solution */ + } /* k-th column will get into the basis -- to form sb */ + for(i=0; i eps && (xb[i]/sb[i]) < sigb) + { + sigb = (xb[i]/sb[i]); + ell = i; + } + } /* ell-th row gets out of the basis and k-th row gets into the basis. + to find the new B^{-1} */ + sum = 0.0e0; + for(i=0; i tol) return; /* epsilon is already positive */ + } + } +} + +void ReArrangeSpt + ( int nVar, int **Spt, int *SptIdx, int **Vtx, int *VtxIdx, + int *SptType, int *OldIdx ) +{ + int i,i1,icnt,iSpt,ith,j; + int *iTmp,**SptCopy,*SptIdxCopy,*Nu2OldCopy; + + iTmp = (int*)calloc(nVar,sizeof(int)); + + i = 0; + iSpt = -1; + while(i= 0) + { + /* The j-th row will get into the basis. */ + /* To decide which column will get out of the basis */ + for(k=0; k tmp && ib[k] == -1) + { + tmp = fabs(xb[k]); + itmp = k; + } + if(itmp == -1) + { + info = -1; + abort(); /* It is impossible in our problem */ + } + + /* itmp-th row will get out of the basis */ + /* To find the new B^{-1} after itmp out and j in */ + + for(k=0; k -1) + { + if(fabs(xb[info]) > 1.0e-10) + { + /* It is a non-vertex */ + ynVtx[j-1] = 0; /* -1: since the added 1st column */ + } + } + for(i1=0; i1=0. */ + +void ReArrangeSpt + ( int nVar, int **Spt, int *SptIdx, int **Vtx, int *VtxIdx, + int *SptType, int *OldIdx ); +/* + * DESCRIPTION : + * Rearranges the supports according to their type. + * For example: if A1, A2, A3 are the same and A4, A5 are the same, + * then the supports are rearranged into A1, A4, A1, A1, A4. + * This routine is called in Pre4MV, after the vertex sets are computed. + * + * ON ENTRY : + * nVar the number of variables, embient dimension; + * Spt array of points, of range 0..nSpt-1, + * with each point having nVar integer coordinates; + * SptIdx array of range 0..nSpt, SptIdx[i] indicates the start + * of the i-th support, SptIdx[nVar] contains the total #points; + * Vtx vertex points of the supports; + * VtxIdx indicates the start of the i-th vertex set in Vtx; + * SptType SptType[i] == -1 means the i-th Spt is the base support, + * SptType[i] == j means the i-th Spt is the j-th Spt; + * OldIdx the position of each point in Vtx + * with respect to the original supports in Spt. + * + * ON RETURN : + * Spt support sets, rearranged along their type; + * SptIdx rearranged index vector to the support sets; + * Vtx rearranged vertex points for each support; + * VtxIdx rearranged index vector the vertex sets; + * SptType type of each support; + * OldIdx rearranged position index vector of Vtx w.r.t. Spt. */ + +void NonVertex + ( int nVar, int nSpt, int *SptIdx, int **Spt, int *ynVtx ); +/* + * DESCRIPTION : + * Applies the revised simplex method to decide which points in the + * supports are vertices. + * + * ON ENTRY : + * nVar the number of variables; + * nSpt the number of supports; + * SptIdx array of range 0..nSpt, SptIdx[i] indicates the start + * of the i-th support, SptIdx[nVar] contains the total #points; + * Spt array of points, of range 0..nSpt-1, + * with each point having nVar integer coordinates; + * ynVtx array of dimension equal to the total number of points. + * + * ON RETURN : + * ynVtx ynVtx[i] == 1 if the i-th point is a vertex, + * otherwise the i-th value in the array is zero. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/prepare_for_mv.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/prepare_for_mv.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/prepare_for_mv.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/prepare_for_mv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,671 +0,0 @@ -/* The file "prepare_for_mv.c" contains the definitions of the prototypes - * in the file "prepare_for_mv.h". */ - -#include -#include -#include -#include -#include -#include -#include "prepare_for_mv.h" - -#define verbose_prepare 0 - /* 0 : no output; 1 : one line messages; 2 : extra data */ - -void write_coordinates ( int n, int p[n] ) -/* - * DESCRIPTION : - * Writes the coordinates of the point to screen. - * Auxilary routine only useful in verbose mode. */ -{ - int i; - - for(i=0; i0) - { - printf("entering Pre4MV with nVar = %d and nSpt = %d\n",nVar,nSpt); - printf("indices to supports : "); - for(i=0; i<=nVar; i++) printf(" %d", SptIdx[i]); printf("\n"); - if(verbose_prepare>1) write_supports(nVar,nSpt,Spt,SptIdx); - } - - SortSpt(nVar,nSpt,Spt,SptIdx); - - for(i=0; i 0) - { - printf("leaving Pre4MV with nS = %d\n",*nS); - printf("Type of mixture : "); - for(i=0; i<*nS; i++) printf(" %d",SptType[i]); printf("\n"); - printf("indices to supports : "); - for(i=0; i<=*nS; i++) printf(" %d", VtxIdx[i]); printf("\n"); - write_supports(nVar,*nS,Vtx,VtxIdx); - printf("The old indices : "); - for(i=0; i Spt[idx][k]) - { - idx = j; - break; /* LexiGt = 1; */ - } - } - } - } - if(idx>i) - { - for(j=0; j dtmp) - { - dtmp = fabs(A[k][i]); - itmp = i; - } - if(itmp >= 0) /* nonzero row */ - { /* To change aa(k,*) into e_itmp */ - for(i=0; i -eps) return; /* found the optimal solution */ - } /* k-th column will get into the basis -- to form sb */ - for(i=0; i eps && (xb[i]/sb[i]) < sigb) - { - sigb = (xb[i]/sb[i]); - ell = i; - } - } /* ell-th row gets out of the basis and k-th row gets into the basis. - to find the new B^{-1} */ - sum = 0.0e0; - for(i=0; i tol) return; /* epsilon is already positive */ - } - } -} - -void ReArrangeSpt - ( int nVar, int **Spt, int *SptIdx, int **Vtx, int *VtxIdx, - int *SptType, int *OldIdx ) -{ - int i,i1,icnt,iSpt,ith,j; - int *iTmp,**SptCopy,*SptIdxCopy,*Nu2OldCopy; - - iTmp = (int*)calloc(nVar,sizeof(int)); - - i = 0; - iSpt = -1; - while(i= 0) - { - /* The j-th row will get into the basis. */ - /* To decide which column will get out of the basis */ - for(k=0; k tmp && ib[k] == -1) - { - tmp = fabs(xb[k]); - itmp = k; - } - if(itmp == -1) - { - info = -1; - abort(); /* It is impossible in our problem */ - } - - /* itmp-th row will get out of the basis */ - /* To find the new B^{-1} after itmp out and j in */ - - for(k=0; k -1) - { - if(fabs(xb[info]) > 1.0e-10) - { - /* It is a non-vertex */ - ynVtx[j-1] = 0; /* -1: since the added 1st column */ - } - } - for(i1=0; i1=0. */ - -void ReArrangeSpt - ( int nVar, int **Spt, int *SptIdx, int **Vtx, int *VtxIdx, - int *SptType, int *OldIdx ); -/* - * DESCRIPTION : - * Rearranges the supports according to their type. - * For example: if A1, A2, A3 are the same and A4, A5 are the same, - * then the supports are rearranged into A1, A4, A1, A1, A4. - * This routine is called in Pre4MV, after the vertex sets are computed. - * - * ON ENTRY : - * nVar the number of variables, embient dimension; - * Spt array of points, of range 0..nSpt-1, - * with each point having nVar integer coordinates; - * SptIdx array of range 0..nSpt, SptIdx[i] indicates the start - * of the i-th support, SptIdx[nVar] contains the total #points; - * Vtx vertex points of the supports; - * VtxIdx indicates the start of the i-th vertex set in Vtx; - * SptType SptType[i] == -1 means the i-th Spt is the base support, - * SptType[i] == j means the i-th Spt is the j-th Spt; - * OldIdx the position of each point in Vtx - * with respect to the original supports in Spt. - * - * ON RETURN : - * Spt support sets, rearranged along their type; - * SptIdx rearranged index vector to the support sets; - * Vtx rearranged vertex points for each support; - * VtxIdx rearranged index vector the vertex sets; - * SptType type of each support; - * OldIdx rearranged position index vector of Vtx w.r.t. Spt. */ - -void NonVertex - ( int nVar, int nSpt, int *SptIdx, int **Spt, int *ynVtx ); -/* - * DESCRIPTION : - * Applies the revised simplex method to decide which points in the - * supports are vertices. - * - * ON ENTRY : - * nVar the number of variables; - * nSpt the number of supports; - * SptIdx array of range 0..nSpt, SptIdx[i] indicates the start - * of the i-th support, SptIdx[nVar] contains the total #points; - * Spt array of points, of range 0..nSpt-1, - * with each point having nVar integer coordinates; - * ynVtx array of dimension equal to the total number of points. - * - * ON RETURN : - * ynVtx ynVtx[i] == 1 if the i-th point is a vertex, - * otherwise the i-th value in the array is zero. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -The MixedVol Algorithm for fast mixed volume computation in PHCv2.4.06 +The MixedVol Algorithm for fast mixed volume computation in PHCv2.4.85 This directory is the main feature in release v2.3.13 of PHCpack. Since v2.3.31, support for stable mixed volumes was added. @@ -24,23 +24,36 @@ The program "ts_mv2c.adb" calls the C software "MixedVol" via the intermediate interface program mv.c. +Run "gprbuild mixedvol.gpr" to make test procedures. +On windows, type "gprbuild mixedvol.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean mixedvol.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ -convsub.adb : converting output into phc format +ts_convsub.adb : converting output into phc format ------------------------------------------------------------------------------ simplex_pivoting : pivoting operations in simplex algorithm +prepare_for_mv1 : C definition of the preprocessing code prepare_for_mv : preprocessing for mixed-volume computation +cell_stack1 : C definition of the cell stack cell_stack : stack of mixed cells +mixed_volume1 : C main function mixed_volume : main routine to compute the mixed volume +relation_table1 : C definition of the relation table relation_table : edges on lower hull of Minkowski sums +one_level_lp1 : C definition of one level LP tests one_level_lp : performs LP tests at one level +form_lp1 : C definition of LP problems form_lp : defines the LP problems at all levels +index_tree_lp1 : C definition of trees of LP problems index_tree_lp : data + operations on trees of LP problems +zero_index_tree1 : C definition of the zero index tree zero_index_tree : case of level 0 at tree of LP problems ------------------------------------------------------------------------------ -mv.h and mv.c : C program to compute mixed volume -mv.ads and mv.adb : Ada tranlation of the program mv +mv1 : C program to compute the mixed volume +mv : Ada tranlation of the program mv ts_mv2c.adb : calls the C program mv ts_mv.adb : calls the Ada translation of mv ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,1112 @@ +#include +#include +#include +#include +#include +#include "relation_table1.h" + +#define verbose_reltab 0 + +void RelTable ( int nVar, int nSpt, int **Spt, int *SptIdx, + double *lft, int **RelTab, L0_IML *L0 ) +{ + const int nv1 = nVar+1; + int i,j,j1,info,ell,ynNuPt; + int CurSpt,NxSpt,FixPt,TstPt,Strt1PtTst,nPtIn; + int *Bidx_s,*LPidx,*Bidx; + double dtmp; + double *x_s,**a,*x,**Binv; + + double Binv_s[nVar][nVar]; + double *c = (double*)calloc(nVar+2,sizeof(double)); + int *J = (int*)calloc(2,sizeof(int)); + + if(verbose_reltab > 0) printf("entering RelTable...\n"); + + x_s = (double*)calloc(nVar,sizeof(double)); + Bidx_s = (int*)calloc(nVar,sizeof(int)); + + a = (double**)calloc(SptIdx[nSpt]+1,sizeof(double*)); + for(i=0; i<=SptIdx[nSpt]; i++) + a[i] = (double*)calloc(nVar+2,sizeof(double)); + + LPidx = (int*)calloc(SptIdx[nSpt]+1,sizeof(int)); + + x = (double*)calloc(nVar+2,sizeof(double)); + Bidx = (int*)calloc(nVar+2,sizeof(int)); + Binv = (double**)calloc(nVar+2,sizeof(double*)); + for(i=0; i FixPt && !RelTab[FixPt][Bidx[i]]) + { + ynNuPt = 1; + RelTab[FixPt][Bidx[i]] = RelTab[Bidx[i]][FixPt] = 1; + } + if(ynNuPt) + { + J[0] = FixPt; + for(i=0; i FixPt) + { + J[1] = Bidx[i]; + L0_Add2(L0,J,nVar,Bidx,x,Binv); /* add 2 points */ + } + } + } + else + for(i=0; i FixPt) + { + RelTab[Bidx[i]][FixPt] = RelTab[FixPt][Bidx[i]] = 1; + for(j=i+1; j FixPt) + RelTab[Bidx[i]][Bidx[j]] = + RelTab[Bidx[j]][Bidx[i]] = 1; + } + /* x, Bidx, Binv are available for 1-point test on other points */ + + if(info >= 0) + for(j=Strt1PtTst; j<=nPtIn; j++) + { + TstPt = LPidx[j]; + if(!RelTab[FixPt][TstPt]) + { + for(i=0; iCurSpt)*/ + + nPtIn = -1; /* To get all constraints of pts related to FixPt */ + for(i=SptIdx[CurSpt]; i= SptIdx[NxSpt]) + { + if(Bidx[i] >= TstPt) + RelTab[Bidx[i]][FixPt] = RelTab[FixPt][Bidx[i]] = 1; + for(j=i+1; j<=nVar; j++) + if(Bidx[j] >= SptIdx[NxSpt]) + RelTab[Bidx[i]][Bidx[j]] = RelTab[Bidx[j]][Bidx[i]] = 1; + } + } + /* do the 1-point test for other points */ + + if(info >= 0) + for(j=Strt1PtTst+1; j<=nPtIn; j++) + { + TstPt = LPidx[j]; + if(!RelTab[FixPt][TstPt]) + { + for(i=0; i<=nVar; i++) c[i] = -a[TstPt][i]; + dlp1_1pt_i(nPtIn+1,nVar+1,a,nv1,c,LPidx,FixPt,TstPt, + Bidx,x,Binv,RelTab); + } + } + else + for(j=Strt1PtTst+1; j<=nPtIn; j++) + { + TstPt = LPidx[j]; + if(!RelTab[FixPt][TstPt]) + { + for(i=0; i<=nVar; i++) c[i] = -a[TstPt][i]; + dlp2_1pt_i(nPtIn+1,nVar+1,a,nv1,c,LPidx,FixPt,TstPt, + Bidx,x,Binv,RelTab); + } + } + } + } + } + for(i=0; i<=SptIdx[nSpt]; i++) free(a[i]); + free(a); + free(J); free(x); free(Bidx); free(x_s); free(Bidx_s); + for(i=0; i 0) + { + printf("leaving RelTable, the relation table :\n"); + for(i=0; i 0) + printf("entered RlTbLP2_a with ma = %d and na = %d\n",ma,na); + + while(1) + { + ibrk = 0; /* step 1 : search for outgoing constraint */ + for(i=0; i vmax) + { + bot = dtmp; + vmax = fabs(bot); + k = i; + } + } + if(vmax > eps) + if(bot >= 0.0) + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) break; /* found optimal solution, solve smaller LP */ + + for(i=0; i= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("RlTbLP2_a : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + for(i=0; i -1) ++(*info); + + if(*info == na) return; /* case of full rank */ + + k = 0; + while(k < na) + { + if(Bidx[k] > -1 || k == k1 ) + { + ++k; + continue; + } + + for(i=0; i= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + + ibrk = 0; + if(ell < 0) + if(flag == 1) + { + for(i=0; i 0) + printf("entered RlTbLP2_e with ma = %d and na = %d\n",ma,na); + +/* Expand the system (add variable epsilon) + Assumed a, b, Binv, x have extra 1 dimension to hold epsilon */ + + for(i=0; i dtmp) + { + dtmp = -a[j][nv1]; + ell = j; + } + } + else + a[j][nap1-1] = 0.0; + } + for(i=0; i vmax) + { + bot = dtmp; + vmax = fabs(bot); + k = i; + } + } + if(vmax > eps) + if(bot >= 0.0) + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) break; /* found optimal solution, solve smaller LP */ + + for(i=0; i= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("RlTbLP2_e : LP unbounded??\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + for(i=0; i -1) ++(*info); + + if(*info == na) return; /* case of full rank */ + + k1 = -1; + k = 0; + while(k < na) + { + if(Bidx[k] > -1 || k == k1) + { + ++k; + continue; + } + + for(i=0; i= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + ibrk = 0; + if(ell < 0) + if(flag == 1) + { + for(i=0; i 0) + printf("entered dlp2_1pt_i with ma = %d and na = %d\n",ma,na); + + while(1) + { + vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) return; /* leave with optimal solution */ + + sigj = DBL_MAX; /* step 2 : search for incoming constraint */ + ell = -1; + for(i1=0; i1= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + + if(ell < 0) + { + printf("dlp2_1pt_i : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + + for(i=0; i= TstPt) + { + for(i=0; i< na; i++) + if(i != k && Bidx[i] > -1 && !RelTab[ell][Bidx[i]]) + RelTab[ell][Bidx[i]] = RelTab[Bidx[i]][ell] = 1; + + if(!RelTab[ell][FixPt]) + RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; + } + } +} + +void dlp2_1pt_s + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ) +{ + int ibrk; + int i,i1,j,k,ell; + double eps=1.0e-6,vmax,top,bot,sigj,dtmp; + int *J = (int*) calloc(2,sizeof(int)); + + if(verbose_reltab > 0) + printf("entered dlp2_1pt_s with ma = %d and na = %d\n",ma,na); + + while(1) + { + vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + + if(vmax < eps) return; /* leave with optimal solution */ + + sigj = DBL_MAX; /* step 2 : search for incoming constraint */ + ell = -1; + for(i1=0; i1= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + + if(ell < 0) + { + printf("dlp2_1pt_s : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + + for(i=0; i= TstPt && !RelTab[ell][FixPt]) /* save Bidx, x, Binv */ + { + RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; + J[0] = FixPt; + J[1] = ell; /* J[0] < J[1] is assumed. */ + L0_Add2(L0,J,na,Bidx,x,Binv); /* add 2 points */ + } + } + free(J); +} + +void dlp1_1pt_i + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ) +{ + int ibrk,i,i1,j,k,ell; + double eps=1.0e-6,vmax,top,bot,sigj,dtmp; + + if(verbose_reltab > 0) + printf("entered dlp1_1pt_i with ma = %d and na = %d\n",ma,na); + + while(1) + { + vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + if(vmax < eps) return; /* out with optimal solution */ + + sigj = DBL_MAX; /* step 2 : find incoming constraint */ + ell = -1; + for(i1=0; i1= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + if(ell < 0) + { + printf("dlp1_1pt_i : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + + for(i=0; i= TstPt) + { + for(i=0; i 0) + printf("entered dlp1_1pt_s with ma = %d and na = %d\n",ma,na); + + while(1) + { + vmax = -DBL_MAX; /* step 1 : search outgoing constraint */ + for(i=0; i vmax) + { + vmax = dtmp; + k = i; + } + } + + if(vmax < eps) return; /* out with optimal solution */ + + sigj = DBL_MAX; /* step 2 : search incoming constraint */ + ell = -1; + for(i1=0; i1= -eps) continue; + + top = -a[i][nv1]; + for(j=0; j= sigj) continue; + + sigj = top; + ell = i; + } + + if(ell < 0) + { + printf("dlp1_1pt_s : LP unbounded\n\a"); + abort(); + } /* step 3 : update x, Bidx, Binv */ + + for(i=0; i= TstPt && !RelTab[ell][FixPt]) /* save Bidx, x, Binv */ + { + RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; + J[0] = FixPt; + J[1] = ell; /* J[0] < J[1] is assumed .*/ + L0_Add2(L0,J,na,Bidx,x,Binv); /* add 2 points */ + } + } + free(J); +} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table1.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table1.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table1.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table1.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,227 @@ +/* The file "relation_tabl1e.h" collects the prototypes of routines to + * create a so-called "relation table" which records all edges on the + * lower hulls of all pairwise Minkowski sums. */ + +#ifndef _RelationTable1_ +#define _RelationTable1_ + +#include "zero_index_tree1.h" +#include "index_tree_lp1.h" + +void RelTable ( int nVar, int nSpt, int **Spt, int *SptIdx, + double *lft, int **RelTab, L0_IML *L0 ); +/* + * DESCRIPTION : + * Sets up the relation table for the given lifted supports. + * This is the main routine which calls the other functions + * with prototypes listed below. + * + * ON ENTRY : + * nVar ambient dimension; + * nSpt number of different supports; + * Spt supports, in array of range 0..nSpt-1; + * SptIdx the i-th supports starts at SptIdx[i] in Spt, + * SptIdx[nSpt] equals the total #points in Spt; + * lft lifting for each point in Spt; + * RelTab matrix of dimension equal to the total #points; + * L0 initialized level zero tree. + * + * ON RETURN : + * RelTab RelTab[i][j] == 1 if points i and j span an edge + * on the lower hull of the polytope (if i and j are + * from the same support set) or on the lower hull + * of the Minkowski sum of the polytopes spanned by + * the support set which contains point i and the + * other support set which contains point j, + * RelTab[i][j] == 0 otherwise, + * note that this matrix is symmetric; + * L0 updated tree with stored LP information. */ + +void RlTbLP2_a + ( int ma, int na, double **a, int nv1, double *c, + int *LPidx, int *Bidx, double *x, double **Binv, int *info ); +/* + * DESCRIPTION : + * Applies LP to find a nondegenerate solutions to perform a 1-point test. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables (= nVar) plus one; + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * c vector of range 0..nVar+1, + * used to determine outgoing constraint; + * LPidx vector of dimension total #points plus one, + * index to the involved constaints; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated matrix; + * info information about the rank. */ + +void RlTbLP2_e + ( int ma, int na, int NumCol, double **a, int nv1, int *LPidx, + int *Bidx, double *x, double **Binv, int *info ); +/* + * DESCRIPTION : + * Applies LP to extend the point using a 1-point test, + * returns a nondegenerate solution for 1-point tests. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables (= nVar), original dimension; + * NumCol total number of points in the support; + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * LPidx vector of dimension total #points plus one, + * index to the involved constraints; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2. + * + * ON RETURN : + * a extended matrix with the "epsilon variable"; + * Bidx updated index vector; + * x updated solution vector; + * Binv updated matrix; + * info information about the rank. */ + +void dlp2_1pt_i + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ); +/* + * DESCRIPTION : + * Applies LP to perform a 1-point test in case the current support + * is not the first one, for the variable info < 0. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables (= nVar); + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * c vector of range 0..nVar+1, + * used to determine outgoing constraint; + * LPidx vector of dimension total #points plus one; + * FixPt index to a point in the supports; + * TstPt index to an involved constraint; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2; + * RelTab matrix of dimension equal to the total #points. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated matrix; + * RelTab updated relation table. */ + +void dlp2_1pt_s + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ); +/* + * DESCRIPTION : + * Applies LP to perform a 1-point test for the first support, + * in case the variable info < 0. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables (= nVar); + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * c vector of range 0..nVar+1, + * used to determine outgoing constraint; + * LPidx vector of dimension total #points plus one, + * index to the involved constraints; + * FixPt index to a point in the supports; + * TstPt index to an involved constraint; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2; + * RelTab matrix of dimension equal to the total #points; + * L0 current level zero tree. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated matrix; + * RelTab updated relation table; + * L0 LP data with Bidx, x, and Binv. */ + +void dlp1_1pt_i + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ); +/* + * DESCRIPTION : + * Applies LP to perform a 1-point test when the current support + * is not the first one, and for variable info >= 0. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables; + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * c vector of range 0..nVar+1, + * used to determine outgoing constraint; + * LPidx vector of dimension total #points plus one, + * index to the involved constraints; + * FixPt index to a point in the supports; + * TstPt index to an involved constraint; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2; + * RelTab matrix of dimension equal to the total #points. + * + * ON RETURN : + * Bidx updated index vector; + * x updated solution vector; + * Binv updated matrix; + * RelTab updated relation table. */ + +void dlp1_1pt_s + ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, + int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ); +/* + * DESCRIPTION : + * Applies LP to perform a 1-point test for the first support + * and for variable info >= 0. + * + * ON ENTRY : + * ma number of involved constraints; + * na number of variables; + * a matrix of inequality constraints, + * as many rows as total #points plus one, + * as many columns as nVar + 2; + * nv1 #variables plus one; + * c vector of range 0..nVar+1, + * used to determine outgoing constraint; + * LPidx vector of dimension total #points plus one, + * index to the involved constraints; + * FixPt index to a point in the supports; + * TstPt index to an involved constraint; + * Bidx index vector of range 0..nVar+1; + * x solution vector of range 0..nVar+1; + * Binv square matrix of dimension nVar+2; + * RelTab matrix of dimension equal to the total #points; + * L0 current level zero tree. + * + * ON RETURN : + * x updated vector; + * Binv updated matrix; + * RelTab updated relation table; + * L0 saved LP data Bidx, x, and Binv. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1112 +0,0 @@ -#include -#include -#include -#include -#include -#include "relation_table.h" - -#define verbose_reltab 0 - -void RelTable ( int nVar, int nSpt, int **Spt, int *SptIdx, - double *lft, int **RelTab, L0_IML *L0 ) -{ - const int nv1 = nVar+1; - int i,j,j1,info,ell,ynNuPt; - int CurSpt,NxSpt,FixPt,TstPt,Strt1PtTst,nPtIn; - int *Bidx_s,*LPidx,*Bidx; - double dtmp; - double *x_s,**a,*x,**Binv; - - double Binv_s[nVar][nVar]; - double *c = (double*)calloc(nVar+2,sizeof(double)); - int *J = (int*)calloc(2,sizeof(int)); - - if(verbose_reltab > 0) printf("entering RelTable...\n"); - - x_s = (double*)calloc(nVar,sizeof(double)); - Bidx_s = (int*)calloc(nVar,sizeof(int)); - - a = (double**)calloc(SptIdx[nSpt]+1,sizeof(double*)); - for(i=0; i<=SptIdx[nSpt]; i++) - a[i] = (double*)calloc(nVar+2,sizeof(double)); - - LPidx = (int*)calloc(SptIdx[nSpt]+1,sizeof(int)); - - x = (double*)calloc(nVar+2,sizeof(double)); - Bidx = (int*)calloc(nVar+2,sizeof(int)); - Binv = (double**)calloc(nVar+2,sizeof(double*)); - for(i=0; i FixPt && !RelTab[FixPt][Bidx[i]]) - { - ynNuPt = 1; - RelTab[FixPt][Bidx[i]] = RelTab[Bidx[i]][FixPt] = 1; - } - if(ynNuPt) - { - J[0] = FixPt; - for(i=0; i FixPt) - { - J[1] = Bidx[i]; - L0_Add2(L0,J,nVar,Bidx,x,Binv); /* add 2 points */ - } - } - } - else - for(i=0; i FixPt) - { - RelTab[Bidx[i]][FixPt] = RelTab[FixPt][Bidx[i]] = 1; - for(j=i+1; j FixPt) - RelTab[Bidx[i]][Bidx[j]] = - RelTab[Bidx[j]][Bidx[i]] = 1; - } - /* x, Bidx, Binv are available for 1-point test on other points */ - - if(info >= 0) - for(j=Strt1PtTst; j<=nPtIn; j++) - { - TstPt = LPidx[j]; - if(!RelTab[FixPt][TstPt]) - { - for(i=0; iCurSpt)*/ - - nPtIn = -1; /* To get all constraints of pts related to FixPt */ - for(i=SptIdx[CurSpt]; i= SptIdx[NxSpt]) - { - if(Bidx[i] >= TstPt) - RelTab[Bidx[i]][FixPt] = RelTab[FixPt][Bidx[i]] = 1; - for(j=i+1; j<=nVar; j++) - if(Bidx[j] >= SptIdx[NxSpt]) - RelTab[Bidx[i]][Bidx[j]] = RelTab[Bidx[j]][Bidx[i]] = 1; - } - } - /* do the 1-point test for other points */ - - if(info >= 0) - for(j=Strt1PtTst+1; j<=nPtIn; j++) - { - TstPt = LPidx[j]; - if(!RelTab[FixPt][TstPt]) - { - for(i=0; i<=nVar; i++) c[i] = -a[TstPt][i]; - dlp1_1pt_i(nPtIn+1,nVar+1,a,nv1,c,LPidx,FixPt,TstPt, - Bidx,x,Binv,RelTab); - } - } - else - for(j=Strt1PtTst+1; j<=nPtIn; j++) - { - TstPt = LPidx[j]; - if(!RelTab[FixPt][TstPt]) - { - for(i=0; i<=nVar; i++) c[i] = -a[TstPt][i]; - dlp2_1pt_i(nPtIn+1,nVar+1,a,nv1,c,LPidx,FixPt,TstPt, - Bidx,x,Binv,RelTab); - } - } - } - } - } - for(i=0; i<=SptIdx[nSpt]; i++) free(a[i]); - free(a); - free(J); free(x); free(Bidx); free(x_s); free(Bidx_s); - for(i=0; i 0) - { - printf("leaving RelTable, the relation table :\n"); - for(i=0; i 0) - printf("entered RlTbLP2_a with ma = %d and na = %d\n",ma,na); - - while(1) - { - ibrk = 0; /* step 1 : search for outgoing constraint */ - for(i=0; i vmax) - { - bot = dtmp; - vmax = fabs(bot); - k = i; - } - } - if(vmax > eps) - if(bot >= 0.0) - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) break; /* found optimal solution, solve smaller LP */ - - for(i=0; i= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("RlTbLP2_a : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - for(i=0; i -1) ++(*info); - - if(*info == na) return; /* case of full rank */ - - k = 0; - while(k < na) - { - if(Bidx[k] > -1 || k == k1 ) - { - ++k; - continue; - } - - for(i=0; i= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - - ibrk = 0; - if(ell < 0) - if(flag == 1) - { - for(i=0; i 0) - printf("entered RlTbLP2_e with ma = %d and na = %d\n",ma,na); - -/* Expand the system (add variable epsilon) - Assumed a, b, Binv, x have extra 1 dimension to hold epsilon */ - - for(i=0; i dtmp) - { - dtmp = -a[j][nv1]; - ell = j; - } - } - else - a[j][nap1-1] = 0.0; - } - for(i=0; i vmax) - { - bot = dtmp; - vmax = fabs(bot); - k = i; - } - } - if(vmax > eps) - if(bot >= 0.0) - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) break; /* found optimal solution, solve smaller LP */ - - for(i=0; i= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("RlTbLP2_e : LP unbounded??\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - for(i=0; i -1) ++(*info); - - if(*info == na) return; /* case of full rank */ - - k1 = -1; - k = 0; - while(k < na) - { - if(Bidx[k] > -1 || k == k1) - { - ++k; - continue; - } - - for(i=0; i= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - ibrk = 0; - if(ell < 0) - if(flag == 1) - { - for(i=0; i 0) - printf("entered dlp2_1pt_i with ma = %d and na = %d\n",ma,na); - - while(1) - { - vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) return; /* leave with optimal solution */ - - sigj = DBL_MAX; /* step 2 : search for incoming constraint */ - ell = -1; - for(i1=0; i1= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - - if(ell < 0) - { - printf("dlp2_1pt_i : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - - for(i=0; i= TstPt) - { - for(i=0; i< na; i++) - if(i != k && Bidx[i] > -1 && !RelTab[ell][Bidx[i]]) - RelTab[ell][Bidx[i]] = RelTab[Bidx[i]][ell] = 1; - - if(!RelTab[ell][FixPt]) - RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; - } - } -} - -void dlp2_1pt_s - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ) -{ - int ibrk; - int i,i1,j,k,ell; - double eps=1.0e-6,vmax,top,bot,sigj,dtmp; - int *J = (int*) calloc(2,sizeof(int)); - - if(verbose_reltab > 0) - printf("entered dlp2_1pt_s with ma = %d and na = %d\n",ma,na); - - while(1) - { - vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - - if(vmax < eps) return; /* leave with optimal solution */ - - sigj = DBL_MAX; /* step 2 : search for incoming constraint */ - ell = -1; - for(i1=0; i1= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - - if(ell < 0) - { - printf("dlp2_1pt_s : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - - for(i=0; i= TstPt && !RelTab[ell][FixPt]) /* save Bidx, x, Binv */ - { - RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; - J[0] = FixPt; - J[1] = ell; /* J[0] < J[1] is assumed. */ - L0_Add2(L0,J,na,Bidx,x,Binv); /* add 2 points */ - } - } - free(J); -} - -void dlp1_1pt_i - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ) -{ - int ibrk,i,i1,j,k,ell; - double eps=1.0e-6,vmax,top,bot,sigj,dtmp; - - if(verbose_reltab > 0) - printf("entered dlp1_1pt_i with ma = %d and na = %d\n",ma,na); - - while(1) - { - vmax = -DBL_MAX; /* step 1 : search for outgoing constraint */ - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - if(vmax < eps) return; /* out with optimal solution */ - - sigj = DBL_MAX; /* step 2 : find incoming constraint */ - ell = -1; - for(i1=0; i1= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - if(ell < 0) - { - printf("dlp1_1pt_i : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - - for(i=0; i= TstPt) - { - for(i=0; i 0) - printf("entered dlp1_1pt_s with ma = %d and na = %d\n",ma,na); - - while(1) - { - vmax = -DBL_MAX; /* step 1 : search outgoing constraint */ - for(i=0; i vmax) - { - vmax = dtmp; - k = i; - } - } - - if(vmax < eps) return; /* out with optimal solution */ - - sigj = DBL_MAX; /* step 2 : search incoming constraint */ - ell = -1; - for(i1=0; i1= -eps) continue; - - top = -a[i][nv1]; - for(j=0; j= sigj) continue; - - sigj = top; - ell = i; - } - - if(ell < 0) - { - printf("dlp1_1pt_s : LP unbounded\n\a"); - abort(); - } /* step 3 : update x, Bidx, Binv */ - - for(i=0; i= TstPt && !RelTab[ell][FixPt]) /* save Bidx, x, Binv */ - { - RelTab[ell][FixPt] = RelTab[FixPt][ell] = 1; - J[0] = FixPt; - J[1] = ell; /* J[0] < J[1] is assumed .*/ - L0_Add2(L0,J,na,Bidx,x,Binv); /* add 2 points */ - } - } - free(J); -} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/relation_table.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/relation_table.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +0,0 @@ -/* The file "relation_table.h" collects the prototypes of routines to - * create a so-called "relation table" which records all edges on the - * lower hulls of all pairwise Minkowski sums. */ - -#ifndef _RelationTable_ -#define _RelationTable_ - -#include "zero_index_tree.h" -#include "index_tree_lp.h" - -void RelTable ( int nVar, int nSpt, int **Spt, int *SptIdx, - double *lft, int **RelTab, L0_IML *L0 ); -/* - * DESCRIPTION : - * Sets up the relation table for the given lifted supports. - * This is the main routine which calls the other functions - * with prototypes listed below. - * - * ON ENTRY : - * nVar ambient dimension; - * nSpt number of different supports; - * Spt supports, in array of range 0..nSpt-1; - * SptIdx the i-th supports starts at SptIdx[i] in Spt, - * SptIdx[nSpt] equals the total #points in Spt; - * lft lifting for each point in Spt; - * RelTab matrix of dimension equal to the total #points; - * L0 initialized level zero tree. - * - * ON RETURN : - * RelTab RelTab[i][j] == 1 if points i and j span an edge - * on the lower hull of the polytope (if i and j are - * from the same support set) or on the lower hull - * of the Minkowski sum of the polytopes spanned by - * the support set which contains point i and the - * other support set which contains point j, - * RelTab[i][j] == 0 otherwise, - * note that this matrix is symmetric; - * L0 updated tree with stored LP information. */ - -void RlTbLP2_a - ( int ma, int na, double **a, int nv1, double *c, - int *LPidx, int *Bidx, double *x, double **Binv, int *info ); -/* - * DESCRIPTION : - * Applies LP to find a nondegenerate solutions to perform a 1-point test. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables (= nVar) plus one; - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * c vector of range 0..nVar+1, - * used to determine outgoing constraint; - * LPidx vector of dimension total #points plus one, - * index to the involved constaints; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated matrix; - * info information about the rank. */ - -void RlTbLP2_e - ( int ma, int na, int NumCol, double **a, int nv1, int *LPidx, - int *Bidx, double *x, double **Binv, int *info ); -/* - * DESCRIPTION : - * Applies LP to extend the point using a 1-point test, - * returns a nondegenerate solution for 1-point tests. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables (= nVar), original dimension; - * NumCol total number of points in the support; - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * LPidx vector of dimension total #points plus one, - * index to the involved constraints; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2. - * - * ON RETURN : - * a extended matrix with the "epsilon variable"; - * Bidx updated index vector; - * x updated solution vector; - * Binv updated matrix; - * info information about the rank. */ - -void dlp2_1pt_i - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ); -/* - * DESCRIPTION : - * Applies LP to perform a 1-point test in case the current support - * is not the first one, for the variable info < 0. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables (= nVar); - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * c vector of range 0..nVar+1, - * used to determine outgoing constraint; - * LPidx vector of dimension total #points plus one; - * FixPt index to a point in the supports; - * TstPt index to an involved constraint; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2; - * RelTab matrix of dimension equal to the total #points. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated matrix; - * RelTab updated relation table. */ - -void dlp2_1pt_s - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ); -/* - * DESCRIPTION : - * Applies LP to perform a 1-point test for the first support, - * in case the variable info < 0. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables (= nVar); - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * c vector of range 0..nVar+1, - * used to determine outgoing constraint; - * LPidx vector of dimension total #points plus one, - * index to the involved constraints; - * FixPt index to a point in the supports; - * TstPt index to an involved constraint; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2; - * RelTab matrix of dimension equal to the total #points; - * L0 current level zero tree. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated matrix; - * RelTab updated relation table; - * L0 LP data with Bidx, x, and Binv. */ - -void dlp1_1pt_i - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab ); -/* - * DESCRIPTION : - * Applies LP to perform a 1-point test when the current support - * is not the first one, and for variable info >= 0. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables; - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * c vector of range 0..nVar+1, - * used to determine outgoing constraint; - * LPidx vector of dimension total #points plus one, - * index to the involved constraints; - * FixPt index to a point in the supports; - * TstPt index to an involved constraint; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2; - * RelTab matrix of dimension equal to the total #points. - * - * ON RETURN : - * Bidx updated index vector; - * x updated solution vector; - * Binv updated matrix; - * RelTab updated relation table. */ - -void dlp1_1pt_s - ( int ma, int na, double **a, int nv1, double *c, int *LPidx, int FixPt, - int TstPt, int *Bidx, double *x, double **Binv, int **RelTab, L0_IML *L0 ); -/* - * DESCRIPTION : - * Applies LP to perform a 1-point test for the first support - * and for variable info >= 0. - * - * ON ENTRY : - * ma number of involved constraints; - * na number of variables; - * a matrix of inequality constraints, - * as many rows as total #points plus one, - * as many columns as nVar + 2; - * nv1 #variables plus one; - * c vector of range 0..nVar+1, - * used to determine outgoing constraint; - * LPidx vector of dimension total #points plus one, - * index to the involved constraints; - * FixPt index to a point in the supports; - * TstPt index to an involved constraint; - * Bidx index vector of range 0..nVar+1; - * x solution vector of range 0..nVar+1; - * Binv square matrix of dimension nVar+2; - * RelTab matrix of dimension equal to the total #points; - * L0 current level zero tree. - * - * ON RETURN : - * x updated vector; - * Binv updated matrix; - * RelTab updated relation table; - * L0 saved LP data Bidx, x, and Binv. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/ts_convsub.adb phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/ts_convsub.adb --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/ts_convsub.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/ts_convsub.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,235 @@ +with text_io; use text_io; +with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; +with Standard_Floating_Numbers; use Standard_Floating_Numbers; +with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; +with Standard_Integer_Vectors; +with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; +with Standard_Floating_Vectors; +with Standard_Floating_Vectors_io; use Standard_Floating_Vectors_io; +with Standard_Floating_VecVecs; +with Standard_Floating_Matrices; use Standard_Floating_Matrices; +with Standard_Floating_Linear_Solvers; use Standard_Floating_Linear_Solvers; +with Lists_of_Floating_Vectors; use Lists_of_Floating_Vectors; +with Arrays_of_Floating_Vector_Lists; use Arrays_of_Floating_Vector_Lists; +with Floating_Mixed_Subdivisions; use Floating_Mixed_Subdivisions; +with Floating_Mixed_Subdivisions_io; use Floating_Mixed_Subdivisions_io; + +procedure ts_convsub is + +-- DESCRIPTION : +-- Converts the output file of Xing Li his program into +-- a floating-point mixed subdivision. + + procedure Read_Lifted_Supports + ( file : in file_type; n : in integer32; + lifsup : out Standard_Floating_VecVecs.Array_of_VecVecs ) is + + -- DESCRIPTION : + -- Reads the lifted supports from file. + + k : integer32 := 0; + + begin + for i in lifsup'range loop + get(file,k); + declare + pts : Standard_Floating_VecVecs.VecVec(1..k); + lpt : Standard_Floating_Vectors.Vector(1..n+1); + begin + for j in 1..k loop + get(file,lpt); + pts(j) := new Standard_Floating_Vectors.Vector'(lpt); + end loop; + lifsup(i) := new Standard_Floating_VecVecs.VecVec'(pts); + end; + end loop; + end Read_Lifted_Supports; + + function Minimum ( lifsup : in Standard_Floating_VecVecs.VecVec; + v : Standard_Floating_Vectors.Vector ) + return double_float is + + -- DESCRIPTION : + -- Returns the minimal inner product the points in lifsup make + -- with the given vector v. + + use Standard_Floating_Vectors; + + min : double_float := lifsup(1).all*v; + ipr : double_float; + + begin + for i in 2..lifsup'last loop + ipr := lifsup(i).all*v; + if ipr < min + then min := ipr; + end if; + end loop; + return min; + end Minimum; + + procedure Test_Inner_Normal + ( n : in integer32; v : in Standard_Floating_Vectors.Vector; + lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; + pts : in Standard_Integer_Vectors.Vector ) is + + -- DESCRIPTION : + -- Checks whether the minimum really occurs at the points in pts. + + min,ipr : double_float; + cnt : integer32 := 0; + use Standard_Floating_Vectors; + + begin + for i in 1..n loop + min := Minimum(lifsup(i).all,v); + put("min : "); put(min,3); + cnt := cnt+1; + put(" at "); put(pts(cnt)+1,1); put(" : "); + ipr := lifsup(i)(pts(cnt)+1).all*v; + put(ipr,3); + cnt := cnt+1; + put(" at "); put(pts(cnt)+1,1); put(" : "); + ipr := lifsup(i)(pts(cnt)+1).all*v; + put(ipr,3); + new_line; + end loop; + end Test_Inner_Normal; + + procedure Create_Cell + ( file : in file_type; n : in integer32; + lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; + mic : out Mixed_Cell ) is + + -- DESCRIPTION : + -- Reads one line from file and returns the corresponding mixed cell. + -- This involves also the computation of the inner normal. + + pt1,pt2 : integer32 := 0; + mat : Matrix(1..n,1..n); + rhs : Standard_Floating_Vectors.Vector(1..n); + ipvt : Standard_Integer_Vectors.Vector(1..n); + info : integer32; + cnt : integer32 := 0; + pts : Standard_Integer_Vectors.Vector(1..2*n); + + begin + mic.pts := new Array_of_Lists(1..n); + for i in 1..n loop + get(file,pt1); cnt := cnt+1; pts(cnt) := pt1; + get(file,pt2); cnt := cnt+1; pts(cnt) := pt2; + declare + last : List; + point1 : constant Standard_Floating_Vectors.Vector + := lifsup(i)(pt1+1).all; + point2 : constant Standard_Floating_Vectors.Vector + := lifsup(i)(pt2+1).all; + begin + Append(mic.pts(i),last,point1); + Append(mic.pts(i),last,point2); + for j in 1..n loop + mat(i,j) := point1(j) - point2(j); + end loop; + rhs(i) := point2(n+1) - point1(n+1); + end; + end loop; + skip_line(file); + lufac(mat,n,ipvt,info); + lusolve(mat,n,ipvt,rhs); + mic.nor := new Standard_Floating_Vectors.Vector(1..n+1); + mic.nor(1..n) := rhs; + mic.nor(n+1) := 1.0; + Test_Inner_Normal(n,mic.nor.all,lifsup,pts); + end Create_Cell; + + procedure Create_Subdivision + ( file : in file_type; n,m : in integer32; + lifsup : in Standard_Floating_VecVecs.Array_of_VecVecs; + sub : out Mixed_Subdivision ) is + + -- DESCRIPTION : + -- Reads m lines from file and creates the mixed subdivision. + + mic : Mixed_Cell; + sub_last : Mixed_Subdivision; + + begin + for i in 1..m loop + Create_Cell(file,n,lifsup,mic); + Append(sub,sub_last,mic); + end loop; + end Create_Subdivision; + + procedure Read_Subdivision + ( file : in file_type; n : in integer32; + mix : out Standard_Integer_Vectors.Link_to_Vector; + sub : out Mixed_Subdivision ) is + + -- DESCRIPTION : + -- Reads the data from file and constructs a mixed subdivision. + -- The input dimension n has alredy been read. + + lifsup : Standard_Floating_VecVecs.Array_of_VecVecs(1..n); + m : integer32 := 0; + mv : natural32; + ans : character; + + begin + put("The dimension is "); put(n,1); put_line("."); + mix := new Standard_Integer_Vectors.Vector'(1..n => 1); + put("The type of mixture : "); put(mix.all); put_line("."); + Read_Lifted_Supports(file,n,lifsup); + put_line("The lifted supports : "); + for i in lifsup'range loop + put(lifsup(i)'last,1); new_line; + for j in lifsup(i)'range loop + for k in 1..n loop + put(" "); + put(integer32(lifsup(i)(j)(k)),1); + end loop; + put(lifsup(i)(j)(n+1)); new_line; + end loop; + end loop; + get(file,m); + put("The number of cells is "); put(m,1); put_line("."); + Create_Subdivision(file,n,m,lifsup,sub); + put("Do you want to continue ? (y/n) "); + Ask_Yes_or_No(ans); + if ans = 'y' then + put(natural32(n),mix.all,sub,mv); + put("The mixed volume is "); put(mv,1); put_line("."); + end if; + end Read_Subdivision; + + procedure Main is + + infile,outfile : file_type; + n : integer32 := 0; + mix : Standard_Integer_Vectors.Link_to_Vector; + sub : Mixed_Subdivision; + + begin + put_line("Reading the name of the input file."); + Read_Name_and_Open_File(infile); + new_line; + put_line("Reading the name of the output file."); + Read_Name_and_Create_File(outfile); + -- new_line; + -- put_line("See the output file for results..."); + -- new_line; + get(infile,n); + Read_Subdivision(infile,n,mix,sub); + put(outfile,natural32(n),mix.all,sub); + end Main; + +begin + new_line; + put_line("Converting output file of Xing Li's program" + & " into mixed subdivision."); + new_line; + Main; +end ts_convsub; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/ts_mv2c.adb phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/ts_mv2c.adb --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/ts_mv2c.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/ts_mv2c.adb 2021-06-30 23:22:40.000000000 +0000 @@ -23,10 +23,10 @@ -- This test procedure is a prototype to interface with other -- software to compute mixed volumes, written in C. - function mv ( ns : integer32; fn : C_Integer_Array; - n,m : integer32; ind,cnt,sup : C_Integer_Array ) - return integer32; - pragma Import(C,mv,"mv"); + function mv1 ( ns : integer32; fn : C_Integer_Array; + n,m : integer32; ind,cnt,sup : C_Integer_Array ) + return integer32; + pragma Import(C,mv1,"mv1"); function Mixed_Volume ( file : string; n,m : integer32; @@ -68,7 +68,7 @@ -- end loop; -- end loop; -- return mv(file,n,m,ind,cnt,sup); -- Ada - return mv(fnv'last,c_fnv,n,m,c_ind,c_cnt,c_sup); -- C + return mv1(fnv'last,c_fnv,n,m,c_ind,c_cnt,c_sup); -- C end Mixed_Volume; procedure Flatten_Supports diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,17 @@ +Sun 27 Jun 2021 : renamed all *.c files into *1.c; nine files in total: + cell_stack1, form_lp1, index_tree_lp1, mixed_volume1, mv1, + one_level_lp1, prepare_for_mv1, relation_tabl1, zero_index_tree1; + and updated ts_mv2c.adb to call mv1 instead of mv. + Renamed convsub.adb into ts_convsub.adb. + Updated the mixedvol.gpr to include all test procedures and to + exclude no source files. Added an #include to mixed_volume1.c + for a compiler warning. + +Sat 26 Jun 2021 : updated mixedvol.gpr for no longer need to exclude + the double_double.c. + +Thu 10 Jun 2021 : defined mixedvol.gpr to build the test procedures. + Tue 8 Dec 2015 : mv_lift had too many parameters on input. Mon 30 Nov 2015 : new procedure in mixedvol_algorithm to split off the diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree1.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree1.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree1.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree1.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,286 @@ +/* This file "zero_index_tree1.c" defines the functions whose prototypes + * are documented in the file "zero_index_tree1.h". */ + +#include +#include +#include +#include "zero_index_tree1.h" + +void L0IdxNode_Init ( L0IdxNode *p, int i ) +{ + p->idx = i; + p->R = 0; + p->D = 0; +} + +void L0_IML_Init ( L0_IML *p ) +{ + p->L0head = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); + L0IdxNode_Init(p->L0head,-1); + p->L0prev = p->L0curr = p->L0head; + p->LP1 = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1,0,0); +} + +int L0_Migrate ( L0_IML *p, IndexNode *inp ) +{ + if(!inp) + { + printf("\aMigrate: inp = 0!\n"); + exit(1); + } + if(p->L0head->D) + { + p->L0prev = p->L0head->D; + inp->idx = p->L0prev->idx; + inp->S = p->L0prev->R; + + p->L0head->D = p->L0prev->D; + free(p->L0prev); + return 1; + } + else + { + free(p->L0head); + return 0; + } +} + +int L0_FindInR ( L0_IML *p, int IDX ) +{ + for(p->curr = p->prev->S; p->curr; p->curr = p->curr->S) + { + if(IDX <= p->curr->idx) + { + if(IDX == p->curr->idx) + return 1; /* curr->idx = IDX */ + else + return 0; /* prev->idx < IDX < curr->idx */ + } + p->prev = p->prev->S; + } + return 0; /* => all indices are smaller than IDX, */ + /* i.e. *** < prev->idx < IDX ( prev->S = curr = 0 ) */ +} + +int L0_FindInD ( L0_IML *p, int IDX ) +{ + for(p->L0curr = p->L0prev->D; p->L0curr; p->L0curr = p->L0curr->D) + { + if(IDX <= p->L0curr->idx) + { + if(IDX == p->L0curr->idx) + return 1; /* L0curr->idx = IDX */ + else + return 0; /* L0prev->idx < IDX < L0curr->idx */ + } + p->L0prev = p->L0prev->D; + } + return 0; /* => all indices are smaller than IDX, */ + /* i.e. *** < L0prev->idx < IDX ( L0prev->D = L0curr = 0 ) */ +} + +void L0_Add1 + ( L0_IML *p, int n, int *J, int N, int *I, double *X, double **A ) +{ + int LPnotused = 1; + LPdata *lpp; + int i,j; + + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,N,I,X,A); + p->L0prev = p->L0head; + + for(i=0; iL0curr->R) + { + p->L0prev = p->L0curr; + p->curr = p->L0curr->R; + if(p->curr->idx > J[i+1]) + { + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[i+1],lpp); + p->curr->S = p->L0prev->R; + p->L0prev->R = p->curr; + LPnotused = 0; + } + else if(p->curr->idx < J[i+1]) j = i+1; + for( ; jprev = p->curr; + if(!L0_FindInR(p,J[j])) + { + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[j],lpp); + p->curr->S = p->prev->S; + p->prev->S = p->curr; + LPnotused = 0; + } + } + } + else + { + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[i+1],lpp); + p->L0curr->R = p->curr; + LPnotused = 0; + for( ; jprev = p->curr; /* Add2S(J[j],lpp); */ + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[j],lpp); + p->curr->S = p->prev->S; + p->prev->S = p->curr; + } + } + } + } + else /* add J[i] after L0prev */ + { + p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); + L0IdxNode_Init(p->L0curr,J[i]); + LPnotused = 0; + p->L0curr->D = p->L0prev->D; + p->L0prev->D = p->L0curr; + if(i+1curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[i+1],lpp); + p->L0curr->R = p->curr; + for( ; jprev = p->curr; /* Add2S(J[j],lpp); */ + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[j],lpp); + p->curr->S = p->prev->S; + p->prev->S = p->curr; + } + } + } + p->L0prev = p->L0curr; + } + if(LPnotused) + { + free(lpp->JJJ); + free(lpp->xxx); + for(i=0; idim; i++) free((lpp->INV)[i]); + free(lpp->INV); + free(lpp); + } + else + { + p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1->next,lpp,p->LP1->next); + } +} + +void L0_Add2 ( L0_IML *p, int *J, int N, int *I, double *X, double **A ) +{ + LPdata *lpp; + int i; + + p->L0prev = p->L0head; + for(i=0; i<2; i++) /* loop thru all pts in J */ + { + if(L0_FindInD(p,J[i])) /* then L0curr != 0 */ + { + if(i==0) + { + if(p->L0curr->R) + { + p->L0prev = p->L0curr; + p->curr = p->L0curr->R; + if(p->curr->idx > J[1]) + { + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,N,I,X,A); + p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1->next,lpp,p->LP1->next); + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[1],lpp); + p->curr->S = p->L0prev->R; + p->L0prev->R = p->curr; + } + else if(p->curr->idx < J[1]) + { + p->prev = p->curr; + if(!L0_FindInR(p,J[1])) + { /* Add2S(J[1],lpp); */ + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,N,I,X,A); + p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1->next,lpp,p->LP1->next); + p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->curr,J[1],lpp); + p->curr->S = p->prev->S; + p->prev->S = p->curr; + } + else return; /* J[1] is in the right branch of J[0] */ + } + } + else + { + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,N,I,X,A); + p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1->next,lpp,p->LP1->next); + p->L0curr->R = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->L0curr->R,J[1],lpp); /* Add2E(J[1],lpp); */ + } + } + } + else /* add J[i] after L0prev */ + { + if(i==0) + { + lpp = (LPdata*)calloc(1,sizeof(LPdata)); + LPdata_Init(lpp,N,I,X,A); + p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); + LPPL_Init(p->LP1->next,lpp,p->LP1->next); + p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); + L0IdxNode_Init(p->L0curr,J[i]); + p->L0curr->D = p->L0prev->D; + p->L0prev->D = p->L0curr; + p->L0curr->R = (IndexNode*)calloc(1,sizeof(IndexNode)); + IndexNode_Init(p->L0curr->R,J[1],lpp); /* Add2E(J[1],lpp); */ + } + else + { + p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); + L0IdxNode_Init(p->L0curr,J[i]); + p->L0curr->D = p->L0prev->D; + p->L0prev->D = p->L0curr; + } + } + p->L0prev = p->L0curr; + } +} + +void L0_IML_Del ( L0_IML *p ) +{ + L0_Free(p); + free(p->LP1); /* L0head is removed by Migrate when empty. */ +} + +void L0_Free ( L0_IML *li ) +{ + LPPL *P = li->LP1->next; /* Clean LP1 link */ + int i; + + while(P) + { + li->LP1->next = P->next; + free(P->addr->JJJ); + free(P->addr->xxx); + for(i=0; iaddr->dim; i++) free((P->addr->INV)[i]); + free(P->addr->INV); /* delete P->addr */ + free(P); + P = li->LP1->next; + } /* Multi index links and L0head would be removed by Migrate(-) ! */ +} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree1.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree1.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree1.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree1.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,143 @@ +/* The file "zero_index_tree1.h" defines the data structures for the specific + * case of level 0 in the index tree of LP problems. */ + +#ifndef _L0_IML1_H_ +#define _L0_IML1_H_ + +#include +#include "index_tree_lp1.h" + +typedef struct L0IdxNode L0IdxNode; +typedef struct L0_IML L0_IML; + +struct L0IdxNode /* structure to define linked list */ +{ + int idx; /* index of the node in the list is just a number */ + IndexNode *R; /* linked list of LPdata */ + L0IdxNode *D; /* points to the next item in the list */ +}; + +struct L0_IML /* index tree of LP problems at level zero */ +{ + L0IdxNode *L0head; + L0IdxNode *L0curr; /* Current IT node ptr, for Add(-). */ + L0IdxNode *L0prev; /* parent of curr, for Add(-). */ + IndexNode *curr; /* Current IT node ptr, for Add(-). */ + IndexNode *prev; /* parent of curr, for Add(-). */ + LPPL *LP1; /* dummy head of the LP address link (used in level 1)*/ +}; + +void L0IdxNode_Init ( L0IdxNode *p, int i ); +/* + * DESCRIPTION : + * Initializes the linked list of nodes with LPdata. + * + * ON ENTRY : + * p memory allocated for one structure of type L0IdxNode; + * i value for p->idx. + * + * ON RETURN : + * p p->idx == i and the pointers p->R and p->D are 0. */ + +void L0_IML_Init ( L0_IML *p ); +/* + * DESCRIPTION : + * Allocates memory for p->L0head and p->LP1, initializing both. + * The pointers p0->L0curr and p0->L0prev are set to p->L0head. */ + +int L0_Migrate ( L0_IML *p, IndexNode *inp ); +/* + * DESCRIPTION : + * Migrates the data of the index tree at level zero with the node inp. + * + * ON RETURN : + * p p->L0head->D is updated and p->L0prev is cleared; + * inp inp->S now has the value of p->L0prev->R; + * 0 if p->L0head->D is empty, 1 otherwise. + * the list in p->L0prev->R is assigned to inp->S. */ + +int L0_FindInR ( L0_IML *p, int IDX ); +/* + * DESCRIPTION : + * Does horizontal search in p for a node with label idx equal to IDX. + * + * ON ENTRY : + * p index tree with LP problems at level zero; + * IDX label to an index node. + * + * ON RETURN : + * 0 if there is no index node in the list starting with p->prev->S + * with the given label IDX, otherwise + * 1 is returned if there is an index node with this index + * and then p->curr->idx == IDX. */ + +int L0_FindInD ( L0_IML *p, int IDX ); +/* + * DESCRIPTION : + * Does vertical search in p for a node with label idx equal to IDX. + * + * ON ENTRY : + * p index tree with LP problems at level zero; + * IDX label to an index node. + * + * ON RETURN : + * 0 if there is no index node in the list starting with p->L0prev->D + * with the given label IDX, otherwise + * 1 is returned if there is an index node with this index + * and then p->L0curr->idx == IDX. */ + +void L0_Add1 + ( L0_IML *p, int n, int *J, int N, int *I, double *X, double **A ); +/* + * DESCRIPTION : + * Updates the index tree at level zero with data for a LP problem. + * + * REQUIRED : + * The n entries in J are sorted in ascending order. + * + * ON ENTRY : + * p current index tree at level zero of LP problems. + * n dimension of the vector J; + * J index vector of n entries, sorted in ascending order; + * N dimension of the LP problem; + * I index vector of dimension N with constraints involved; + * X solution vector of dimension N; + * A basis inverse, matrix of dimension N. + * + * ON RETURN : + * p updated index tree at level zero of LP problems. */ + +void L0_Add2 + ( L0_IML *p, int *J, int N, int *I, double *X, double **A ); +/* + * DESCRIPTION : + * Updates the index tree at level zero with data for a LP problem, + * for only two points. + * + * REQUIRED : + * The two entries in J are sorted in ascending order. + * + * ON ENTRY : + * p current index tree at level zero of LP problems; + * J two number sorted in ascending order; + * N dimension of the LP problem; + * I index vector of dimension N with constraints involved; + * X solution vector of dimension N; + * A basis inverse, matrix of dimension N. + * + * ON RETURN : + * p updated index tree at level zero of LP problems. */ + +void L0_IML_Del ( L0_IML *p ); +/* + * DESCRIPTION : + * Deletes the index tree at level zero, + * calls the routine L0_free below. */ + +void L0_Free ( L0_IML *li ); +/* + * DESCRIPTION : + * Deallocation of all the LPdata in the index tree, + * called by the other routine L0_IML_Del. */ + +#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree.c phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree.c --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,286 +0,0 @@ -/* This file "zero_index_tree.c" defines the functions whose prototypes - * are documented in the file "zero_index_tree.h". */ - -#include -#include -#include -#include "zero_index_tree.h" - -void L0IdxNode_Init ( L0IdxNode *p, int i ) -{ - p->idx = i; - p->R = 0; - p->D = 0; -} - -void L0_IML_Init ( L0_IML *p ) -{ - p->L0head = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); - L0IdxNode_Init(p->L0head,-1); - p->L0prev = p->L0curr = p->L0head; - p->LP1 = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1,0,0); -} - -int L0_Migrate ( L0_IML *p, IndexNode *inp ) -{ - if(!inp) - { - printf("\aMigrate: inp = 0!\n"); - exit(1); - } - if(p->L0head->D) - { - p->L0prev = p->L0head->D; - inp->idx = p->L0prev->idx; - inp->S = p->L0prev->R; - - p->L0head->D = p->L0prev->D; - free(p->L0prev); - return 1; - } - else - { - free(p->L0head); - return 0; - } -} - -int L0_FindInR ( L0_IML *p, int IDX ) -{ - for(p->curr = p->prev->S; p->curr; p->curr = p->curr->S) - { - if(IDX <= p->curr->idx) - { - if(IDX == p->curr->idx) - return 1; /* curr->idx = IDX */ - else - return 0; /* prev->idx < IDX < curr->idx */ - } - p->prev = p->prev->S; - } - return 0; /* => all indices are smaller than IDX, */ - /* i.e. *** < prev->idx < IDX ( prev->S = curr = 0 ) */ -} - -int L0_FindInD ( L0_IML *p, int IDX ) -{ - for(p->L0curr = p->L0prev->D; p->L0curr; p->L0curr = p->L0curr->D) - { - if(IDX <= p->L0curr->idx) - { - if(IDX == p->L0curr->idx) - return 1; /* L0curr->idx = IDX */ - else - return 0; /* L0prev->idx < IDX < L0curr->idx */ - } - p->L0prev = p->L0prev->D; - } - return 0; /* => all indices are smaller than IDX, */ - /* i.e. *** < L0prev->idx < IDX ( L0prev->D = L0curr = 0 ) */ -} - -void L0_Add1 - ( L0_IML *p, int n, int *J, int N, int *I, double *X, double **A ) -{ - int LPnotused = 1; - LPdata *lpp; - int i,j; - - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,N,I,X,A); - p->L0prev = p->L0head; - - for(i=0; iL0curr->R) - { - p->L0prev = p->L0curr; - p->curr = p->L0curr->R; - if(p->curr->idx > J[i+1]) - { - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[i+1],lpp); - p->curr->S = p->L0prev->R; - p->L0prev->R = p->curr; - LPnotused = 0; - } - else if(p->curr->idx < J[i+1]) j = i+1; - for( ; jprev = p->curr; - if(!L0_FindInR(p,J[j])) - { - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[j],lpp); - p->curr->S = p->prev->S; - p->prev->S = p->curr; - LPnotused = 0; - } - } - } - else - { - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[i+1],lpp); - p->L0curr->R = p->curr; - LPnotused = 0; - for( ; jprev = p->curr; /* Add2S(J[j],lpp); */ - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[j],lpp); - p->curr->S = p->prev->S; - p->prev->S = p->curr; - } - } - } - } - else /* add J[i] after L0prev */ - { - p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); - L0IdxNode_Init(p->L0curr,J[i]); - LPnotused = 0; - p->L0curr->D = p->L0prev->D; - p->L0prev->D = p->L0curr; - if(i+1curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[i+1],lpp); - p->L0curr->R = p->curr; - for( ; jprev = p->curr; /* Add2S(J[j],lpp); */ - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[j],lpp); - p->curr->S = p->prev->S; - p->prev->S = p->curr; - } - } - } - p->L0prev = p->L0curr; - } - if(LPnotused) - { - free(lpp->JJJ); - free(lpp->xxx); - for(i=0; idim; i++) free((lpp->INV)[i]); - free(lpp->INV); - free(lpp); - } - else - { - p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1->next,lpp,p->LP1->next); - } -} - -void L0_Add2 ( L0_IML *p, int *J, int N, int *I, double *X, double **A ) -{ - LPdata *lpp; - int i; - - p->L0prev = p->L0head; - for(i=0; i<2; i++) /* loop thru all pts in J */ - { - if(L0_FindInD(p,J[i])) /* then L0curr != 0 */ - { - if(i==0) - { - if(p->L0curr->R) - { - p->L0prev = p->L0curr; - p->curr = p->L0curr->R; - if(p->curr->idx > J[1]) - { - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,N,I,X,A); - p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1->next,lpp,p->LP1->next); - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[1],lpp); - p->curr->S = p->L0prev->R; - p->L0prev->R = p->curr; - } - else if(p->curr->idx < J[1]) - { - p->prev = p->curr; - if(!L0_FindInR(p,J[1])) - { /* Add2S(J[1],lpp); */ - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,N,I,X,A); - p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1->next,lpp,p->LP1->next); - p->curr = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->curr,J[1],lpp); - p->curr->S = p->prev->S; - p->prev->S = p->curr; - } - else return; /* J[1] is in the right branch of J[0] */ - } - } - else - { - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,N,I,X,A); - p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1->next,lpp,p->LP1->next); - p->L0curr->R = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->L0curr->R,J[1],lpp); /* Add2E(J[1],lpp); */ - } - } - } - else /* add J[i] after L0prev */ - { - if(i==0) - { - lpp = (LPdata*)calloc(1,sizeof(LPdata)); - LPdata_Init(lpp,N,I,X,A); - p->LP1->next = (LPPL*)calloc(1,sizeof(LPPL)); - LPPL_Init(p->LP1->next,lpp,p->LP1->next); - p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); - L0IdxNode_Init(p->L0curr,J[i]); - p->L0curr->D = p->L0prev->D; - p->L0prev->D = p->L0curr; - p->L0curr->R = (IndexNode*)calloc(1,sizeof(IndexNode)); - IndexNode_Init(p->L0curr->R,J[1],lpp); /* Add2E(J[1],lpp); */ - } - else - { - p->L0curr = (L0IdxNode*)calloc(1,sizeof(L0IdxNode)); - L0IdxNode_Init(p->L0curr,J[i]); - p->L0curr->D = p->L0prev->D; - p->L0prev->D = p->L0curr; - } - } - p->L0prev = p->L0curr; - } -} - -void L0_IML_Del ( L0_IML *p ) -{ - L0_Free(p); - free(p->LP1); /* L0head is removed by Migrate when empty. */ -} - -void L0_Free ( L0_IML *li ) -{ - LPPL *P = li->LP1->next; /* Clean LP1 link */ - int i; - - while(P) - { - li->LP1->next = P->next; - free(P->addr->JJJ); - free(P->addr->xxx); - for(i=0; iaddr->dim; i++) free((P->addr->INV)[i]); - free(P->addr->INV); /* delete P->addr */ - free(P); - P = li->LP1->next; - } /* Multi index links and L0head would be removed by Migrate(-) ! */ -} diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree.h phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree.h --- phcpack-2.4.84/src/Ada/Root_Counts/MixedVol/zero_index_tree.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/MixedVol/zero_index_tree.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -/* The file "zero_index_tree.h" defines the data structures for the specific - * case of level 0 in the index tree of LP problems. */ - -#ifndef _L0_IML_H_ -#define _L0_IML_H_ - -#include -#include "index_tree_lp.h" - -typedef struct L0IdxNode L0IdxNode; -typedef struct L0_IML L0_IML; - -struct L0IdxNode /* structure to define linked list */ -{ - int idx; /* index of the node in the list is just a number */ - IndexNode *R; /* linked list of LPdata */ - L0IdxNode *D; /* points to the next item in the list */ -}; - -struct L0_IML /* index tree of LP problems at level zero */ -{ - L0IdxNode *L0head; - L0IdxNode *L0curr; /* Current IT node ptr, for Add(-). */ - L0IdxNode *L0prev; /* parent of curr, for Add(-). */ - IndexNode *curr; /* Current IT node ptr, for Add(-). */ - IndexNode *prev; /* parent of curr, for Add(-). */ - LPPL *LP1; /* dummy head of the LP address link (used in level 1)*/ -}; - -void L0IdxNode_Init ( L0IdxNode *p, int i ); -/* - * DESCRIPTION : - * Initializes the linked list of nodes with LPdata. - * - * ON ENTRY : - * p memory allocated for one structure of type L0IdxNode; - * i value for p->idx. - * - * ON RETURN : - * p p->idx == i and the pointers p->R and p->D are 0. */ - -void L0_IML_Init ( L0_IML *p ); -/* - * DESCRIPTION : - * Allocates memory for p->L0head and p->LP1, initializing both. - * The pointers p0->L0curr and p0->L0prev are set to p->L0head. */ - -int L0_Migrate ( L0_IML *p, IndexNode *inp ); -/* - * DESCRIPTION : - * Migrates the data of the index tree at level zero with the node inp. - * - * ON RETURN : - * p p->L0head->D is updated and p->L0prev is cleared; - * inp inp->S now has the value of p->L0prev->R; - * 0 if p->L0head->D is empty, 1 otherwise. - * the list in p->L0prev->R is assigned to inp->S. */ - -int L0_FindInR ( L0_IML *p, int IDX ); -/* - * DESCRIPTION : - * Does horizontal search in p for a node with label idx equal to IDX. - * - * ON ENTRY : - * p index tree with LP problems at level zero; - * IDX label to an index node. - * - * ON RETURN : - * 0 if there is no index node in the list starting with p->prev->S - * with the given label IDX, otherwise - * 1 is returned if there is an index node with this index - * and then p->curr->idx == IDX. */ - -int L0_FindInD ( L0_IML *p, int IDX ); -/* - * DESCRIPTION : - * Does vertical search in p for a node with label idx equal to IDX. - * - * ON ENTRY : - * p index tree with LP problems at level zero; - * IDX label to an index node. - * - * ON RETURN : - * 0 if there is no index node in the list starting with p->L0prev->D - * with the given label IDX, otherwise - * 1 is returned if there is an index node with this index - * and then p->L0curr->idx == IDX. */ - -void L0_Add1 - ( L0_IML *p, int n, int *J, int N, int *I, double *X, double **A ); -/* - * DESCRIPTION : - * Updates the index tree at level zero with data for a LP problem. - * - * REQUIRED : - * The n entries in J are sorted in ascending order. - * - * ON ENTRY : - * p current index tree at level zero of LP problems. - * n dimension of the vector J; - * J index vector of n entries, sorted in ascending order; - * N dimension of the LP problem; - * I index vector of dimension N with constraints involved; - * X solution vector of dimension N; - * A basis inverse, matrix of dimension N. - * - * ON RETURN : - * p updated index tree at level zero of LP problems. */ - -void L0_Add2 - ( L0_IML *p, int *J, int N, int *I, double *X, double **A ); -/* - * DESCRIPTION : - * Updates the index tree at level zero with data for a LP problem, - * for only two points. - * - * REQUIRED : - * The two entries in J are sorted in ascending order. - * - * ON ENTRY : - * p current index tree at level zero of LP problems; - * J two number sorted in ascending order; - * N dimension of the LP problem; - * I index vector of dimension N with constraints involved; - * X solution vector of dimension N; - * A basis inverse, matrix of dimension N. - * - * ON RETURN : - * p updated index tree at level zero of LP problems. */ - -void L0_IML_Del ( L0_IML *p ); -/* - * DESCRIPTION : - * Deletes the index tree at level zero, - * calls the routine L0_free below. */ - -void L0_Free ( L0_IML *li ); -/* - * DESCRIPTION : - * Deallocation of all the LPdata in the index tree, - * called by the other routine L0_IML_Del. */ - -#endif diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Product/product.gpr phcpack-2.4.85/src/Ada/Root_Counts/Product/product.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Product/product.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Product/product.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,49 @@ +project product is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_startsys.adb", -- tests total degree start systems + "ts_strpart.adb", -- tests sets and partitions strings + "ts_permanent.adb", -- tests the permanent computation + "ts_permstar.adb", -- mirroring permanent computations + "ts_mainmhom.adb", -- tests main m-homogenization + "ts_mainmuho.adb", -- tests main multi-homogenization + "ts_pivsel.adb", -- tests pivot selection + "ts_strset.adb", -- tests set structures as strings + "ts_mainsets.adb", -- tests main set structures + "ts_prodsys.adb" -- tests product systems + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end product; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Product/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Product/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Product/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Product/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Generalized Bezout numbers and linear-product start systems in PHCv2.4.81 +Generalized Bezout numbers and linear-product start systems in PHCv2.4.85 Four types of start systems are implemented, based on total degree, m-homogeneous, multi-homegenous, and generalized Bezout number. @@ -13,6 +13,11 @@ The formal root count based on a set structure in phc -r is then computed much faster than with the previous permanent computation. +Run "gprbuild product.gpr" to make all test programs. +On windows, type "gprbuild product.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean product.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -45,7 +50,7 @@ interpolating_homotopies : homotopies based on interpolation interpolating_homotopies_driver : driver for interpolating homotopies main_m_homogenization : main interactive m-homogenization -ts_mainvmhom : calls the main m-homogenization +ts_mainmhom : calls the main m-homogenization ------------------------------------------------------------------------------ generate_unions : all unions of k numbers from a range degree_structure : model for multi-homogeneous structure diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Product/standard_linear_product_system_io.adb phcpack-2.4.85/src/Ada/Root_Counts/Product/standard_linear_product_system_io.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Product/standard_linear_product_system_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Product/standard_linear_product_system_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -41,7 +41,7 @@ stop := (pp = Null_Poly); exit when stop; h(0) := Coeff(pp,d); - for j in 1..nn loop + for j in 1..integer32(nn) loop d(j) := 1; h(j) := Coeff(pp,d); d(j) := 0; @@ -49,6 +49,7 @@ Standard_Linear_Product_System.Add_Hyperplane(i,h); end loop; end loop; + Clear(d); end; end get; @@ -82,7 +83,7 @@ h := Standard_Linear_Product_System.Get_Hyperplane(i,j); put(file,' '); for k in 1..n loop - Write_Number(file,h(k)); + Write_Number(file,h(integer32(k))); put(file,'*'); Symbol_Table_io.put(file,Symbol_Table.Get(k)); put(file," + "); diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Product/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Product/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Product/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Product/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Tue 15 Jun 2021 : fixed standard_linear_product_system_io.adb. + +Thu 10 Jun 2021 : added the exec_dir attribute to product.gpr. + +Wed 9 Jun 2021 : defines product.gpr to build the test procedures. + Fri 23 Oct 2020 : new packages test_product_systems, test_pivot_selection, and test_start_systems, with code extracted from respectively ts_prodsys, ts_pivset, and ts_startsys. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_directions.adb phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_directions.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_directions.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_directions.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -with Standard_Floating_Numbers; use Standard_Floating_Numbers; - -package body Parallel_Directions is - --- AUXILIARY FUNCTIONS : - - function Pivot ( v : Standard_Integer_Vectors.Vector ) return integer is - begin - for i in reverse v'range loop - if v(i) /= 0 - then return i; - end if; - end loop; - return v'first-1; - end Pivot; - - function Normalize ( v : Standard_Integer_Vectors.Vector; p : integer ) - return Standard_Floating_Vectors.Vector is - - res : Standard_Floating_Vectors.Vector(v'range); - dvp : constant double_float := double_float(v(p)); - - begin - for i in res'first..p-1 loop - res(i) := double_float(v(i))/dvp; - end loop; - res(p) := 1.0; - for i in p+1..res'last loop - res(i) := 0.0; - end loop; - return res; - end Normalize; - - function ">" ( v,w : Standard_Floating_Vectors.Link_to_Vector ) - return boolean is - begin - for i in v'range loop - if abs(v(i) - w(i)) > 1.0E-8 then - if v(i) > w(i) - then return true; - else return false; - end if; - end if; - end loop; - return false; - end ">"; - - function Equal ( v,w : Standard_Floating_Vectors.Link_to_Vector ) - return boolean is - begin - for i in v'range loop - if abs(v(i) - w(i)) > 1.0E-8 - then return false; - end if; - end loop; - return true; - end Equal; - - procedure Swap ( v : in out Standard_Natural_Vectors.Vector; - i,j : in integer ) is - - temp : constant natural := v(i); - - begin - v(i) := v(j); - v(j) := temp; - end Swap; - - function Min ( v : Standard_Floating_VecVecs.Array_of_VecVecs; - sv : Standard_Natural_VecVecs.VecVec; - ind : Standard_Natural_Vectors.Vector ) return integer is - - res,k : integer; - p : integer := v'first; - min : Standard_Floating_Vectors.Link_to_Vector; - - begin - while ind(p) > v(p)'last loop - p := p + 1; - exit when p > ind'last; - end loop; - if p > ind'last then - return -1; - else - k := sv(p)(ind(p)); - min := v(p)(k); - res := p; - for i in p+1..v'last loop - if ind(i) <= v(i)'last then - k := sv(i)(ind(i)); - if min > v(i)(k) then - res := i; - min := v(i)(k); - end if; - end if; - end loop; - return res; - end if; - end Min; - - function Last_Index ( v : Standard_Floating_VecVecs.Array_of_VecVecs; - ind : Standard_Natural_Vectors.Vector ) - return integer is - - res : integer := -1; - - begin - for i in v'range loop - if ind(i) <= v(i)'last then - if res = -1 - then res := i; - else return -1; - end if; - end if; - end loop; - if res = -1 - then return 0; - else return res; - end if; - end Last_Index; - -end Parallel_Directions; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_directions.ads phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_directions.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_directions.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_directions.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -with Standard_Natural_Vectors; -with Standard_Natural_VecVecs; -with Standard_Integer_Vectors; -with Standard_Floating_Vectors; -with Standard_Floating_VecVecs; - -package Parallel_Directions is - --- DESCRIPTION : --- The functions in this package are mainly auxiliary to the operations --- in Parallel_Edges. - - function Pivot ( v : Standard_Integer_Vectors.Vector ) return integer; - - -- DESCRIPTION : - -- Returns v'first - 1 if v is zero, otherwise it returns the index - -- in v of the last nonzero entry. - - function Normalize ( v : Standard_Integer_Vectors.Vector; p : integer ) - return Standard_Floating_Vectors.Vector; - - -- DESCRIPTION : - -- The vector on return has 1 at its position p. - -- Every element in the vector on return is divided by v(p). - - -- REQUIRED : p is in v'range and v(p) /= 0. - - function ">" ( v,w : Standard_Floating_Vectors.Link_to_Vector ) - return boolean; - - -- DESCRIPTION : - -- Returns true at the first entry of v that is larger than the - -- corresponding entry in w. Returns false if v and w are equal - -- or if at the first different position v is smaller than w. - -- By different, the difference must be larger than 1.0E-8. - - function Equal ( v,w : Standard_Floating_Vectors.Link_to_Vector ) - return boolean; - - -- DESCRIPTION : - -- Two directions are equal if all their components differ - -- by less than 1.0E-8. - - procedure Swap ( v : in out Standard_Natural_Vectors.Vector; - i,j : in integer ); - - -- DESCRIPTION : - -- Swaps the entries i and j in the vector v. - - function Min ( v : Standard_Floating_VecVecs.Array_of_VecVecs; - sv : Standard_Natural_VecVecs.VecVec; - ind : Standard_Natural_Vectors.Vector ) return integer; - - -- DESCRIPTION : - -- Returns the index of the current minimum vector in v, sorted as sv, - -- with ind pointing at the current position in v. - - -- ON ENTRY : - -- v normalized direction vectors for tuple of supports; - -- sv labels to sort the vectors increasingly lexicographically; - -- ind index vector to current position in v. - - -- ON RETURN : - -- Returns -1 if ind(i) for all i is larger than v(i)'last, - -- otherwise, returns the index of the minimal vector. - - function Last_Index ( v : Standard_Floating_VecVecs.Array_of_VecVecs; - ind : Standard_Natural_Vectors.Vector ) - return integer; - - -- DESCRIPTION : - -- Returns -1 if there are two or more indices k in ind for which - -- ind(k) <= v(k)'last. Otherwise the index k of the last entry - -- in ind for which ind(k) <= v(k)'last still holds is returned. - -- If for supports ind(k) > v(k)'last, then 0 is returned. - -end Parallel_Directions; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_edges.adb phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_edges.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_edges.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_edges.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Integer_Vectors; -with Parallel_Directions; - -package body Parallel_Edges is - - function Edge_Direction - ( n : natural; f : Face ) - return Standard_Floating_Vectors.Vector is - - res : Standard_Floating_Vectors.Vector(1..n); - dir : Standard_Integer_Vectors.Vector(1..n); - piv : integer; - - begin - for i in 1..n loop - dir(i) := f(f'first+1)(i) - f(f'first)(i); - end loop; - piv := Parallel_Directions.Pivot(dir); - res := Parallel_Directions.Normalize(dir,piv); - return res; - end Edge_Direction; - - function Edge_Directions - ( n : natural; f : Faces ) - return Standard_Floating_VecVecs.VecVec is - - res : Standard_Floating_VecVecs.VecVec(1..Length_Of(f)); - p : Faces := f; - e : Face; - v : Standard_Floating_Vectors.Vector(1..n); - - begin - for i in res'range loop - e := Head_Of(p); - v := Edge_Direction(n,e); - res(i) := new Standard_Floating_Vectors.Vector'(v); - p := Tail_Of(p); - end loop; - return res; - end Edge_Directions; - - function Edge_Directions - ( n : natural; f : Array_of_Faces ) - return Standard_Floating_VecVecs.Array_of_VecVecs is - - res : Standard_Floating_VecVecs.Array_of_VecVecs(f'range); - - begin - for i in res'range loop - declare - L : constant natural := Length_Of(f(i)); - v : Standard_Floating_VecVecs.VecVec(1..L) := Edge_Directions(n,f(i)); - begin - res(i) := new Standard_Floating_VecVecs.VecVec'(v); - end; - end loop; - return res; - end Edge_Directions; - - function Sort ( v : Standard_Floating_VecVecs.VecVec ) - return Standard_Natural_Vectors.Vector is - - res : Standard_Natural_Vectors.Vector(v'range); - min : Standard_Floating_Vectors.Link_to_Vector; - - use Parallel_Directions; - - begin - for i in v'range loop - res(i) := i; - end loop; - for i in v'first..v'last-1 loop - min := v(res(i)); - for j in i+1..v'last loop - if min > v(res(j)) then - Parallel_Directions.Swap(res,i,j); - min := v(res(j)); - end if; - end loop; - end loop; - return res; - end Sort; - - function Sort ( v : Standard_Floating_VecVecs.Array_of_VecVecs ) - return Standard_Natural_VecVecs.VecVec is - - res : Standard_Natural_VecVecs.VecVec(v'range); - - begin - for i in v'range loop - declare - ind : Standard_Natural_Vectors.Vector(v(i)'range) := Sort(v(i).all); - begin - res(i) := new Standard_Natural_Vectors.Vector'(ind); - end; - end loop; - return res; - end Sort; - - procedure Merge_Sort - ( v,w : in Standard_Floating_VecVecs.VecVec; - sv,sw : in Standard_Natural_Vectors.Vector; - vnb,wnb : in natural; - snb,dst : out Standard_Natural_Vectors.Vector ) is - - use Parallel_Directions; - - vk : integer := v'first; - wk : integer := w'first; - ind : integer := snb'first; - - begin - while vk <= v'last and wk <= w'last loop - if v(sv(vk)) > w(sw(wk)) then - snb(ind) := wnb; - dst(ind) := sw(wk); - wk := wk + 1; - else - snb(ind) := vnb; - dst(ind) := sv(vk); - vk := vk + 1; - end if; - ind := ind + 1; - end loop; - if vk > v'last then - while wk <= w'last loop - snb(ind) := wnb; - dst(ind) := sw(wk); - wk := wk + 1; - ind := ind + 1; - end loop; - elsif wk > w'last then - while wk <= w'last loop - snb(ind) := vnb; - dst(ind) := sv(vk); - vk := vk + 1; - ind := ind + 1; - end loop; - end if; - end Merge_Sort; - - function Sum_of_Lengths - ( v : in Standard_Floating_VecVecs.Array_of_VecVecs ) - return natural is - - res : natural := 0; - - begin - for i in v'range loop - res := res + v(i)'last; - end loop; - return res; - end Sum_of_Lengths; - - procedure Merge_Sort - ( v : in Standard_Floating_VecVecs.Array_of_VecVecs; - sv : in Standard_Natural_VecVecs.VecVec; - snb,dst : out Standard_Natural_Vectors.Vector ) is - - p : integer := -1; - ind : Standard_Natural_Vectors.Vector(v'range); - pos : integer := snb'first; - k : integer; - - begin - for i in ind'range loop - ind(i) := v(i)'first; - end loop; - while p < 0 loop - k := Parallel_Directions.Min(v,sv,ind); - snb(pos) := k; - dst(pos) := sv(k)(ind(k)); - pos := pos + 1; - ind(k) := ind(k) + 1; - p := Parallel_Directions.Last_Index(v,ind); - end loop; - if p > 0 then - while pos <= snb'last loop - snb(pos) := p; - dst(pos) := sv(p)(ind(p)); - pos := pos + 1; - ind(p) := ind(p) + 1; - exit when ind(p) > v(p)'last; - end loop; - end if; - end Merge_Sort; - -end Parallel_Edges; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_edges.ads phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_edges.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/parallel_edges.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/parallel_edges.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -with Standard_Natural_Vectors; -with Standard_Natural_VecVecs; -with Standard_Floating_Vectors; -with Standard_Floating_VecVecs; -with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; - -package Parallel_Edges is - --- DESCRIPTION : --- This package provides routines to compute parallel edges --- of a tuple of edges of polytopes. - - function Edge_Direction - ( n : natural; f : Face ) - return Standard_Floating_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the normalized direction vector defined by the vertices - -- that span the edge f in n-space. The normalized direction vector - -- on return has its last nonzero component equal to one. - - function Edge_Directions - ( n : natural; f : Faces ) - return Standard_Floating_VecVecs.VecVec; - - -- DESCRIPTION : - -- Returns an array of normalized directions in n-space, - -- defined by the faces in the list f. - -- The array on return is of range 1..Length_Of(f). - - function Edge_Directions - ( n : natural; f : Array_of_Faces ) - return Standard_Floating_VecVecs.Array_of_VecVecs; - - -- DESCRIPTION : - -- Returns an array of normalized directions in n-space, - -- defined by the faces in the lists f. - -- The array on return has the same range as f. - - function Sort ( v : Standard_Floating_VecVecs.VecVec ) - return Standard_Natural_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the vector of indices to v that sorts the vectors - -- increasingly in lexicographical order. - -- The range of the vector on return is the same as the range of v. - - function Sort ( v : Standard_Floating_VecVecs.Array_of_VecVecs ) - return Standard_Natural_VecVecs.VecVec; - - -- DESCRIPTION : - -- Sorts all vectors in the components of v separately - -- and returns for each component the index vector that puts the - -- vectors in increasing lexicographic order. - -- The vector on return has the same range as v. - - procedure Merge_Sort - ( v,w : in Standard_Floating_VecVecs.VecVec; - sv,sw : in Standard_Natural_Vectors.Vector; - vnb,wnb : in natural; - snb,dst : out Standard_Natural_Vectors.Vector ); - - -- DESCRIPTION : - -- Applies merge sort to the directions in v and w. - - -- REQUIRED : - -- snb'range = dst'range = 1..v'length+w'length - - -- ON ENTRY : - -- v normalized direction vectors to edges of support vnb; - -- w normalized direction vectors to edges of support wnb; - -- sv labels to sort the directions in v lexicographically; - -- sw labels to sort the directions in w lexicographically; - -- vnb number of the support for the directions of v; - -- wnb number of the support for the directions of w. - - -- ON RETURN : - -- snb support labels to sort the directions, snb(i) is either - -- vnb or wnb: if i-th direction comes from v or w; - -- dst direction labels to sort, dst(i) is index to a direction - -- in v or w depending on what the corresponding snb(i) is. - - function Sum_of_Lengths - ( v : in Standard_Floating_VecVecs.Array_of_VecVecs ) - return natural; - - -- DESCRIPTION : - -- Returns the sum of all lengths of the vectors in v. - - procedure Merge_Sort - ( v : in Standard_Floating_VecVecs.Array_of_VecVecs; - sv : in Standard_Natural_VecVecs.VecVec; - snb,dst : out Standard_Natural_Vectors.Vector ); - - -- DESCRIPTION : - -- Applies merge sort to the directions in v. - - -- REQUIRED : - -- snb'range = dst'range = 1..Sum_of_Lengths(v). - - -- ON ENTRY : - -- v normalized direction vectors for a tuple of edges; - -- sv labels to sort the directions in each v lexicographically,. - -- obtained via the sort above, i.e: sv = Sort(v). - - -- ON RETURN : - -- snb sorted support numbers, snb(i) is in v'range, - -- indicating from which support the i-th direction comes; - -- dst labels to sort the directions, dst(i) is an index to - -- a direction in v(snb(i)). - -end Parallel_Edges; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/puiseux.gpr phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/puiseux.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/puiseux.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/puiseux.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,82 @@ +project puiseux is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Series", + "../../Math_Lib/Circuits", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../Dynlift", "../MixedVol", "../Symmetry", + "../../Components/Samplers", "../../Components/Interpolators", + "../../Components/Factorization", + "../../Components/Decomposition", + "../../Components/Solver", "../../Components/Tropical", + "../../CtoPHC/Types", "../../CtoPHC/Structures", + "../../CtoPHC/Funky", "../../CtoPHC/State", + "../../Tasking", "../../Main" + ); + for Languages use ("Ada"); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Series", + "../../Math_Lib/Circuits", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift", + "../Dynlift", "../MixedVol", "../Symmetry", + "../../Components/Samplers", "../../Components/Interpolators", + "../../Components/Factorization", + "../../Components/Decomposition", + "../../Components/Solver", "../../Components/Tropical", + "../../CtoPHC/Types", "../../CtoPHC/Structures", + "../../CtoPHC/Funky", "../../CtoPHC/State", + "../../Tasking", "../../Main" + ); + for Excluded_Source_Files use + ( + "double_double.c", "corecount.c", "corecountwindows.c", + "zero_index_tree.c", "index_tree_lp.c", "one_level_lp.c", + "relation_table.c", "prepare_for_mv.c", "mixed_volume.c", + "mv.c", "form_lp.c", "cell_stack.c" + ); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_puiseux.adb" -- tests the Newton-Puiseux algorithm + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end puiseux; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,17 +1,18 @@ -Puiseux series for curves in PHCv2.4.60 +Puiseux series for curves in PHCv2.4.85 -This directory was added to compute the degree of curves via a lifting -blending implicit lifting of Bernshtein with the lifting procedure to -compute mixed volumes. The basic functionality is a wrapper to MixedVol. +Code in this folder connects mixed-cell configurations induced by +integer valued lifting functions with the Newton-Puiseux algorithm +to compute multiple terms in a regular expansion. + +Run "gprbuild puiseux.gpr" to make all test programs. +On windows, type "gprbuild puiseux.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean puiseux.gpr" removes all files created by gprbuild. ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- -parallel_directions : auxiliary functions for parallel_edges -parallel_edges : looks for edges that are parallel -tropisms_of_curves : algorithms to compute tropisms -ts_degcurve : interactive test program -------------------------------------------------------------------------------- regular_solution_curves_series : operations for series of solution curves +regular_newton_puiseux : Newton-Puiseux for mixed cells ts_puiseux : development of Newton-Puiseux algorithm ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.adb phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Standard_Natural_Vectors; -with Standard_Natural_VecVecs; -with Standard_Integer_Vectors; -with Standard_Integer_Vectors_io; use Standard_Integer_Vectors_io; -with Standard_Integer_VecVecs; use Standard_Integer_VecVecs; -with Standard_Integer_VecVecs_io; use Standard_Integer_VecVecs_io; -with Standard_Floating_Vectors; -with Standard_Floating_Vectors_io; use Standard_Floating_Vectors_io; -with Standard_Floating_VecVecs; -with Parallel_Directions; -with Parallel_Edges; - -package body Tropisms_of_Supports is - - function Edges ( n : natural; s : Array_of_Lists ) return Array_of_Faces is - - res : Array_of_Faces(s'range); - - begin - for i in s'range loop - res(i) := Create(1,n,s(i)); - end loop; - return res; - end Edges; - - function Pivot ( v : Standard_Integer_Vectors.Vector ) return integer is - - -- DESCRIPTION : - -- Returns either v'last+1 if v is zero, or the first nonzero entry in v. - - begin - for i in v'range loop - if v(i) /= 0 - then return i; - end if; - end loop; - return v'last+1; - end Pivot; - - function Is_Parallel ( v1,v2 : Standard_Integer_Vectors.Vector ) - return boolean is - - -- DESCRIPTION : - -- Returns true if the two vectors v1 and v2 are parallel. - - d : integer; - p1 : constant integer := Pivot(v1); - p2 : constant integer := Pivot(v2); - - begin - if p1 /= p2 then - return false; - else - for i in p1+1..v1'last loop - d := v1(p1)*v2(i) - v2(p1)*v1(i); - if d /= 0 - then return false; - end if; - end loop; - return true; - end if; - end Is_Parallel; - - function Is_Parallel ( n : natural; f1,f2 : Face ) return boolean is - - -- DESCRIPTION : - -- Returns true if the two edges are parallel. - - v1,v2 : Standard_Integer_Vectors.Vector(1..n); - - begin - -- put_line("Checking faces "); - -- Standard_Integer_VecVecs_io.put(Standard_Integer_VecVecs.VecVec(f1.all)); - -- put_line(" and "); - -- Standard_Integer_VecVecs_io.put(Standard_Integer_VecVecs.VecVec(f2.all)); - for i in 1..n loop - v1(i) := f1(f1'first+1)(i) - f1(f1'first)(i); - v2(i) := f2(f2'first+1)(i) - f2(f2'first)(i); - end loop; - -- put(" v1 : "); put(v1); - -- put(" v2 : "); put(v2); new_line; - return Is_Parallel(v1,v2); - end Is_Parallel; - - procedure Show_Parallel_Edges - ( n : in natural; s : in Array_of_Lists; - e : in Array_of_Faces ) is - - e1,e2 : Faces; - f1,f2 : Face; - cnt : natural := 0; - - begin - for i in e'first..e'last-1 loop - put("#edges of support "); put(i,1); - put(" : "); put(Length_Of(e(i)),1); new_line; - e1 := e(i); - for ii in 1..Length_Of(e1) loop - f1 := Head_Of(e1); - for j in i+1..e'last loop - e2 := e(j); - for jj in 1..Length_Of(e2) loop - f2 := Head_Of(e2); - if Is_Parallel(n,f1,f2) then - put("edge "); put(ii,1); - put(" of support "); put(i,1); - put(" and edge "); put(jj,1); - put(" of support "); put(j,1); - put_line(" are parallel"); - cnt := cnt + 1; - end if; - e2 := Tail_Of(e2); - end loop; - end loop; - e1 := Tail_Of(e1); - end loop; - end loop; - put("found "); put(cnt,1); put_line(" parallel pairs ..."); - end Show_Parallel_Edges; - - procedure Sort_Parallel_Edges - ( n : in natural; s : in Array_of_Lists; - e : in Array_of_Faces ) is - - d : Standard_Floating_VecVecs.Array_of_VecVecs(e'range) - := Parallel_Edges.Edge_Directions(n,e); - sd : Standard_Natural_VecVecs.VecVec(d'range) := Parallel_Edges.Sort(d); - ind : natural; - sum : natural := Parallel_Edges.Sum_of_Lengths(d); - snb,dst : Standard_Natural_Vectors.Vector(1..sum); - v,w : Standard_Floating_Vectors.Link_to_Vector; - - begin - for i in d'range loop - put("sorted directions for support "); put(i,1); put_line(" :"); - for j in sd(i)'range loop - ind := sd(i)(j); - put(d(i)(ind).all,2); new_line; - end loop; - end loop; - Parallel_Edges.Merge_Sort(d,sd,snb,dst); - put_line("Sorted directions :"); - for i in 1..sum loop - put(d(snb(i))(dst(i)).all,2); new_line; - end loop; - put_line("Parallel directions :"); - for i in 2..sum loop - v := d(snb(i-1))(dst(i-1)); - w := d(snb(i))(dst(i)); - if Parallel_Directions.Equal(v,w) then - put("edge "); put(dst(i-1),1); - put(" of support "); put(snb(i-1),1); - put(" is parallel to edge "); put(dst(i),1); - put(" of support "); put(snb(i),1); new_line; - end if; - end loop; - end Sort_Parallel_Edges; - -end Tropisms_of_Supports; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.ads phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/tropisms_of_supports.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; -with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; - -package Tropisms_of_Supports is - --- DESCRIPTION : --- This package offers tools to compute tropisms for inputs --- given by supports. - - function Edges ( n : natural; s : Array_of_Lists ) return Array_of_Faces; - - -- DESCRIPTION : - -- The array on returns contains the edges of the supports s. - -- The ambient dimension of the supports equals n. - - procedure Show_Parallel_Edges - ( n : in natural; s : in Array_of_Lists; - e : in Array_of_Faces ); - - -- DESCRIPTION : - -- Enumerates all pairs of edges and writes to screen those - -- that are parallel to each other. - -- This is a first ineffecient algorithm. - - procedure Sort_Parallel_Edges - ( n : in natural; s : in Array_of_Lists; - e : in Array_of_Faces ); - - -- DESCRIPTION : - -- Computes parallel edges by sorting the direction vectors. - -end Tropisms_of_Supports; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/ts_degcurve.adb phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/ts_degcurve.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/ts_degcurve.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/ts_degcurve.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ -with text_io; use text_io; -with Standard_Natural_Numbers; use Standard_Natural_Numbers; -with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; -with Standard_Integer_Numbers; use Standard_Integer_Numbers; -with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; -with Standard_Complex_Vectors; -with Standard_Random_Vectors; -with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Arrays_of_Integer_Vector_Lists; use Arrays_of_Integer_Vector_Lists; -with Arrays_of_Integer_Vector_Lists_io; use Arrays_of_Integer_Vector_Lists_io; -with Supports_of_Polynomial_Systems; use Supports_of_Polynomial_Systems; -with Standard_Linear_Product_System; -with Black_Box_Solvers; -with Integer_Faces_of_Polytope; use Integer_Faces_of_Polytope; -with Tropisms_of_Supports; - -procedure ts_degcurve is - --- DESCRIPTION : --- Attempt to compute the degree of a curve via polyhedral methods. - - function Add_Hyperplane ( p : Poly_Sys ) return Poly_Sys is - - -- DESCRIPTION : - -- Adds a random hyperplane to the system p. - - res : Poly_Sys(p'first..p'last+1); - n : constant natural32 := Number_of_Unknowns(p(p'first)); - cff : constant Standard_Complex_Vectors.Vector(0..integer32(n)) - := Standard_Random_Vectors.Random_Vector(0,integer32(n)); - hyp : constant Poly := Standard_Linear_Product_System.Polynomial(cff); - - begin - res(p'range) := p; - res(res'last) := hyp; - return res; - end Add_Hyperplane; - - function Degree ( p : Poly_Sys) return natural32 is - - -- DESCRIPTION : - -- Returns the degree of the curve by solving the system - -- augmented with a random hyperplane. - - -- REQUIRED : p'last + 1 = number of variables. - - res : natural32; - ph : Poly_Sys(p'first..p'last+1) := Add_Hyperplane(p); - rc : natural32; - sols : Solution_List; - - begin - Black_Box_Solvers.Solve(ph,true,rc,sols); - res := Length_Of(sols); - Clear(sols); - Clear(ph(ph'last)); - return res; - end Degree; - - procedure Compute_Tropisms ( p : in Poly_Sys ) is - - n : constant natural32 := Number_of_Unknowns(p(p'first)); - s : Array_of_Lists(p'range) := Create(p); - e : Array_of_Faces(s'range); - - begin - put_line("The supports :"); put(s); - e := Tropisms_of_Supports.Edges(n,s); - Tropisms_of_Supports.Show_Parallel_Edges(n,s,e); - Tropisms_of_Supports.Sort_Parallel_Edges(n,s,e); - end Compute_Tropisms; - - procedure Main is - - lp : Link_to_Poly_Sys; - -- d : natural; - - begin - new_line; - -- put_line("Reading a system of n equations in n+1 unknowns ..."); - put_line("Reading a polynomial system ..."); - new_line; - get(lp); - put_line("Your system : "); put(lp.all); - -- d := Degree(lp.all); - -- put("Degree of the curve : "); put(d,1); new_line; - Compute_Tropisms(lp.all); - end Main; - -begin - Main; -end ts_degcurve; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Puiseux/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Puiseux/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,8 @@ +Thu 17 Jun 2021 : removed the obsolete parallel_edges, parallel_directions, + tropisms_of_supports, and ts_degcurve. Updated puiseux.gpr. + +Wed 16 Jun 2021 : added puiseux.gpr for the build of tests. + Fri 9 Nov 2018 : updated regular_solution_curves_series and regular_newton_puiseux.adb for the maximal degree bound on the series. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,9 @@ -Root Counting and Start Systems Library in PHCpack version 2.4.55 +Root Counting and Start Systems Library in PHCpack version 2.4.85 + +Run "gprbuild root_counts.gpr" to make all test programs. +On windows, type "gprbuild root_counts.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean root_counts.gpr" removes all files created by gprbuild. This library formed the main part of the first version of PHCpack. Modifications in version 2 were mainly due to the rewrite of the diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/root_counts.gpr phcpack-2.4.85/src/Ada/Root_Counts/root_counts.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/root_counts.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/root_counts.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,16 @@ +aggregate project root_counts is + + for Project_Files use + ( + "Product/product.gpr", -- linear-product start systems + "Binomials/binomials.gpr", -- binomial and simplicial systems + "Implift/implift.gpr", -- implicit lifting + "Stalift/stalift.gpr", -- static lifting + "Dynlift/dynlift.gpr", -- dynamic lifting + "Symmetry/symmetry.gpr", -- exploitation of symmetry relations + "MixedVol/mixedvol.gpr", -- translation of ACM TOMS Algorithm 846 + "DEMiCs/demics.gpr", -- interface to the DEMiCs program + "Puiseux/puiseux.gpr" -- Puiseux series for curves + ); + +end root_counts; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.adb phcpack-2.4.85/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,537 +0,0 @@ -with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; -with Standard_Mathematical_Functions; use Standard_Mathematical_Functions; -with Standard_Natural_Vectors; -with Standard_Complex_Norms_Equals; use Standard_Complex_Norms_Equals; -with Standard_Floating_VecVecs_io; use Standard_Floating_VecVecs_io; -with Standard_Complex_Matrices; use Standard_Complex_Matrices; -with Standard_Complex_Linear_Solvers; use Standard_Complex_Linear_Solvers; -with Arrays_of_Integer_Vector_Lists; -with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; -with Standard_Complex_Laur_Functions; use Standard_Complex_Laur_Functions; -with Standard_Poly_Laur_Convertors; use Standard_Poly_Laur_Convertors; -with Supports_of_Polynomial_Systems; -with Standard_Sparse_Solvers; -with Floating_Lifting_Utilities; -with Floating_Mixed_Subdivisions_io; use Floating_Mixed_Subdivisions_io; -with Floating_integer_Convertors; -with Mixed_Volume_Computation; use Mixed_Volume_Computation; -with Random_Coefficient_Systems; -with Polyhedral_Coefficient_Homotopies; use Polyhedral_Coefficient_Homotopies; - -package body Polyhedral_Coefficient_Tracking is - - procedure Silent_Newton_Step - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y : out double_float ) is - - jm : Matrix(y'range,x'range); - nrm : double_float; - ipvt : Standard_Natural_Vectors.Vector(x'range); - info : natural; - - begin - for i in jm'range(1) loop - for j in jm'range(2) loop - jm(i,j) := Eval(jacmat(i,j),mulfac(i,j).all,ctm(i).all,x); - end loop; - end loop; - lufac(jm,x'last,ipvt,info); - Standard_Complex_Vectors.Min(y); - lusolve(jm,x'last,ipvt,y); - nrm := Max_Norm(y); norm_dx := nrm; - Standard_Complex_Vectors.Add(x,y); - y := Eval(hq,ctm,x); - nrm := Max_Norm(y); norm_y := nrm; - end Silent_Newton_Step; - - procedure Silent_Newton_Step - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y,rcond : out double_float ) is - - jm : Matrix(y'range,x'range); - nrm : double_float; - ipvt : Standard_Natural_Vectors.Vector(x'range); - - begin - for i in jm'range(1) loop - for j in jm'range(2) loop - jm(i,j) := Eval(jacmat(i,j),mulfac(i,j).all,ctm(i).all,x); - end loop; - end loop; - lufco(jm,x'last,ipvt,rcond); - Standard_Complex_Vectors.Min(y); - lusolve(jm,x'last,ipvt,y); - nrm := Max_Norm(y); norm_dx := nrm; - Standard_Complex_Vectors.Add(x,y); - y := Eval(hq,ctm,x); - nrm := Max_Norm(y); norm_y := nrm; - end Silent_Newton_Step; - - procedure Reporting_Newton_Step - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y : out double_float ) is - - jm : Matrix(y'range,x'range); - nrm : double_float; - ipvt : Standard_Natural_Vectors.Vector(x'range); - info : natural; - - begin - for i in jm'range(1) loop - for j in jm'range(2) loop - jm(i,j) := Eval(jacmat(i,j),mulfac(i,j).all,ctm(i).all,x); - end loop; - end loop; - lufac(jm,x'last,ipvt,info); - Standard_Complex_Vectors.Min(y); - lusolve(jm,x'last,ipvt,y); - nrm := Max_Norm(y); norm_dx := nrm; - put(file," |dx| ="); put(file,nrm,2); - Standard_Complex_Vectors.Add(x,y); - y := Eval(hq,ctm,x); - nrm := Max_Norm(y); norm_y := nrm; - put(file," |f(x)| ="); put(file,nrm,2); - end Reporting_Newton_Step; - - procedure Reporting_Newton_Step - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y,rcond : out double_float ) is - - jm : Matrix(y'range,x'range); - nrm : double_float; - ipvt : Standard_Natural_Vectors.Vector(x'range); - - begin - for i in jm'range(1) loop - for j in jm'range(2) loop - jm(i,j) := Eval(jacmat(i,j),mulfac(i,j).all,ctm(i).all,x); - end loop; - end loop; - lufco(jm,x'last,ipvt,rcond); - Standard_Complex_Vectors.Min(y); - lusolve(jm,x'last,ipvt,y); - nrm := Max_Norm(y); norm_dx := nrm; - put(file," |dx| ="); put(file,nrm,2); - Standard_Complex_Vectors.Add(x,y); - y := Eval(hq,ctm,x); - nrm := Max_Norm(y); norm_y := nrm; - put(file," |f(x)| ="); put(file,nrm,2); - end Reporting_Newton_Step; - - procedure Silent_Apply_Newton - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - tol : in double_float; max : in natural; - x,y : in out Standard_Complex_Vectors.Vector; - nit : out natural; fail : out boolean ) is - - prev_ndx,prev_ny,new_ndx,new_ny : double_float; - - begin - nit := 1; - Silent_Newton_Step(hq,ctm,jacmat,mulfac,x,y,prev_ndx,prev_ny); - fail := (prev_ndx > tol) and (prev_ny > tol); - while nit < max loop - nit := nit + 1; - Silent_Newton_Step(hq,ctm,jacmat,mulfac,x,y,new_ndx,new_ny); - exit when (new_ndx > prev_ndx) or (new_ny > prev_ny); -- divergence - fail := (new_ndx > tol) and (new_ny > tol); - exit when not fail; - prev_ndx := new_ndx; prev_ny := new_ny; - end loop; - end Silent_Apply_Newton; - - procedure Reporting_Apply_Newton - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - tol : in double_float; max : in natural; - x,y : in out Standard_Complex_Vectors.Vector; - nit : out natural; fail : out boolean ) is - - prev_ndx,prev_ny,new_ndx,new_ny : double_float; - - begin - nit := 1; - put(file,nit,3); put(file," :"); - Reporting_Newton_Step(file,hq,ctm,jacmat,mulfac,x,y,prev_ndx,prev_ny); - new_line(file); - fail := (prev_ndx > tol) and (prev_ny > tol); - while nit < max loop - nit := nit + 1; - put(file,nit,3); put(file," :"); - Reporting_Newton_Step(file,hq,ctm,jacmat,mulfac,x,y,new_ndx,new_ny); - exit when (new_ndx > prev_ndx) or (new_ny > prev_ny); -- divergence - fail := (new_ndx > tol) and (new_ny > tol); - exit when not fail; - prev_ndx := new_ndx; prev_ny := new_ny; - exit when (nit = max); - new_line(file); - end loop; - if fail - then put_line(file," failure"); - else put_line(file," success"); - end if; - end Reporting_Apply_Newton; - - procedure Silent_Track_One_Path - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - pow : in Standard_Floating_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - sol : in out Solution; - nsteps : out natural; fail : out boolean ) is - - y : Standard_Complex_Vectors.Vector(hq'range); - tol : constant double_float := 1.0E-12; - max : constant natural := 4; - nit : natural; - nwt_fail : boolean; - s,t,ds,nrm_dx,nrm_y,rcond : double_float; - backup : Standard_Complex_Vectors.Vector(sol.v'range); - step : natural := 0; - max_steps : constant natural := 500; - - begin - s := -5.0; - ds := 0.1; - backup := sol.v; - loop - step := step + 1; - exit when (step > max_steps); - s := s + ds; - if s > 0.0 - then ds := s - ds; -- old value for s - s := 0.0; - ds := abs(ds); -- do not overshoot again - end if; - t := exp(s); - Eval(coeffv,t,pow,ctm); - y := Eval(hq,ctm,sol.v); - Silent_Apply_Newton - (hq,ctm,jacmat,mulfac,tol,max,sol.v,y,nit,nwt_fail); - if not nwt_fail then - if (ds < 0.1) and (ds < -s) - then ds := 2.0*ds; - end if; - backup := sol.v; - else - s := s - ds; - ds := ds/2.0; - sol.v := backup; - end if; - exit when (s = 0.0) and (not nwt_fail); - end loop; - fail := (step > max_steps); - nsteps := step; - Silent_Newton_Step(hq,ctm,jacmat,mulfac,sol.v,y,nrm_dx,nrm_y,rcond); - sol.err := nrm_dx; sol.rco := rcond; sol.res := nrm_y; - end Silent_Track_One_Path; - - procedure Reporting_Track_One_Path - ( file : in file_type; - hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - pow : in Standard_Floating_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - sol : in out Solution; - nsteps : out natural; fail : out boolean ) is - - y : Standard_Complex_Vectors.Vector(hq'range); - nrm : double_float; - tol : constant double_float := 1.0E-12; - max : constant natural := 4; - nit : natural; - nwt_fail : boolean; - s,t,ds,nrm_dx,nrm_y,rcond : double_float; - backup : Standard_Complex_Vectors.Vector(sol.v'range); - step : natural := 0; - max_steps : constant natural := 500; - - begin - Eval(coeffv,EXP(-10.0),pow,ctm); - y := Eval(hq,ctm,sol.v); - nrm := Max_Norm(y); - put(file,"Residual at the start for t = exp(-10) : "); - put(file,nrm); new_line(file); - s := -5.0; - ds := 0.1; - backup := sol.v; - loop - step := step + 1; - exit when (step > max_steps); - s := s + ds; - if s > 0.0 - then ds := s - ds; -- old value for s - s := 0.0; - ds := abs(ds); -- do not overshoot again - end if; - put(file,"step "); put(file,step,1); put(file," at s ="); - put(file,s,3); put(file," with ds ="); put(file,ds,3); - put_line(file," :"); - t := exp(s); - Eval(coeffv,t,pow,ctm); - y := Eval(hq,ctm,sol.v); - Reporting_Apply_Newton - (file,hq,ctm,jacmat,mulfac,tol,max,sol.v,y,nit,nwt_fail); - if not nwt_fail then - if (ds < 0.1) and (ds < -s) - then ds := 2.0*ds; - end if; - backup := sol.v; - else - s := s - ds; - ds := ds/2.0; - sol.v := backup; - end if; - exit when (s = 0.0) and (not nwt_fail); - end loop; - put(file,"end :"); - Reporting_Newton_Step - (file,hq,ctm,jacmat,mulfac,sol.v,y,nrm_dx,nrm_y,rcond); - new_line(file); - sol.err := nrm_dx; sol.rco := rcond; sol.res := nrm_y; - if step > max_steps - then fail := true; - else fail := false; - end if; - nsteps := step; - end Reporting_Track_One_Path; - - procedure Track_Paths_for_Cell - ( file : in file_type; lq : in Laur_Sys; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - ind : in natural; mic: in Mixed_Cell; - qsols,last : in out Solution_List ) is - - q : Laur_Sys(lq'range) - := Supports_of_Polynomial_Systems.Select_Terms(lq,mix,mic.pts.all); - tol_zero : constant double_float := 1.0E-12; - fail,zero_y : boolean; - pow : Standard_Floating_VecVecs.VecVec(coeffv'range) - := Power_Transform(expvec,ls,mix,mic.nor.all); - scapow : Standard_Floating_VecVecs.VecVec(coeffv'range) := Scale(pow); - sols,tmp : Solution_list; - sol : Link_to_Solution; - nsteps : natural; - - begin - Standard_Sparse_Solvers.Solve(q,tol_zero,sols,fail,zero_y); - put(file,"Mixed cell "); put(file,ind,1); put(file," leads to "); - put(file,Length_Of(sols),1); - put_line(file," start solutions."); - tmp := sols; - while not Is_Null(tmp) loop - sol := Head_Of(tmp); - -- Reporting_Track_One_Path - -- (file,hq,ctm,scapow,coeffv,jacmat,mulfac,sol.all,nsteps,fail); - Silent_Track_One_Path - (hq,ctm,scapow,coeffv,jacmat,mulfac,sol.all,nsteps,fail); - put(file,"#steps : "); put(file,nsteps,3); - put(file," |dx| ="); put(file,sol.err,2); - put(file," rco ="); put(file,sol.rco,3); - put(file," |f(x)| ="); put(file,sol.res,2); - if fail - then put_line(file," diverged "); - else put_line(file," converged"); - end if; - Append(qsols,last,sol.all); - tmp := Tail_Of(tmp); - end loop; - Standard_Floating_VecVecs.Clear(pow); - Standard_Floating_VecVecs.Clear(scapow); - end Track_Paths_for_Cell; - - procedure Track_Paths_for_Subdivision - ( file : in file_type; lq : in Laur_Sys; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - sub : in Mixed_Subdivision; qsols : out Solution_List ) is - - tmp : Mixed_Subdivision := sub; - mic : Mixed_Cell; - ctm : Standard_Complex_VecVecs.VecVec(coeffv'range); - cnt : natural := 0; - last : Solution_List := qsols; - - begin - for i in coeffv'range loop - ctm(i) := new Standard_Complex_Vectors.Vector' - (coeffv(i).all'range => Create(0)); - end loop; - while not Is_Null(tmp) loop - mic := Head_Of(tmp); - cnt := cnt + 1; - Track_Paths_for_Cell - (file,lq,ls,hq,ctm,coeffv,expvec,jacmat,mulfac,mix,cnt,mic, - qsols,last); - tmp := Tail_Of(tmp); - end loop; - Standard_Complex_VecVecs.Clear(ctm); - end Track_Paths_for_Subdivision; - - procedure Track_Paths_for_Subdivision - ( infile,outfile : in file_type; m : in natural; - lq : in Laur_Sys; - vs : in Standard_Floating_VecVecs.Array_of_VecVecs; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - qsols : out Solution_List ) is - - mlb : Mixed_Labels; - mic : Mixed_Cell; - ctm : Standard_Complex_VecVecs.VecVec(coeffv'range); - cnt : natural := 0; - last : Solution_List := qsols; - fail : boolean; - - begin - for i in coeffv'range loop - ctm(i) := new Standard_Complex_Vectors.Vector' - (coeffv(i).all'range => Create(0)); - end loop; - while cnt < m loop - cnt := cnt + 1; - Read_Next(infile,lq'last,mix'last,cnt,mlb,fail); - if fail then - put("Failed to read cell "); put(cnt,1); put_line("..."); - else - mic := Create_Coordinates(vs,mlb); - Track_Paths_for_Cell - (outfile,lq,ls,hq,ctm,coeffv,expvec,jacmat,mulfac,mix,cnt,mic, - qsols,last); - Deep_Clear(mic); - end if; - Clear(mlb); - end loop; - Standard_Complex_VecVecs.Clear(ctm); - exception - when others - => put("Exception raised when processing cell "); put(cnt,1); - new_line; return; - end Track_Paths_for_Subdivision; - - procedure Polyhedral_Continuation - ( file : in file_type; n : in natural; p : in Poly_Sys; - mix : in Standard_Integer_Vectors.Vector; - sub : in Mixed_Subdivision; - q : out Poly_Sys; qsols : out Solution_List ) is - - s : Arrays_of_Integer_Vector_Lists.Array_of_Lists(p'range) - := Supports_of_Polynomial_Systems.Create(p); - fs : Arrays_of_Floating_Vector_Lists.Array_of_Lists(s'range) - := Floating_Integer_Convertors.Convert(s); - ls : Arrays_of_Floating_Vector_Lists.Array_of_Lists(mix'range) - := Floating_Lifting_Utilities.Occurred_Lifting(p'last,mix,fs,sub); - lq : Laur_Sys(1..n); - hq : Eval_Coeff_Laur_Sys(1..n); - expvec : Exponent_Vectors_Array(1..n); - coeffv : Standard_Complex_VecVecs.VecVec(1..n); - jacmat : Eval_Coeff_Jaco_Mat(q'range,q'first..q'last+1); - mulfac : Mult_Factors(jacmat'range(1),jacmat'range(2)); - - begin - q := Random_Coefficient_Systems.Create(n,mix,ls); - put_line(file,q); - new_line(file); - put_line(file,"TITLE : a random coefficient system"); - new_line(file); - lq := Polynomial_to_Laurent_System(q); - hq := Create(lq); - expvec := Create(q); - for i in q'range loop - declare - c : constant Standard_Complex_Vectors.Vector := Coeff(lq(i)); - begin - coeffv(i) := new Standard_Complex_Vectors.Vector(c'range); - for j in c'range loop - coeffv(i)(j) := c(j); - end loop; - end; - end loop; - Create(lq,jacmat,mulfac); - -- Mixed_Solve(file,lq,ls,hq,coeffv,expvec,jacmat,mulfac,mix,sub,qsols); - Track_Paths_for_Subdivision - (file,lq,ls,hq,coeffv,expvec,jacmat,mulfac,mix,sub,qsols); - end Polyhedral_Continuation; - - procedure Polyhedral_Continuation - ( infile,outfile : in file_type; - n : in natural; p : in Poly_Sys; - mix : in Standard_Integer_Vectors.Vector; - q : out Poly_Sys; qsols : out Solution_List ) is - - vs : Standard_Floating_VecVecs.Array_of_VecVecs(mix'range); - ls : Arrays_of_Floating_Vector_Lists.Array_of_Lists(mix'range); - m : natural; - lq : Laur_Sys(1..n); - hq : Eval_Coeff_Laur_Sys(1..n); - expvec : Exponent_Vectors_Array(1..n); - coeffv : Standard_Complex_VecVecs.VecVec(1..n); - jacmat : Eval_Coeff_Jaco_Mat(q'range,q'first..q'last+1); - mulfac : Mult_Factors(jacmat'range(1),jacmat'range(2)); - fail : boolean; - - begin - Read_Lifted_Supports(infile,n,mix'last,vs,fail); - if fail then - put_line("Failed to read the lifted supports."); - else - ls := Arrays_of_Floating_Vector_Lists.Shallow_Create(vs); - q := Random_Coefficient_Systems.Create(n,mix,ls); - put_line(outfile,q); - new_line(outfile); - put_line(outfile,"TITLE : a random coefficient system"); - new_line(outfile); - lq := Polynomial_to_Laurent_System(q); - hq := Create(lq); - expvec := Create(q); - for i in q'range loop - declare - c : constant Standard_Complex_Vectors.Vector := Coeff(lq(i)); - begin - coeffv(i) := new Standard_Complex_Vectors.Vector(c'range); - for j in c'range loop - coeffv(i)(j) := c(j); - end loop; - end; - end loop; - Create(lq,jacmat,mulfac); - get(infile,m); - put("ready to process "); put(m,1); put_line(" mixed cells..."); - Track_Paths_for_Subdivision - (infile,outfile,m,lq,vs,ls,hq,coeffv,expvec,jacmat,mulfac,mix,qsols); - end if; - end Polyhedral_Continuation; - -end Polyhedral_Coefficient_Tracking; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.ads phcpack-2.4.85/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.ads --- phcpack-2.4.84/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Stalift/polyhedral_coefficient_tracking.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,291 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Integer_Vectors; -with Standard_Floating_Vectors; -with Standard_Complex_Vectors; -with Standard_Floating_VecVecs; -with Standard_Complex_VecVecs; -with Arrays_of_Floating_Vector_Lists; -with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; -with Standard_Complex_Laur_Systems; use Standard_Complex_Laur_Systems; -with Standard_Complex_Laur_SysFun; use Standard_Complex_Laur_SysFun; -with Standard_Complex_Laur_Jacomats; use Standard_Complex_Laur_Jacomats; -with Standard_Complex_Solutions; use Standard_Complex_Solutions; -with Exponent_Vectors; use Exponent_Vectors; -with Floating_Mixed_Subdivisions; use Floating_Mixed_Subdivisions; - -package Polyhedral_Coefficient_Tracking is - --- DESCRIPTION : --- In a polyhedral coefficient homotopy, the coefficients are random --- complex numbers multiplied with some (possibly) high powers of the --- continuation parameter. To deal with the numerical instabilities --- caused by these high powers, an exponentional transformation of --- on the continuation parameter is applied in the path trackers --- provided by this package. - - procedure Silent_Newton_Step - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y : out double_float ); - - procedure Silent_Newton_Step - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y,rcond : out double_float ); - - procedure Reporting_Newton_Step - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y : out double_float ); - - procedure Reporting_Newton_Step - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - x,y : in out Standard_Complex_Vectors.Vector; - norm_dx,norm_y,rcond : out double_float ); - - -- DESCRIPTION : - -- Applies one Newton step for a fixed value of the continuation - -- parameter, so the coefficients ctm are fixed as well. - - -- ON ENTRY : - -- file for printing norm of increment vector and residual; - -- hq evaluable form of coefficient Laurent system; - -- ctm coefficients for fixed value of continuation parameter - -- jacmat coefficient Jacobian matrix; - -- mulfac multiplication factors for Jacobian matrix; - -- x current approximation for the solution; - -- y solution evaluated at x. - - -- ON RETURN : - -- x updated solution vector; - -- y system evaluated at the new x; - -- norm_dx norm of the increment added to x; - -- norm_y norm of the vector y; - -- rcond estimate for the inverse of the condition number. - - procedure Silent_Apply_Newton - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - tol : in double_float; max : in natural; - x,y : in out Standard_Complex_Vectors.Vector; - nit : out natural; fail : out boolean ); - - procedure Reporting_Apply_Newton - ( file : in file_type; hq : in Eval_Coeff_Laur_Sys; - ctm : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - tol : in double_float; max : in natural; - x,y : in out Standard_Complex_Vectors.Vector; - nit : out natural; fail : out boolean ); - - -- DESCRIPTION : - -- Applies Newton's method until the tolerance is reached, - -- or until the maximul number allowed steps is exhausted, - -- in which case failure is reported. - - -- ON ENTRY : - -- file for intermediate output; - -- hq evaluable form of coefficient Laurent system; - -- ctm coefficients for fixed value of continuation parameter - -- jacmat coefficient Jacobian matrix; - -- mulfac multiplication factors for Jacobian matrix; - -- tol the iteration stops if the increment vector or - -- the residual is smaller in norm than tol; - -- max maximal number of iterations allowed to reach - -- the desired accuracy; - -- x current approximation for the solution; - -- y solution evaluated at x. - - -- ON RETURN : - -- x updated solution vector; - -- y system evaluated at the new x. - -- nit number of iterations performed; - -- fail true if the required accuracy was not reached - -- within max Newton steps, false otherwise. - - procedure Silent_Track_One_Path - ( hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - pow : in Standard_Floating_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - sol : in out Solution; - nsteps : out natural; fail : out boolean ); - - procedure Reporting_Track_One_Path - ( file : in file_type; - hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - pow : in Standard_Floating_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - sol : in out Solution; - nsteps : out natural; fail : out boolean ); - - -- DESCRIPTION : - -- Tracks one path, starting at one solution "sol" of start system - -- corresponding to a mixed cell with inner normal given in "nor". - - -- ON ENTRY : - -- file to write all kinds of diagnostics of the path; - -- hq evaluable form of coefficient Laurent system; - -- ctm work space to hold coefficient for fixed value - -- of the continuation parameter; - -- pow powers of the continuation parameter in the homotopy - -- defined by one mixed cell; - -- coeffv coefficients in the polyhedral coefficient homotopy; - -- jacmat coefficient Jacobian matrix; - -- mulfac multiplication factors for Jacobian matrix; - -- sol one start solution. - - -- ON RETURN : - -- sol solution at the end of the path, if not fail; - -- nsteps number of steps done in the path tracking; - -- fail true if path failed to converged in the allowed #steps. - - procedure Track_Paths_for_Cell - ( file : in file_type; lq : in Laur_Sys; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - ctm : in out Standard_Complex_VecVecs.VecVec; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - ind : in natural; mic : in Mixed_Cell; - qsols,last : in out Solution_List ); - - -- DESCRIPTION : - -- Tracks the paths using the polyhedral homotopies defined by one - -- mixed cell, appending to the list of solutions. - - -- ON ENTRY : - -- file for writing diagnostics; - -- lq random coefficient start system; - -- ctm work space for the coefficients of the system; - - -- ON RETURN : - -- ctm modified work space; - -- qsols updated solution list; - -- last pointer to the last element in qsols. - - procedure Track_Paths_for_Subdivision - ( file : in file_type; lq : in Laur_Sys; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - sub : in Mixed_Subdivision; qsols : out Solution_List ); - - -- DESCRIPTION : - -- Tracks the paths using the polyhedral homotopies defined by the - -- mixed cells in the subdivision. - - -- ON ENTRY : - -- file for intermediate output; - -- lq a random coefficient Laurent polynomial system; - -- ls lifted supports of the polynomial system lq; - - -- ON RETURN : - -- qsols solutions to the system lq. - - procedure Track_Paths_for_Subdivision - ( infile,outfile : in file_type; m : in natural; - lq : in Laur_Sys; - vs : in Standard_Floating_VecVecs.Array_of_VecVecs; - ls : in Arrays_of_Floating_Vector_Lists.Array_of_Lists; - hq : in Eval_Coeff_Laur_Sys; - coeffv : in Standard_Complex_VecVecs.VecVec; - expvec : in Exponent_Vectors_Array; - jacmat : in Eval_Coeff_Jaco_Mat; mulfac : in Mult_Factors; - mix : in Standard_Integer_Vectors.Vector; - qsols : out Solution_List ); - - -- DESCRIPTION : - -- Tracks the paths using the polyhedral homotopies defined by the - -- mixed cells on the input file. - - -- REQUIRED : - -- The current position at the input file must be at the beginning - -- of a mixed cell. - - -- ON ENTRY : - -- infile input file with a regular mixed-cell configuration, - -- properly positioned at the beginning of a mixed cell; - -- outfile output file for intermediate results; - -- m total number of mixed cells on the input file; - -- lq a random coefficient Laurent polynomial system; - -- vs lifted supports of the polynomial system lq; - -- ls lifted supports of the polynomial system lq; - -- hq polyhedral coefficient homotopy; - - -- ON RETURN : - -- qsols solutions to the system lq. - - procedure Polyhedral_Continuation - ( file : in file_type; n : in natural; p : in Poly_Sys; - mix : in Standard_Integer_Vectors.Vector; - sub : in Mixed_Subdivision; - q : out Poly_Sys; qsols : out Solution_List ); - - -- DESCRIPTION : - -- Creates a random coefficient system with the vertices used in the - -- mixed-cell configuration, constructs a polyhedral homotopy, and - -- then calls the path trackers to solve the random coefficient system. - - -- ON ENTRY : - -- file output file for intermediate results and diagnostics; - -- n ambient dimension before the lifting; - -- p polynomial system for which a random coefficient - -- start system will be constructed; - -- mix type of mixture read from infile counts the number - -- of occurrences of each support in the subdivision. - - -- ON RETURN : - -- q a random coefficient start system to solve p; - -- qsols solutions of q. - - procedure Polyhedral_Continuation - ( infile,outfile : in file_type; - n : in natural; p : in Poly_Sys; - mix : in Standard_Integer_Vectors.Vector; - q : out Poly_Sys; qsols : out Solution_List ); - - -- DESCRIPTION : - -- Creates a random coefficient system with the vertices used in the - -- mixed-cell configuration, constructs a polyhedral homotopy, and - -- then calls the path trackers to solve the random coefficient system. - -- This jumpstarting version does not require for all mixed cells - -- to be in the internal memory at the same time. - - -- REQUIRED : - -- The regular mixed-cell configuration on the input file is in - -- its labeled presentation, with the lifted sets in front. - - -- ON ENTRY : - -- infile input file with a regular mixed-cell configuration, - -- positioned at the start of the lifted support sets; - -- outfile output file for intermediate results and diagnostics; - -- n ambient dimension before the lifting; - -- p polynomial system for which a random coefficient - -- start system will be constructed; - -- mix type of mixture read from infile counts the number - -- of occurrences of each support in the subdivision. - - -- ON RETURN : - -- q a random coefficient start system to solve p; - -- qsols solutions of q. - -end Polyhedral_Coefficient_Tracking; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Stalift/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Stalift/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Stalift/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Stalift/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,95 +1,99 @@ -Static lifting for mixed volumes and polyhedral continuation in PHCv2.4.82 - -In release 2.3, one file had to be changed for the optimizer in Mac OS X -and default options were set to floating-point point-wise lifting. -Release 2.3.16 has new facilities to jumpstart the polyhedral homotopies, -along with an exponential continuation parameter. -The direct input of Laurent systems led to changes in release 2.3.26. -Support for stable mixed volumes was added in release 2.3.31. -In release 2.3.90, versions of polyhedral homotopies in double double -and quad double precision were provided. - -The algorithm used is based on the construction of a mixed subdivision, -based on Betke's formula for mixed volumes and the polyhedral homotopy -continuation methods developed by Huber and Sturmfels. - -This library features integer-valued and floating-point lifting functions. -The implementation of integer static lifting typically induces nested -subdivisions, with non-fine cells recursively refined by subdivisions. - -In version 2.4.06, the application of heterogeneous multitasking -makes that the MixedVol algorithm runs in parallel with the polyhedral -path trackers to solve a random coefficient system. - -There are four parts in this library: - -1. Integer-valued lifting, mixed subdivisions and polyhedral continuation -2. Floating-point lifting, mixed subdivisions and polyhedral continuation -3. Influence of points to mixed volume: a simple criterion -4. Driver packages - -------------------------------------------------------------------------------- -file name : short description -------------------------------------------------------------------------------- -random_coefficient_systems : create random systems with given supports -test_rndcff_systems : tests the making of random systems -ts_rndcff : calls the main test on random systems -integer_mixed_subdivisions : mixed subdivisions with integer lifting -integer_mixed_subdivisions_io : input/output of mixed subdivisions -integer_lifting_functions : lifting supports with integer values -integer_lifting_utilities : utilities for integer lifting functions -integer_pruning_methods : pruning methods for integer subdivisions -integer_polyhedral_continuation : polyhedral continuation by integer lifting -mixed_volume_computation : functions to compute mixed volumes -ts_mixvol : mixed volume of supports -bkk_bound_computations : black-box mixed volumes and solvers -main_lifting_functions : determines lifting based on user input -ts_userlift : test user defined integer lifting -------------------------------------------------------------------------------- -floating_integer_convertors : convertors integer<->floating data -floating_mixed_subdivisions : mixed subdivisions with floating lifting -floating_mixed_subdivisions_io : input/output of mixed subdivisions -floating_lifting_functions : lifting supports with floating values -floating_lifting_utilities : utilities for floating lifting functions -induced_permutations : deal with permuted supports -floating_pruning_methods : pruning methods for floating subdivisions -floating_polyhedral_continuation : polyhedral continuation by floating lifting -dobldobl_polyhedral_continuation : versions for double double coefficients -quaddobl_polyhedral_continuation : versions for quad double coefficients -stable_polyhedral_continuation : to compute solutions with zero components -test_stable_mixed_volumes : test on stable mixed volumes -ts_stable : calls the test on stable mixed volumes -------------------------------------------------------------------------------- -inner_normal_cones : representations of cones of inner normals -normal_cone_intersections : taking intersections of normal cones -contributions_to_mixed_volume : contributions of points to mixed volume -------------------------------------------------------------------------------- -drivers_for_mixed_contributions : application of the contribution checks -driver_for_criterion : driver for the criterion -ts_drivcrit : calls the menu-driver for the criterion -driver_for_lifting_functions : menu-driver for selecting lifting function -pruning_statistics : writes pruning statistics -drivers_for_static_lifting : menu-driver for static lifting -ts_drivstal : calls the driver for static lifting -drivers_for_mixedvol_algorithm : drivers to the MixedVol Algorithm -ts_mvasta : calls the MixedVol algorithm -drivers_for_demics_algorithm : drivers to the DEMiCs Algorithm -ts_demics : calls the DEMiCs Algorithm -------------------------------------------------------------------------------- -ts_mixlab : coordinate/labeled subdivision convertors -ts_jpmix : template to prepare jumpstarting -polyhedral_coefficient_homotopies : for efficient evaluation of the homotopies -polyhedral_coefficient_parameters : default values of numerical tolerances -polyhedral_coefficient_predictors : step control and predictors -polyhedral_coefficient_correctors : correctors for polyhedral homotopies -polyhedral_coefficient_tracking : path tracking with coefficient homotopies -jumpstart_polyhedral_homotopies : drivers to jumpstart polyhedral trackers -ts_exptrack : test exponential continuation parameters -------------------------------------------------------------------------------- -lifted_configurations : for balancing the lifting values -test_balance_lifting : development of balancing lifting values -ts_balance : calls the main test on balancing -------------------------------------------------------------------------------- - -Subdivisions induced by integer lifting functions have to be recursive, -since one cannot guarantee that all cells will be fine mixed. +Static lifting for mixed volumes and polyhedral continuation in PHCv2.4.85 + +In release 2.3, one file had to be changed for the optimizer in Mac OS X +and default options were set to floating-point point-wise lifting. +Release 2.3.16 has new facilities to jumpstart the polyhedral homotopies, +along with an exponential continuation parameter. +The direct input of Laurent systems led to changes in release 2.3.26. +Support for stable mixed volumes was added in release 2.3.31. +In release 2.3.90, versions of polyhedral homotopies in double double +and quad double precision were provided. + +The algorithm used is based on the construction of a mixed subdivision, +based on Betke's formula for mixed volumes and the polyhedral homotopy +continuation methods developed by Huber and Sturmfels. + +This library features integer-valued and floating-point lifting functions. +The implementation of integer static lifting typically induces nested +subdivisions, with non-fine cells recursively refined by subdivisions. + +In version 2.4.06, the application of heterogeneous multitasking +makes that the MixedVol algorithm runs in parallel with the polyhedral +path trackers to solve a random coefficient system. + +There are four parts in this library: + +1. Integer-valued lifting, mixed subdivisions and polyhedral continuation +2. Floating-point lifting, mixed subdivisions and polyhedral continuation +3. Influence of points to mixed volume: a simple criterion +4. Driver packages + +Run "gprbuild stalift.gpr" to make all test programs. +On windows, type "gprbuild stalift.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean stalift.gpr" removes all files created by gprbuild. + +------------------------------------------------------------------------------- +file name : short description +------------------------------------------------------------------------------- +random_coefficient_systems : create random systems with given supports +test_rndcff_systems : tests the making of random systems +ts_rndcff : calls the main test on random systems +integer_mixed_subdivisions : mixed subdivisions with integer lifting +integer_mixed_subdivisions_io : input/output of mixed subdivisions +integer_lifting_functions : lifting supports with integer values +integer_lifting_utilities : utilities for integer lifting functions +integer_pruning_methods : pruning methods for integer subdivisions +integer_polyhedral_continuation : polyhedral continuation by integer lifting +mixed_volume_computation : functions to compute mixed volumes +ts_mixvol : mixed volume of supports +bkk_bound_computations : black-box mixed volumes and solvers +main_lifting_functions : determines lifting based on user input +ts_userlift : test user defined integer lifting +------------------------------------------------------------------------------- +floating_integer_convertors : convertors integer<->floating data +floating_mixed_subdivisions : mixed subdivisions with floating lifting +floating_mixed_subdivisions_io : input/output of mixed subdivisions +floating_lifting_functions : lifting supports with floating values +floating_lifting_utilities : utilities for floating lifting functions +induced_permutations : deal with permuted supports +floating_pruning_methods : pruning methods for floating subdivisions +floating_polyhedral_continuation : polyhedral continuation by floating lifting +dobldobl_polyhedral_continuation : versions for double double coefficients +quaddobl_polyhedral_continuation : versions for quad double coefficients +stable_polyhedral_continuation : to compute solutions with zero components +test_stable_mixed_volumes : test on stable mixed volumes +ts_stable : calls the test on stable mixed volumes +------------------------------------------------------------------------------- +inner_normal_cones : representations of cones of inner normals +normal_cone_intersections : taking intersections of normal cones +contributions_to_mixed_volume : contributions of points to mixed volume +------------------------------------------------------------------------------- +drivers_for_mixed_contributions : application of the contribution checks +driver_for_criterion : driver for the criterion +ts_drivcrit : calls the menu-driver for the criterion +driver_for_lifting_functions : menu-driver for selecting lifting function +pruning_statistics : writes pruning statistics +drivers_for_static_lifting : menu-driver for static lifting +ts_drivstal : calls the driver for static lifting +drivers_for_mixedvol_algorithm : drivers to the MixedVol Algorithm +ts_mvasta : calls the MixedVol algorithm +drivers_for_demics_algorithm : drivers to the DEMiCs Algorithm +------------------------------------------------------------------------------- +ts_mixlab : coordinate/labeled subdivision convertors +ts_jpmix : template to prepare jumpstarting +polyhedral_coefficient_homotopies : for efficient evaluation of the homotopies +polyhedral_coefficient_parameters : default values of numerical tolerances +polyhedral_coefficient_predictors : step control and predictors +polyhedral_coefficient_correctors : correctors for polyhedral homotopies +polyhedral_coefficient_tracking : path tracking with coefficient homotopies +jumpstart_polyhedral_homotopies : drivers to jumpstart polyhedral trackers +ts_exptrack : test exponential continuation parameters +------------------------------------------------------------------------------- +lifted_configurations : for balancing the lifting values +test_balance_lifting : development of balancing lifting values +ts_balance : calls the main test on balancing +------------------------------------------------------------------------------- + +Subdivisions induced by integer lifting functions have to be recursive, +since one cannot guarantee that all cells will be fine mixed. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Stalift/stalift.gpr phcpack-2.4.85/src/Ada/Root_Counts/Stalift/stalift.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Stalift/stalift.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Stalift/stalift.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,90 @@ +project stalift is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../MixedVol", + "../DEMiCs", "../../Tasking", "../../CtoPHC/Types" + ); + for Excluded_Source_Files use ("demicsrun.cpp", "main.cpp"); + for Languages use ("Ada", "C++"); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../MixedVol", + "../DEMiCs", "../../Tasking", "../../CtoPHC/Funky" + ); + for Excluded_Source_Files use + ( + "demicsrun.cpp", "main.cpp", "corecount.c" + ); + for Languages use ("Ada", "C", "C++"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_rndcff.adb", -- tests random systems + "ts_mixvol.adb", -- tests mixed volume of supports + "ts_userlift.adb", -- tests user defined integer lifting + "ts_stable.adb", -- tests stable mixed volumes + "ts_drivcrit.adb", -- tests the main criterion + "ts_drivstal.adb", -- tests the main static lifting + "ts_mvasta.adb", -- tests the MixedVol algorithm + "ts_mixlab.adb", -- tests coordinate/labeled subdivisions + "ts_jpmix.adb", -- tests jumpstarting + "ts_exptrack.adb", -- tests exponential continuation parameters + "ts_balance.adb" -- tests balancing lifting values + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + for Switches ("use_c2phc.adb") use ("-c"); + + end Compiler; + +end stalift; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Stalift/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Stalift/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Stalift/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Stalift/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,15 @@ +Sun 27 Jun 2021 : updated stalift.gpr to no longer exclude the C code + for MixedVol. + +Sat 26 Jun 2021 : updated stalift.gpr to no longer exclude double_double.c. + +Mon 14 Jun 2021 : fixed stalift.gpr for the new Types folder and removed + the ts_calldemics from the main test procedures. + +Thu 10 Jun 2021 : added the exec_dir attribute to stalift.gpr. + +Wed 9 Jun 2021 : defined stalift.gpr to build the test procedures. + Sun 8 Nov 2020 : updated driver_for_{mixedvol,demics}_algorithm.adb for the renaming of drivers_for_poly_continuation into main_poly_continuation. diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/drivers_for_symmetric_lifting.adb 2021-06-30 23:22:40.000000000 +0000 @@ -53,7 +53,7 @@ i : array(1..6) of string(1..65); begin - i(1):=" Symmetric lifting allows to exploit permutation symmetries in"; + i(1):=" Symmetric lifting allows one to exploit permutation symmetries in"; i(2):="the tuple of Newton polytopes. A symmetric subdivision is"; i(3):="induced by lifting the points in the same orbit up to the same"; i(4):="height. The corresponding random coefficient start system has"; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/orbits_of_solutions_io.adb phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/orbits_of_solutions_io.adb --- phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/orbits_of_solutions_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/orbits_of_solutions_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,7 @@ -with integer_io; use integer_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; package body Orbits_of_Solutions_io is @@ -10,47 +13,47 @@ procedure put ( file : in file_type; lorb : in List_of_Orbits ) is tmp : List_of_Orbits; - totgen,totsols : natural; + totgen,totsols : natural32; begin tmp := lorb; - if not Is_Null(lorb) - then put_line(file,"------------------------------------------------"); - put_line(file,"| ORBIT INFORMATION OF LIST OF SOLUTIONS |"); - put_line(file,"------------------------------------------------"); - put_line(file,"| TYPE | NB <> | NB GEN | NB SOLS |"); - put_line(file,"------------------------------------------------"); - totgen := 0; - totsols := 0; - while not Is_Null(tmp) loop - declare - n : natural := Head_Of(tmp).n; - orbi : Orbit(n) := Head_Of(tmp).all; - begin - put(file,"| "); - for i in orbi.orb'range loop - put(file,orbi.orb(i),1); - put(file,' '); - end loop; - for i in 1..(17-2*n) loop - put(file,' '); - end loop; - put(file,"| "); - put(file,orbi.nbdiff,2); - put(file," | "); - put(file,orbi.nbgen,2); totgen := totgen + orbi.nbgen; - put(file," | "); - put(file,orbi.nbsols,3); totsols := totsols + orbi.nbsols; - put_line(file," |"); - end; - tmp := Tail_Of(tmp); + if not Is_Null(lorb) then + put_line(file,"------------------------------------------------"); + put_line(file,"| ORBIT INFORMATION OF LIST OF SOLUTIONS |"); + put_line(file,"------------------------------------------------"); + put_line(file,"| TYPE | NB <> | NB GEN | NB SOLS |"); + put_line(file,"------------------------------------------------"); + totgen := 0; + totsols := 0; + while not Is_Null(tmp) loop + declare + n : integer32 := Head_Of(tmp).n; + orbi : Orbit(n) := Head_Of(tmp).all; + begin + put(file,"| "); + for i in orbi.orb'range loop + put(file,orbi.orb(i),1); + put(file,' '); + end loop; + for i in 1..(17-2*n) loop + put(file,' '); end loop; - put_line(file,"------------------------------------------------"); - put(file,"| Total number of generating solutions : "); - put(file,totgen,4); put_line(file," |"); - put(file,"| Total number of solutions generated : "); - put(file,totsols,4); put_line(file," |"); - put_line(file,"------------------------------------------------"); + put(file,"| "); + put(file,orbi.nbdiff,2); + put(file," | "); + put(file,orbi.nbgen,2); totgen := totgen + orbi.nbgen; + put(file," | "); + put(file,orbi.nbsols,3); totsols := totsols + orbi.nbsols; + put_line(file," |"); + end; + tmp := Tail_Of(tmp); + end loop; + put_line(file,"------------------------------------------------"); + put(file,"| Total number of generating solutions : "); + put(file,totgen,4); put_line(file," |"); + put(file,"| Total number of solutions generated : "); + put(file,totsols,4); put_line(file," |"); + put_line(file,"------------------------------------------------"); end if; end put; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/READ_ME phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/READ_ME --- phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Exploitation of permutation symmetry for symmetric homotopies in PHCv2.4.83 +Exploitation of permutation symmetry for symmetric homotopies in PHCv2.4.85 If the polynomial system is invariant under permutations of its unknowns, then it suffices to compute the generators of the solution set. @@ -11,6 +11,11 @@ 3) symmetric integer and floating-point lifting 4) the main procedures, as called by phc -m +Run "gprbuild symmetry.gpr" to make all test programs. +On windows, type "gprbuild symmetry.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean symmetry.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/symmetry.gpr phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/symmetry.gpr --- phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/symmetry.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/symmetry.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,71 @@ +project symmetry is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift"); + for Languages use ("Ada"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_group.adb", -- tests group operations + "ts_equpol.adb", -- tests (G,V,W)-symmetric polynomial systems + "ts_drivsss.adb" -- tests the main procedure + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + for Switches ("use_c2phc.adb") use ("-c"); + + end Compiler; + +end symmetry; diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/Symmetry/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/Symmetry/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,10 @@ +Sat 26 Jun 2021 : updated symmetry.gpr not to exclude double_double.c. + +Sun 13 Jun 2021 : fixed orbits_of_solutions_io.adb. + +Thu 10 Jun 2021 : defined symmetry.gpr to build the test procedures. + Added Exec_Dir attribute to symmetry.gpr. + Fri 4 Dec 2020 : replaced mainsmvc by the package mixed_volume_calculator. Sun 8 Nov 2020 : updated drivers_for_symmetric_lifting for the renaming of diff -Nru phcpack-2.4.84/src/Ada/Root_Counts/UPDATES phcpack-2.4.85/src/Ada/Root_Counts/UPDATES --- phcpack-2.4.84/src/Ada/Root_Counts/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Root_Counts/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,5 @@ +Sat 26 Jun 2021 : added root_counts.gpr to build all test procedures. + Sun 22 Apr 2018 : new directory DEMiCs to interface with demics. Thu 25 Apr 2013 : merged contents of Tasking to top Tasking directory. diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/evaluate_schubert_conditions.adb phcpack-2.4.85/src/Ada/Schubert/Induction/evaluate_schubert_conditions.adb --- phcpack-2.4.84/src/Ada/Schubert/Induction/evaluate_schubert_conditions.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/evaluate_schubert_conditions.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -with Standard_Floating_Numbers; use Standard_Floating_Numbers; -with Standard_Complex_Numbers; use Standard_Complex_Numbers; - -package body Evaluate_Schubert_Conditions is - --- DESCRIPTION : --- This package provides functions to evaluate the Schubert --- intersection conditions. - - function Eval ( X,P,B : Standard_Complex_Matrices.Matrix; - h,m : Standard_Complex_Vectors.Vector ) - return Standard_Complex_Vectors.Vector is - - n : constant natural := X'last(1); - np1 : constant natural := n+1; - res : Standard_Complex_Vectors.Vector(1..np1); - Btm : Standard_Complex_Vectors.Vector(1..n); - ind : integer; - - begin - for i in 1..n loop -- compute B times m - Btm(i) := Create(0.0); - for j in B'range(2) loop - Btm(i) := Btm(i) + B(i,j)*m(j); - end loop; - end loop; - for i in 1..n loop -- compute [X|P] times B*m - res(i) := Create(0.0); - ind := Btm'first-1; - for j in X'range(2) loop - ind := ind + 1; - res(i) := res(i) + X(i,j)*Btm(ind); - end loop; - for j in P'range(2) loop - ind := ind + 1; - res(i) := res(i) + P(i,j)*Btm(ind); - end loop; - end loop; - res(np1) := Create(-1.0); - for i in h'range loop -- compute -1+ - res(np1) := res(np1) + h(i)*m(i); - end loop; - return res; - end Eval; - -end Evaluate_Schubert_Conditions; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/evaluate_schubert_conditions.ads phcpack-2.4.85/src/Ada/Schubert/Induction/evaluate_schubert_conditions.ads --- phcpack-2.4.84/src/Ada/Schubert/Induction/evaluate_schubert_conditions.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/evaluate_schubert_conditions.ads 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -with Standard_Complex_Vectors; -with Standard_Complex_Matrices; - -package Evaluate_Schubert_Conditions is - --- DESCRIPTION : --- This package provides functions to evaluate the Schubert --- intersection conditions. - - function Eval ( X,P,B : Standard_Complex_Matrices.Matrix; - h,m : Standard_Complex_Vectors.Vector ) - return Standard_Complex_Vectors.Vector; - - -- DESCRIPTION : - -- Returns the result of the evaluation of - -- - -- ( [ X | P ]*B*m ) - -- y = ( ) - -- ( < h , m > - 1 ) - -- - -- to express that Rank([ X | P ]) = r. - -- - -- REQUIRED : - -- X'range(1) = P'range(1) = 1..n, n = dimension of ambient space; - -- if X'range(2) = 1..k, P'range(2) = 1..l, then B'range(1) = 1..l; - -- B'range(2) = h'range = m'range = 1..r+1. - -- - -- ON ENTRY : - -- X is a k-plane in n-space, represented by an n-by-k matrix, - -- with in its columns the generators for the k-plane X; - -- P is an l-plane in n-space, represented by an n-by-l matrix, - -- with in its columns the generators for the l-plane P; - -- B is a random (k+l)-by-(r+1)-matrix; - -- m is a vector of r+1 multipliers for the colums of [X|P]*B; - -- h is a random (r+1)-vector to scale the multipliers with. - -- - -- ON RETURN : - -- if y is zero, then X meets P in the proper way. - -end Evaluate_Schubert_Conditions; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/induction.gpr phcpack-2.4.85/src/Ada/Schubert/Induction/induction.gpr --- phcpack-2.4.84/src/Ada/Schubert/Induction/induction.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/induction.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,70 @@ +project induction is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Circuits", "../../Math_Lib/Supports", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", "../../Deformations/Sweep", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../../Root_Counts/Symmetry", + "../SAGBI", "../Pieri", + "../../Components/Samplers", + "../../Components/Decomposition", + "../../CtoPHC/State", "../../Tasking", "../../Main"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Math_Lib/Circuits", + "../../Math_Lib/Series", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", "../../Deformations/Sweep", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../../Root_Counts/Symmetry", + "../SAGBI", "../Pieri", + "../../Components/Samplers", + "../../Components/Decomposition", + "../../CtoPHC/State", "../../Tasking", "../../Main"); + for Excluded_Source_Files use ("corecount.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_checkers.adb", -- tests the checker game + "ts_induce.adb", -- tests homotopies + "ts_flagcond.adb", -- tests Schubert conditions + "ts_lrhom.adb" -- tests Littlewood-Richardson homotopies + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end induction; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/main_schubert_induction.adb phcpack-2.4.85/src/Ada/Schubert/Induction/main_schubert_induction.adb --- phcpack-2.4.84/src/Ada/Schubert/Induction/main_schubert_induction.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/main_schubert_induction.adb 2021-06-30 23:22:40.000000000 +0000 @@ -849,7 +849,7 @@ new_line; put_line("MENU for kind of output in Littlewood-Richardson homotopies :"); put_line(" 0. no intermediate output will be written to file;"); - put_line(" 1. output to file allows to monitor the progress;"); + put_line(" 1. output to file allows one to monitor the progress;"); put_line(" 2. monitoring progress with extra verifying diagnostics."); put("Type 0, 1, or 2 to select the kind of output : "); Ask_Alternative(ans,"012"); diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/READ_ME phcpack-2.4.85/src/Ada/Schubert/Induction/READ_ME --- phcpack-2.4.84/src/Ada/Schubert/Induction/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,9 +1,14 @@ -Numerical Schubert Calculus defining Schubert Induction with PHCv2.4.83 +Numerical Schubert Calculus defining Schubert Induction with PHCv2.4.85 This directory is entirely new in release 2.2 of PHCpack, it implements a geometric Littlewood-Richardson rule and defines Littlewood-Richardson homotopies to solve Schubert problems. +Run "gprbuild induction.gpr" to make all test programs. +On windows, type "gprbuild induction.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean induction.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/Schubert/Induction/UPDATES phcpack-2.4.85/src/Ada/Schubert/Induction/UPDATES --- phcpack-2.4.84/src/Ada/Schubert/Induction/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Induction/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Sun 27 Jun 2021 : removed the obsolete evaluate_schubert_conditions package. + +Thu 10 Jun 2021 : defined the exec_dir attribute in induction.gpr. + +Wed 9 Jun 2021 : defined induction.gpr to build the test procedures. + Mon 14 Dec 2020 : commented out message in setup_flag_homotopies.adb. Sat 12 Dec 2020 : updated the messages in main_schubert_induction when the diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/deformation_posets_io.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/deformation_posets_io.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/deformation_posets_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/deformation_posets_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,6 @@ -with integer_io; use integer_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_VecMats; use Standard_Complex_VecMats; package body Deformation_Posets_io is @@ -11,7 +13,7 @@ procedure put_size ( file : in file_type; poset : in Array_of_Array_of_VecMats ) is - np : natural; + np : natural32; lavm : Link_to_VecMat; begin @@ -21,14 +23,14 @@ end if; for i in poset'range loop put(file,"n = "); put(file,i,np); put(file," : "); - if poset(i) /= null - then for j in poset(i)'range loop - lavm := poset(i)(j); - if lavm = null - then put(file," 0"); - else put(file," "); put(file,lavm'length,1); - end if; - end loop; + if poset(i) /= null then + for j in poset(i)'range loop + lavm := poset(i)(j); + if lavm = null + then put(file," 0"); + else put(file," "); put(file,integer32(lavm'length),1); + end if; + end loop; end if; new_line(file); end loop; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_deformations.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_deformations.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_deformations.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_deformations.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,4 @@ +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers; use Standard_Floating_Numbers; @@ -18,9 +19,9 @@ with Brackets,Brackets_io; use Brackets,Brackets_io; with Bracket_Monomials; use Bracket_Monomials; with Bracket_Monomials_io; use Bracket_Monomials_io; -with Bracket_Polynomials; use Bracket_Polynomials; -with Bracket_Polynomials_io; use Bracket_Polynomials_io; -with Bracket_Systems; use Bracket_Systems; +with Standard_Bracket_Polynomials; use Standard_Bracket_Polynomials; +with Standard_Bracket_Polynomials_io; use Standard_Bracket_Polynomials_io; +with Standard_Bracket_Systems; use Standard_Bracket_Systems; with Pieri_Trees,Pieri_Trees_io; use Pieri_Trees,Pieri_Trees_io; with Symbolic_Minor_Equations; use Symbolic_Minor_Equations; with Numeric_Minor_Equations; use Numeric_Minor_Equations; @@ -33,7 +34,7 @@ package body Pieri_Deformations is function Coordinate_Bracket - ( nd : Pieri_Node; jmp : natural ) return Bracket is + ( nd : Pieri_Node; jmp : integer32 ) return Bracket is -- DESCRIPTION : -- On return we find the bracket determines the local coordinates. @@ -48,7 +49,7 @@ procedure Test_Solution ( file : in file_type; nd1,nd2 : in Pieri_Node; - id : in natural; l1,l2 : in VecMat; l : in Matrix; + id : in natural32; l1,l2 : in VecMat; l : in Matrix; x : Standard_Complex_Poly_Matrices.Matrix; solpla : in Matrix ) is @@ -64,9 +65,9 @@ if Is_Leaf(nd1) then fst := l1'last+1; elsif nd1.i = 0 then - fst := nd1.c; + fst := integer32(nd1.c); else - fst := nd1.c+1; + fst := integer32(nd1.c)+1; end if; for i in fst..l1'last loop Concat(sys,Polynomial_Equations(l1(i).all,x)); @@ -74,9 +75,9 @@ if Is_Leaf(nd2) then fst := l2'last+1; elsif nd2.i = 0 then - fst := nd2.c; + fst := integer32(nd2.c); else - fst := nd2.c+1; + fst := integer32(nd2.c)+1; end if; for i in fst..l2'last loop Concat(sys,Polynomial_Equations(l2(i).all,x)); @@ -160,20 +161,21 @@ n : constant integer32 := f'length(1); p : constant integer32 := lb'length; - nva : constant natural := n*p+1; - m : constant natural := n-p; - lc : constant natural := l(nd.c)'length(2); - r : natural; + nva : constant integer32 := n*p+1; + m : constant integer32 := n-p; + lc : constant integer32 := l(integer32(nd.c))'length(2); + r : integer32; U : constant Standard_Complex_Matrices.Matrix := U_Matrix(f,lb); begin if outlog then put_line(file,"The U-matrix : "); put(file,U,2); end if; - if nd.i = 0 - then return Moving_U_Matrix(nva,U,l(nd.c).all); - else r := m+1 - lc; - return Moving_U_Matrix(U,nd.i,r,lb); + if nd.i = 0 then + return Moving_U_Matrix(nva,U,l(integer32(nd.c)).all); + else + r := m+1 - lc; + return Moving_U_Matrix(U,integer32(nd.i),r,lb); end if; end Moving_U_Matrix; @@ -183,11 +185,11 @@ -- DESCRIPTION : -- Returns the moving cycle expaned as polynomial system. - n : constant natural := x'length(1); - p : constant natural := x'length(2); - kd : constant natural := p + movU'length(2); + n : constant natural32 := natural32(x'length(1)); + p : constant natural32 := natural32(x'length(2)); + kd : constant natural32 := p + natural32(movU'length(2)); bm : Bracket_Monomial := Maximal_Minors(n,kd); - bs : Bracket_System(0..Number_of_Brackets(bm)) + bs : Bracket_System(0..integer32(Number_of_Brackets(bm))) := Minor_Equations(kd,kd-p,bm); res : constant Poly_Sys := Lifted_Expanded_Minors(movU,x,bs); @@ -207,22 +209,23 @@ -- REQUIRED : nd.c > 0. - lc : constant natural := l(nd.c)'length(2); + lc : constant integer32 := l(integer32(nd.c))'length(2); movU : Standard_Complex_Poly_Matrices.Matrix(x'range(1),1..lc) := Moving_U_Matrix(file,outlog,nd,lb,f,l); res : constant Poly_Sys := Moving_Cycle(movU,x); begin - if outlog - then put_line(file,"The moving U matrix : "); put(file,MovU); - put_line(file,"The equations of the moving cycle : "); put(file,res); + if outlog then + put_line(file,"The moving U matrix : "); put(file,MovU); + put_line(file,"The equations of the moving cycle : "); put(file,res); end if; Standard_Complex_Poly_Matrices.Clear(movU); return res; end One_Moving_Cycle; function Left_Moving_Cycle - ( file : file_type; nd : Pieri_Node; lb : Bracket; jmp : natural; + ( file : file_type; nd : Pieri_Node; lb : Bracket; + jmp : integer32; f : Standard_Complex_Matrices.Matrix; l : VecMat; x : Standard_Complex_Poly_Matrices.Matrix; outlog : boolean ) return Poly_Sys is @@ -233,27 +236,28 @@ -- REQUIRED : nd.c > 0. - n : constant natural := x'length(1); - p : constant natural := x'length(2); - lc : constant natural := l(nd.c)'length(2); + n : constant integer32 := x'length(1); + -- p : constant natural32 := natural32(x'length(2)); + lc : constant integer32 := integer32(l(integer32(nd.c))'length(2)); movU : Standard_Complex_Poly_Matrices.Matrix(x'range(1),1..lc) := Moving_U_Matrix(file,outlog,nd,lb,f,l); movUsec : constant Standard_Complex_Poly_Matrices.Matrix - := Lower_Section(movU,n+1-lb(jmp)); + := Lower_Section(movU,n+1-integer32(lb(jmp))); res : constant Poly_Sys := Moving_Cycle(movUsec,x); begin - if outlog - then put_line(file,"The left moving U matrix : "); put(file,movU); - put_line(file,"The left moving cycle : "); put(file,movUsec); - put_line(file,"The equations of the moving cycle : "); put(file,res); + if outlog then + put_line(file,"The left moving U matrix : "); put(file,movU); + put_line(file,"The left moving cycle : "); put(file,movUsec); + put_line(file,"The equations of the moving cycle : "); put(file,res); end if; Standard_Complex_Poly_Matrices.Clear(movU); return res; end Left_Moving_Cycle; function Right_Moving_Cycle - ( file : file_type; nd : Pieri_Node; lb : Bracket; jmp : natural; + ( file : file_type; nd : Pieri_Node; lb : Bracket; + jmp : integer32; f : Standard_Complex_Matrices.Matrix; l : VecMat; x : Standard_Complex_Poly_Matrices.Matrix; outlog : boolean ) return Poly_Sys is @@ -264,26 +268,27 @@ -- REQUIRED : nd.c > 0. - lc : constant natural := l(nd.c)'length(2); + lc : constant integer32 := l(integer32(nd.c))'length(2); movU : Standard_Complex_Poly_Matrices.Matrix(x'range(1),1..lc) := Moving_U_Matrix(file,outlog,nd,lb,f,l); movUsec : constant Standard_Complex_Poly_Matrices.Matrix - := Upper_Section(movU,lb(jmp)); + := Upper_Section(movU,integer32(lb(jmp))); res : constant Poly_Sys := Moving_Cycle(movUsec,x); begin - if outlog - then put_line(file,"The right moving U matrix : "); put(file,movU); - put_line(file,"The right moving cycle : "); put(file,movUsec); - put_line(file,"The equations of the moving cycle :"); put(file,res); + if outlog then + put_line(file,"The right moving U matrix : "); put(file,movU); + put_line(file,"The right moving cycle : "); put(file,movUsec); + put_line(file,"The equations of the moving cycle :"); put(file,res); end if; Standard_Complex_Poly_Matrices.Clear(movU); return res; end Right_Moving_Cycle; procedure Moving_Cycles - ( file : in file_type; pnd : in Paired_Nodes; id : in natural; - jmp1,jmp2 : in natural; b1,b2 : in Bracket; + ( file : in file_type; pnd : in Paired_Nodes; + id : in natural32; + jmp1,jmp2 : in integer32; b1,b2 : in Bracket; f1,f2 : in Standard_Complex_Matrices.Matrix; l1,l2 : in VecMat; ln : in Matrix; report,outlog : in boolean; sol : in out Matrix ) is @@ -296,7 +301,7 @@ cb1 : constant Bracket := Coordinate_Bracket(pnd.left.all,jmp1); cb2 : constant Bracket := Coordinate_Bracket(pnd.right.all,jmp2); xpm : Standard_Complex_Poly_Matrices.Matrix(sol'range(1),sol'range(2)) - := Schubert_Pattern(sol'last(1),cb1,cb2); + := Schubert_Pattern(natural32(sol'last(1)),cb1,cb2); homotopy : Link_to_Poly_Sys; locmap : constant Standard_Natural_Matrices.Matrix := Standard_Coordinate_Frame(xpm,sol); @@ -308,10 +313,10 @@ put(file,xpm); end if; homotopy := new Poly_Sys'(Polynomial_Equations(ln,xpm)); - for i in pnd.left.c+1..l1'last loop + for i in integer32(pnd.left.c)+1..l1'last loop Concat(homotopy,Polynomial_Equations(l1(i).all,xpm)); end loop; - for i in pnd.right.c+1..l2'last loop + for i in integer32(pnd.right.c)+1..l2'last loop Concat(homotopy,Polynomial_Equations(l2(i).all,xpm)); end loop; for i in homotopy'range loop @@ -354,8 +359,8 @@ sol : in out Matrix ) is down : Paired_Nodes; - jmp1 : constant natural := Jump(pnd.left.all); - jmp2 : constant natural := Jump(pnd.right.all); + jmp1 : constant integer32 := Jump(pnd.left.all); + jmp2 : constant integer32 := Jump(pnd.right.all); lb1 : constant Bracket := Lower_Jump_Decrease(pnd.left.all); lb2 : constant Bracket := Lower_Jump_Decrease(pnd.right.all); @@ -393,8 +398,9 @@ -- end if; end Deform_Pair; - procedure Write_Paired_Chains ( file : in file_type; - pnd : in Paired_Nodes; ind : in natural ) is + procedure Write_Paired_Chains + ( file : in file_type; + pnd : in Paired_Nodes; ind : in integer32 ) is -- DESCRIPTION : -- Writes the chains downwards that start at the leaves of pnd. @@ -408,7 +414,7 @@ end Write_Paired_Chains; procedure Deform_Pairs - ( file : in file_type; n,d : in natural; + ( file : in file_type; n,d : in natural32; lp : in List_of_Paired_Nodes; l1,l2 : in VecMat; ln : in Matrix; report,outlog : in boolean; sols : out VecMat ) is @@ -416,21 +422,23 @@ tmp : List_of_Paired_Nodes := lp; pnd : Paired_Nodes; f1 : constant Standard_Complex_Matrices.Matrix - := Random_Upper_Triangular(n); + := Random_Upper_Triangular(integer32(n)); f2 : constant Standard_Complex_Matrices.Matrix - := Random_Lower_Triangular(n); - firstpair : Paired_Nodes := Head_Of(lp); + := Random_Lower_Triangular(integer32(n)); + firstpair : constant Paired_Nodes := Head_Of(lp); lb1 : constant Bracket := Lowest_Jump_Decrease(firstpair.left.all); lb2 : constant Bracket := Lowest_Jump_Decrease(firstpair.right.all); - xpm : Standard_Complex_Poly_Matrices.Matrix(ln'range(1),lb1'range) - := Schubert_Pattern(ln'last(1),lb1,lb2); + xpm : constant Standard_Complex_Poly_Matrices.Matrix(ln'range(1),lb1'range) + := Schubert_Pattern(natural32(ln'last(1)),lb1,lb2); begin - for i in 1..Length_Of(lp) loop + for i in 1..integer32(Length_Of(lp)) loop pnd := Head_Of(tmp); Write_Paired_Chains(file,pnd,i); - sols(i) := new Standard_Complex_Matrices.Matrix(1..n,1..d); - Deform_Pair(file,pnd,i,f1,f2,l1,l2,ln,report,outlog,sols(i).all); + sols(i) := new Standard_Complex_Matrices.Matrix + (1..integer32(n),1..integer32(d)); + Deform_Pair(file,pnd,natural32(i),f1,f2,l1,l2,ln,report,outlog, + sols(i).all); tmp := Tail_Of(tmp); end loop; Test_Solutions(file,l1,l2,ln,xpm,sols); diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_deformations.ads phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_deformations.ads --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_deformations.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_deformations.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,5 @@ with text_io; use text_io; with Standard_Natural_Numbers; use Standard_natural_Numbers; -with Standard_Natural_Vectors; with Standard_Complex_Matrices; use Standard_Complex_Matrices; with Standard_Complex_VecMats; use Standard_Complex_VecMats; with Pieri_Root_Counts; use Pieri_Root_Counts; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri.gpr phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri.gpr --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,63 @@ +project pieri is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../SAGBI"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../SAGBI"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_detsys.adb", -- tests determinantal systems + "ts_org_pieri.adb", -- tests the original Pieri homotopy algorithm + "ts_canocurv.adb", -- tests localization patterns for q-curves + "ts_posets.adb", -- tests posets definitions + "ts_defpos.adb", -- tests deformation posets + "ts_matinv.adb", -- tests matrix inversion + "ts_pieri.adb", -- tests the Pieri homotopies + "ts_piroco.adb" -- tests the Pieri root count + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end pieri; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_root_counts.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_root_counts.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_root_counts.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_root_counts.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,37 +1,36 @@ -with unchecked_deallocation; -with integer_io; use integer_io; +--with unchecked_deallocation; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Brackets; use Brackets; with Brackets_io; use Brackets_io; -with Pieri_Trees_io; use Pieri_Trees_io; package body Pieri_Root_Counts is - procedure free is new unchecked_deallocation(Nodal_Pair,Link_to_Nodal_Pair); +-- procedure free is new unchecked_deallocation(Nodal_Pair,Link_to_Nodal_Pair); - type Boolean_Array is array ( integer range <> ) of boolean; + type Boolean_Array is array ( integer32 range <> ) of boolean; - function Create ( n,d : natural; t1,t2 : Pieri_Tree ) + function Create ( n,d : integer32; t1,t2 : Pieri_Tree ) return List_of_Paired_Nodes is res,res_last : List_of_Paired_Nodes; - h1 : constant natural := Height(t1); - h2 : constant natural := Height(t2); + h1 : constant natural32 := Height(t1); + h2 : constant natural32 := Height(t2); b1,b2 : Bracket(1..d); firstlnd : Link_to_Pieri_Node; - cnt : natural := 0; procedure Check_Pair ( lnd : in Link_to_Pieri_Node; continue : out boolean ) is begin b2 := lnd.node; - if Pieri_Condition(n,b1,b2) - then declare - lpnd : Paired_Nodes; - begin - lpnd.left := firstlnd; - lpnd.right := lnd; - Append(res,res_last,lpnd); - end ; + if Pieri_Condition(natural32(n),b1,b2) then + declare + lpnd : Paired_Nodes; + begin + lpnd.left := firstlnd; + lpnd.right := lnd; + Append(res,res_last,lpnd); + end; end if; continue := true; end Check_Pair; @@ -54,8 +53,8 @@ function Create ( pnd : Paired_Nodes ) return Paired_Chain is - res : Paired_Chain(1..Height(pnd)); - ind : natural := res'last; + res : Paired_Chain(1..integer32(Height(pnd))); + ind : integer32 := res'last; begin res(ind) := pnd; @@ -63,23 +62,24 @@ ind := ind - 1; res(ind) := Ancestor(res(ind+1)); end loop; - if ind = 1 - then return res; - else for i in 1..res'last-ind+1 loop -- shift down - res(i) := res(i+ind-1); - end loop; - return res(1..res'last-ind+1); + if ind = 1 then + return res; + else + for i in 1..res'last-ind+1 loop -- shift down + res(i) := res(i+ind-1); + end loop; + return res(1..res'last-ind+1); end if; end Create; - procedure Connect ( ancnp,np : in out Link_to_Nodal_Pair ) is + procedure Connect ( ancnp,np : in Link_to_Nodal_Pair ) is -- DESCRIPTION : -- Connects the ancestor paired nodes with the paired nodes np. - ancpnd : Paired_Nodes := Ancestor(np.pnd); - j1 : constant natural := Jump(ancpnd.left.node,np.pnd.left.node); - j2 : constant natural := Jump(ancpnd.right.node,np.pnd.right.node); + ancpnd : constant Paired_Nodes := Ancestor(np.pnd); + j1 : constant integer32 := Jump(ancpnd.left.node,np.pnd.left.node); + j2 : constant integer32 := Jump(ancpnd.right.node,np.pnd.right.node); begin ancnp.pnd := ancpnd; @@ -87,64 +87,67 @@ np.ancestor := ancnp; end Connect; - procedure Initial_Branch ( root,np : in out Link_to_Nodal_Pair ) is + procedure Initial_Branch ( root : in out Link_to_Nodal_Pair; + np : in Link_to_Nodal_Pair ) is -- DESCRIPTION : -- Constructs the initial branch in the tree of paired nodes. begin - if At_First_Branch_Point(np.pnd) - then root := np; - else declare - acc : Link_to_Nodal_Pair := new Nodal_Pair(np.d); - begin - acc.sols := 1; - Connect(acc,np); - Initial_Branch(root,acc); - end; + if At_First_Branch_Point(np.pnd) then + root := np; + else + declare + acc : constant Link_to_Nodal_Pair := new Nodal_Pair(np.d); + begin + acc.sols := 1; + Connect(acc,np); + Initial_Branch(root,acc); + end; end if; end Initial_Branch; procedure Merge ( root : in Nodal_Pair; - current : in out Link_to_Nodal_Pair; k : in natural; + current : in Link_to_Nodal_Pair; k : in integer32; chain : in Paired_Chain ) is -- DESCRIPTION : -- Merges the chain with the root of the tree, at level k. - j1,j2 : natural; + j1,j2 : integer32; begin j1 := Jump(chain(k).left.node,chain(k+1).left.node); j2 := Jump(chain(k).right.node,chain(k+1).right.node); - if current.children(j1,j2) = null - then declare - newnp : Link_to_Nodal_Pair := new Nodal_Pair(current.d); - begin - newnp.pnd := chain(k+1); - if Is_In(root,newnp.pnd) - then newnp.sols := 0; - else newnp.sols := 1; - end if; - current.children(j1,j2) := newnp; - newnp.ancestor := current; - end; - else if current.children(j1,j2).sols > 0 - then current.children(j1,j2).sols - := current.children(j1,j2).sols + 1; - end if; + if current.children(j1,j2) = null then + declare + newnp : constant Link_to_Nodal_Pair := new Nodal_Pair(current.d); + begin + newnp.pnd := chain(k+1); + if Is_In(root,newnp.pnd) + then newnp.sols := 0; + else newnp.sols := 1; + end if; + current.children(j1,j2) := newnp; + newnp.ancestor := current; + end; + else + if current.children(j1,j2).sols > 0 then + current.children(j1,j2).sols + := current.children(j1,j2).sols + 1; + end if; end if; if k+1 < chain'last then Merge(root,current.children(j1,j2),k+1,chain); end if; end Merge; - function Create ( d : natural; lp : List_of_Paired_Nodes ) + function Create ( d : integer32; lp : List_of_Paired_Nodes ) return Nodal_Pair is root : Nodal_Pair(d); lroot : Link_to_Nodal_Pair := new Nodal_Pair'(root); - first : Link_to_Nodal_Pair := new Nodal_Pair(d); + first : constant Link_to_Nodal_Pair := new Nodal_Pair(d); tmp : List_of_Paired_Nodes := Tail_Of(lp); begin @@ -154,7 +157,7 @@ Initial_Branch(lroot,first); while not Is_Null(tmp) loop declare - pnd : Paired_Nodes := Head_Of(tmp); + pnd : constant Paired_Nodes := Head_Of(tmp); chn : constant Paired_Chain := Create(pnd); begin lroot.sols := lroot.sols + 1; @@ -167,7 +170,7 @@ -- SELECTORS : - function Height ( pnd : Paired_Nodes ) return natural is + function Height ( pnd : Paired_Nodes ) return natural32 is begin if pnd.left.h >= pnd.right.h then return pnd.left.h; @@ -183,12 +186,12 @@ function At_First_Branch_Point ( pnd : Paired_Nodes ) return boolean is begin - if pnd.left.h /= pnd.right.h - then return false; - elsif ((pnd.left.c > 1) or (pnd.right.c > 1)) - then return false; - else return (((pnd.left.i = 0) and (pnd.left.c = 1)) - or else ((pnd.right.i = 0) and (pnd.right.c = 1))); + if pnd.left.h /= pnd.right.h then + return false; + elsif ((pnd.left.c > 1) or (pnd.right.c > 1)) then + return false; + else return (((pnd.left.i = 0) and (pnd.left.c = 1)) + or else ((pnd.right.i = 0) and (pnd.right.c = 1))); end if; end At_First_Branch_Point; @@ -202,14 +205,15 @@ res : Paired_Nodes; begin - if pnd.left.h = pnd.right.h - then res.left := pnd.left.ancestor; - res.right := pnd.right.ancestor; - elsif pnd.left.h > pnd.right.h - then res.left := pnd.left.ancestor; - res.right := pnd.right; - else res.left := pnd.left; - res.right := pnd.right.ancestor; + if pnd.left.h = pnd.right.h then + res.left := pnd.left.ancestor; + res.right := pnd.right.ancestor; + elsif pnd.left.h > pnd.right.h then + res.left := pnd.left.ancestor; + res.right := pnd.right; + else + res.left := pnd.left; + res.right := pnd.right.ancestor; end if; return res; end Ancestor; @@ -222,7 +226,7 @@ end if; end First_Branch_Point; - function Height ( np : Nodal_Pair ) return natural is + function Height ( np : Nodal_Pair ) return natural32 is begin if np.pnd.left.h >= np.pnd.right.h then return np.pnd.left.h; @@ -232,32 +236,33 @@ function Is_In ( root : Nodal_Pair; pnd : Paired_Nodes ) return boolean is begin - if Equal(root.pnd,pnd) - then return true; - else for j1 in root.children'range(1) loop - for j2 in root.children'range(2) loop - if root.children(j1,j2) /= null - then if Is_In(root.children(j1,j2).all,pnd) - then return true; - end if; - end if; - end loop; - end loop; + if Equal(root.pnd,pnd) then + return true; + else + for j1 in root.children'range(1) loop + for j2 in root.children'range(2) loop + if root.children(j1,j2) /= null then + if Is_In(root.children(j1,j2).all,pnd) + then return true; + end if; + end if; + end loop; + end loop; end if; return false; end Is_In; - function Number_of_Paths ( root : Nodal_Pair ) return natural is + function Number_of_Paths ( root : Nodal_Pair ) return natural32 is - res : natural := root.sols; + res : natural32 := root.sols; begin for j1 in root.children'range(1) loop for j2 in root.children'range(2) loop - if root.children(j1,j2) /= null - then if not At_Leaves(root.children(j1,j2).pnd) - then res := res + Number_of_Paths(root.children(j1,j2).all); - end if; + if root.children(j1,j2) /= null then + if not At_Leaves(root.children(j1,j2).pnd) + then res := res + Number_of_Paths(root.children(j1,j2).all); + end if; end if; end loop; end loop; @@ -276,7 +281,7 @@ put(file,","); put(file,chn(chn'last).right.node); put_line(file,")"); end Write; - function Last_Child ( np : Nodal_Pair; i,j : natural ) return boolean is + function Last_Child ( np : Nodal_Pair; i,j : integer32 ) return boolean is -- DESCRIPTION : -- Returns true if the (i,j)th child is the last child of the node. @@ -298,14 +303,14 @@ end Last_Child; procedure Write_Labels ( file : in file_type; np : in Nodal_Pair; - j1,j2,h : in natural; last : in Boolean_Array ) is + j1,j2,h : in integer32; last : in Boolean_Array ) is -- DESCRIPTION : -- Writes the contents of the nodal pair with the jumps, taking into -- account which children appeared last. -- The current node is at height h in the nodal pair tree. - first : Paired_Nodes := First_Branch_Point(np.pnd); + -- first : Paired_Nodes := First_Branch_Point(np.pnd); begin if h /= 0 @@ -317,10 +322,10 @@ else put(file,"| "); end if; end loop; - if h /= 0 - then put(file,"!-+("); - put(file,j1,1); put(file,","); put(file,j2,1); - put(file,")"); + if h /= 0 then + put(file,"!-+("); + put(file,j1,1); put(file,","); put(file,j2,1); + put(file,")"); end if; put(file,"("); put(file,np.pnd.left.node); put(file,","); put(file,np.pnd.right.node); @@ -330,7 +335,8 @@ end Write_Labels; procedure Write_Nodes ( file : in file_type; np : in Nodal_Pair; - j1,j2,h : in natural; last : in out Boolean_Array ) is + j1,j2,h : in integer32; + last : in out Boolean_Array ) is -- DESCRIPTION : -- Writes the contents of the nodal pair, followed by the children. @@ -339,9 +345,9 @@ Write_Labels(file,np,j1,j2,h,last); for jj1 in np.children'range(1) loop for jj2 in np.children'range(2) loop - if np.children(jj1,jj2) /= null - then last(h+1) := Last_Child(np,jj1,jj2); - Write_Nodes(file,np.children(jj1,jj2).all,jj1,jj2,h+1,last); + if np.children(jj1,jj2) /= null then + last(h+1) := Last_Child(np,jj1,jj2); + Write_Nodes(file,np.children(jj1,jj2).all,jj1,jj2,h+1,last); end if; end loop; end loop; @@ -349,7 +355,7 @@ procedure Write ( file : in file_type; root : in Nodal_Pair ) is - last : Boolean_Array(1..Height(root)+1); + last : Boolean_Array(1..integer32(Height(root))+1); begin Write_Nodes(file,root,1,1,0,last); diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_root_counts.ads phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_root_counts.ads --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_root_counts.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_root_counts.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,6 @@ with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Generic_Lists; with Pieri_Trees; use Pieri_Trees; @@ -25,23 +27,23 @@ package Lists_of_Paired_Nodes is new Generic_Lists(Paired_Nodes); type List_of_Paired_Nodes is new Lists_of_Paired_Nodes.List; - type Paired_Chain is array ( integer range <> ) of Paired_Nodes; + type Paired_Chain is array ( integer32 range <> ) of Paired_Nodes; type Nodal_Pair; type Link_to_Nodal_Pair is access Nodal_Pair; - type Nodal_Matrix - is array (integer range <>,integer range <>) of Link_to_Nodal_Pair; + type Nodal_Matrix is + array (integer32 range <>,integer32 range <>) of Link_to_Nodal_Pair; - type Nodal_Pair ( d : natural ) is record + type Nodal_Pair ( d : integer32 ) is record pnd : Paired_Nodes; - sols : natural; -- #paths arriving at the node + sols : natural32; -- #paths arriving at the node children : Nodal_Matrix(0..d,0..d); -- indices in children are jumps ancestor : Link_to_Nodal_Pair; end record; -- CREATORS : - function Create ( n,d : natural; t1,t2 : Pieri_Tree ) + function Create ( n,d : integer32; t1,t2 : Pieri_Tree ) return List_of_Paired_Nodes; -- DESCRIPTION : @@ -54,7 +56,8 @@ -- and end at the given pair of leaves pnd. -- This is an intermediate data structure in the Create operation below. - function Create ( d : natural; lp : List_of_Paired_Nodes ) return Nodal_Pair; + function Create + ( d : integer32; lp : List_of_Paired_Nodes ) return Nodal_Pair; -- DESCRIPTION : -- Creates a tree of nodal pairs and returns its root. @@ -63,7 +66,7 @@ -- SELECTORS : - function Height ( pnd : Paired_Nodes ) return natural; + function Height ( pnd : Paired_Nodes ) return natural32; -- DESCRIPTION : -- Returns Max(pnd.left.h,pnd.right.h). @@ -95,7 +98,7 @@ -- Returns the pair of nodes down in the chains of pnd where the -- first branch point occurs. - function Height ( np : Nodal_Pair ) return natural; + function Height ( np : Nodal_Pair ) return natural32; -- DESCRIPTION : -- Returns the number of nodes above the current nodal pair. @@ -106,7 +109,7 @@ -- Returns true if the paired nodes occur somewhere in the tree of -- nodal pairs starting at the root. - function Number_of_Paths ( root : Nodal_Pair ) return natural; + function Number_of_Paths ( root : Nodal_Pair ) return natural32; -- DESCRIPTION : -- Returns the number of paths that need to be followed. diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees.adb 2021-06-30 23:22:40.000000000 +0000 @@ -4,7 +4,7 @@ -- UTILITIES FOR CREATION OF Pieri Trees : - function Index_of_Increase ( nd : Pieri_Node ) return natural is + function Index_of_Increase ( nd : Pieri_Node ) return integer32 is -- DESCRIPTION : -- Returns the index of increase between the current node nd and the @@ -14,39 +14,40 @@ bnd : Link_to_Pieri_Node; begin - if nd.ancestor = null - then return 0; - else bnd := nd.ancestor; - for i in nd.node'range loop - if bnd.node(i) = nd.node(i)-1 - then return i; - end if; - end loop; - return 0; + if nd.ancestor = null then + return 0; + else + bnd := nd.ancestor; + for i in nd.node'range loop + if bnd.node(i) = nd.node(i)-1 + then return i; + end if; + end loop; + return 0; end if; end Index_of_increase; - function Branching_Level ( l : natural; r : Vector ) return boolean is + function Branching_Level ( l : integer32; r : Vector ) return boolean is -- DESCRIPTION : -- Returns true if the current level l is a level where decreasing -- is allowed. - bl : natural := 1; + bl : integer32 := 1; begin for i in r'first..r'last-1 loop - bl := bl + r(i); - if bl = l - then return true; - elsif bl > l - then return false; + bl := bl + integer32(r(i)); + if bl = l then + return true; + elsif bl > l then + return false; end if; end loop; return false; end Branching_Level; - procedure Create_Next ( n,d,l,h : in natural; r : in Vector; + procedure Create_Next ( n,d,l,h : in integer32; r : in Vector; nd : in out Link_to_Pieri_Node ) is -- DESCRIPTION : @@ -62,68 +63,67 @@ -- ON RETURN : -- nd node with updated links. - indinc : constant natural := Index_of_Increase(nd.all); + indinc : constant integer32 := Index_of_Increase(nd.all); begin - if Branching_Level(l,r) -- test if jumping-branching node - then nd.i := 0; - nd.c := nd.ancestor.c + 1; + if Branching_Level(l,r) then -- test if jumping-branching node + nd.i := 0; + nd.c := nd.ancestor.c + 1; end if; - if nd.node(d) < n -- create right node - then declare + if integer32(nd.node(d)) < n then -- create right node + declare + rnd : Pieri_Node(d); + lnd : Link_to_Pieri_Node; + begin + rnd.node := nd.node; -- adjust entries + rnd.node(d) := rnd.node(d)+1; + rnd.c := nd.c; + rnd.i := nd.i + 1; + rnd.h := nd.h + 1; + lnd := new Pieri_Node'(rnd); + lnd.ancestor := nd; -- establish connections + nd.children(d) := lnd; + if l < h -- go to next level + then Create_Next(n,d,l+1,h,r,lnd); + end if; + end; + end if; + for i in nd.node'first..(nd.node'last-1) loop + if nd.node(i) < nd.node(i+1) - 1 then + if ((i >= indinc) or else ((nd.i = 0) and (nd.c > 0))) then + declare -- jumping-branching, create node rnd : Pieri_Node(d); lnd : Link_to_Pieri_Node; begin rnd.node := nd.node; -- adjust entries - rnd.node(d) := rnd.node(d)+1; + rnd.node(i) := rnd.node(i)+1; rnd.c := nd.c; rnd.i := nd.i + 1; rnd.h := nd.h + 1; lnd := new Pieri_Node'(rnd); - lnd.ancestor := nd; -- establish connections - nd.children(d) := lnd; - if l < h -- go to next level + lnd.ancestor := nd; -- establish connections + nd.children(i) := lnd; + if l < h -- go to next level then Create_Next(n,d,l+1,h,r,lnd); end if; end; - end if; - for i in nd.node'first..(nd.node'last-1) loop - if nd.node(i) < nd.node(i+1) - 1 - then if ((i >= indinc) - or else ((nd.i = 0) and (nd.c > 0))) -- jumping-branching - then declare -- create node - rnd : Pieri_Node(d); - lnd : Link_to_Pieri_Node; - begin - rnd.node := nd.node; -- adjust entries - rnd.node(i) := rnd.node(i)+1; - rnd.c := nd.c; - rnd.i := nd.i + 1; - rnd.h := nd.h + 1; - lnd := new Pieri_Node'(rnd); - lnd.ancestor := nd; -- establish connections - nd.children(i) := lnd; - if l < h -- go to next level - then Create_Next(n,d,l+1,h,r,lnd); - end if; - end; - end if; + end if; end if; end loop; end Create_Next; -- CREATOR : - function Create ( n,d : natural; r : Vector ) return Pieri_Tree is + function Create ( n,d : natural32; r : Vector ) return Pieri_Tree is - res : Pieri_Tree(d,r'last); - hei : natural; - pnd : Pieri_Node(d); + res : Pieri_Tree(integer32(d),r'last); + hei : natural32; + pnd : Pieri_Node(integer32(d)); begin res.branches := r; for i in pnd.node'range loop -- root node = [1 2 .. d] - pnd.node(i) := i; + pnd.node(i) := natural32(i); end loop; pnd.c := 0; pnd.i := 0; @@ -131,17 +131,17 @@ res.root := new Pieri_Node'(pnd); res.root.ancestor := null; hei := Height(res); - if hei > 0 - then Create_Next(n,d,1,hei,r,res.root); -- create children + if hei > 0 -- create children + then Create_Next(integer32(n),integer32(d),1,integer32(hei),r,res.root); end if; return res; end Create; -- SELECTORS : - function Height ( t : Pieri_Tree ) return natural is + function Height ( t : Pieri_Tree ) return natural32 is - res : natural := 0; + res : natural32 := 0; begin for i in t.branches'range loop @@ -160,7 +160,7 @@ return true; end Is_Leaf; - function Jump ( b1,b2 : Bracket ) return natural is + function Jump ( b1,b2 : Bracket ) return integer32 is begin for i in reverse b1'range loop if b1(i) < b2(i) @@ -170,7 +170,7 @@ return 0; end Jump; - function Jump ( nd : Pieri_Node ) return natural is + function Jump ( nd : Pieri_Node ) return integer32 is begin if nd.ancestor = null then return 0; @@ -180,48 +180,52 @@ function Lower_Jump_Decrease ( nd : Pieri_Node ) return Bracket is begin - if ((nd.i = 0) or else (nd.c = 0)) - then return nd.node; - elsif nd.ancestor /= null - then return Lower_Jump_Decrease(nd.ancestor.all); - else return nd.node; + if ((nd.i = 0) or else (nd.c = 0)) then + return nd.node; + elsif nd.ancestor /= null then + return Lower_Jump_Decrease(nd.ancestor.all); + else + return nd.node; end if; end Lower_Jump_Decrease; function Lowest_Jump_Decrease ( nd : Pieri_Node ) return Bracket is begin - if (nd.c = 0) or ((nd.i = 0) and (nd.c = 1)) - then return nd.node; - elsif nd.ancestor /= null - then return Lowest_Jump_Decrease(nd.ancestor.all); - else return nd.node; + if (nd.c = 0) or ((nd.i = 0) and (nd.c = 1)) then + return nd.node; + elsif nd.ancestor /= null then + return Lowest_Jump_Decrease(nd.ancestor.all); + else + return nd.node; end if; end Lowest_Jump_Decrease; function Upper_Jump_Decrease ( nd : Pieri_Node ) return Bracket is begin - if ((nd.i = 0) or else (nd.c = 0)) - then return nd.node; - elsif nd.children(nd.node'last) /= null - then return Upper_Jump_Decrease(nd.children(nd.node'last).all); - else return nd.node; + if ((nd.i = 0) or else (nd.c = 0)) then + return nd.node; + elsif nd.children(nd.node'last) /= null then + return Upper_Jump_Decrease(nd.children(nd.node'last).all); + else + return nd.node; end if; end Upper_Jump_Decrease; - procedure Enumerate_Nodes ( t : in Pieri_Tree; level : in natural ) is + procedure Enumerate_Nodes ( t : in Pieri_Tree; level : in natural32 ) is continue : boolean := true; procedure Visit_Nodes ( nd : in Link_to_Pieri_Node ) is begin - if nd.h = level - then Visit_Node(nd,continue); - else for i in nd.children'range loop - if nd.children(i) /= null - then Visit_Nodes(nd.children(i)); - end if; - exit when not continue; - end loop; + if nd.h = level then + Visit_Node(nd,continue); + else + for i in nd.children'range loop + if nd.children(i) /= null + then Visit_Nodes(nd.children(i)); + end if; + exit when not continue; + end loop; end if; end Visit_Nodes; @@ -233,20 +237,21 @@ procedure Enumerate_Chains ( t : in Pieri_Tree ) is - b : Bracket_Array(1..Height(t)); + b : Bracket_Array(1..integer32(Height(t))); continue : boolean := true; - procedure Visit_Nodes ( nd : in Pieri_Node; ind : in natural ) is + procedure Visit_Nodes ( nd : in Pieri_Node; ind : in integer32 ) is begin b(ind) := new Bracket'(nd.node); - if ind = b'last - then Visit_Chain(b,continue); - else for i in nd.children'range loop - if nd.children(i) /= null - then Visit_Nodes(nd.children(i).all,ind+1); - end if; - exit when not continue; - end loop; + if ind = b'last then + Visit_Chain(b,continue); + else + for i in nd.children'range loop + if nd.children(i) /= null + then Visit_Nodes(nd.children(i).all,ind+1); + end if; + exit when not continue; + end loop; end if; end Visit_Nodes; @@ -279,7 +284,8 @@ Outer_Chains(t1); end Enumerate_Paired_Chains; - function Pieri_Condition ( n : natural; b1,b2 : Bracket ) return boolean is + function Pieri_Condition + ( n : natural32; b1,b2 : Bracket ) return boolean is begin for i in b2'range loop if b2(i) > n+1 - b1(b1'last+1-i) -- negation of weak inequality diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees.ads phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees.ads --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees.ads 2021-06-30 23:22:40.000000000 +0000 @@ -68,13 +68,13 @@ -- DESCRIPTION : -- Returns true if the node has no children. - function Jump ( b1,b2 : Bracket ) return natural32; + function Jump ( b1,b2 : Bracket ) return integer32; -- DESCRIPTION : -- Returns the largest index j such that b1(j) < b2(j), -- or zero when no such index exists. - function Jump ( nd : Pieri_Node ) return natural32; + function Jump ( nd : Pieri_Node ) return integer32; -- DESCRIPTION : -- Returns the largest index of increase with the ancestor nodes, diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees_io.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees_io.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees_io.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees_io.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,10 +1,12 @@ -with integer_io; use integer_io; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; with Standard_Natural_Vectors_io; use Standard_Natural_Vectors_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Brackets_io; use Brackets_io; package body Pieri_Trees_io is - type Boolean_Array is array ( integer range <> ) of boolean; + type Boolean_Array is array ( integer32 range <> ) of boolean; procedure put ( nd : in Pieri_Node ) is begin @@ -27,9 +29,9 @@ procedure put ( file : in file_type; lnd : in Link_to_Pieri_Node ) is begin put(file,lnd.all); - if lnd.ancestor /= null - then put(file," > "); - put(file,lnd.ancestor); + if lnd.ancestor /= null then + put(file," > "); + put(file,lnd.ancestor); end if; end put; @@ -38,13 +40,13 @@ put(Standard_Output,t); end put; - procedure put ( t : in Pieri_Tree; level : in natural ) is + procedure put ( t : in Pieri_Tree; level : in natural32 ) is begin put(Standard_Output,t,level); end put; procedure put ( file : in file_type; - t : in Pieri_Tree; level : in natural ) is + t : in Pieri_Tree; level : in natural32 ) is procedure Write_Node ( lnd : in Link_to_Pieri_Node; continue : out boolean ) is @@ -60,7 +62,7 @@ procedure put ( file : in file_type; t : in Pieri_Tree ) is - h : constant natural := Height(t); + h : constant natural32 := Height(t); begin put(file,"Branching at "); put(file,t.branches); new_line(file); @@ -71,7 +73,7 @@ end loop; end put; - function Last_Child ( nd : Pieri_Node; i : natural ) return boolean is + function Last_Child ( nd : Pieri_Node; i : integer32 ) return boolean is -- DESCRIPTION : -- Returns true if the ith child is the last child of the node. @@ -86,7 +88,7 @@ end Last_Child; procedure Write_Labels ( file : in file_type; - nd : in Pieri_Node; jump : in natural; + nd : in Pieri_Node; jump : in integer32; last : in Boolean_Array ) is -- DESCRIPTION : @@ -97,7 +99,7 @@ if nd.h /= 0 then put(file," "); end if; - for i in 1..(nd.h-1) loop + for i in 1..(integer32(nd.h)-1) loop if last(i) then put(file," "); else put(file,"| "); @@ -111,7 +113,7 @@ end Write_Labels; procedure Write_Nodes ( file : in file_type; - nd : in Pieri_Node; jump : in natural; + nd : in Pieri_Node; jump : in integer32; last : in out Boolean_Array ) is -- DESCRIPTION : @@ -121,9 +123,9 @@ begin Write_Labels(file,nd,jump,last); for i in nd.children'range loop - if nd.children(i) /= null - then last(nd.h+1) := Last_Child(nd,i); - Write_Nodes(file,nd.children(i).all,i,last); + if nd.children(i) /= null then + last(integer32(nd.h)+1) := Last_Child(nd,i); + Write_Nodes(file,nd.children(i).all,i,last); end if; end loop; end Write_Nodes; @@ -135,7 +137,7 @@ procedure Write_Tree ( file : in file_type; t : in Pieri_Tree ) is - last : Boolean_Array(1..Height(t)); + last : Boolean_Array(1..integer32(Height(t))); begin Write_Nodes(file,t.root.all,0,last); diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees_io.ads phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees_io.ads --- phcpack-2.4.84/src/Ada/Schubert/Pieri/pieri_trees_io.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/pieri_trees_io.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; with Pieri_Trees; use Pieri_Trees; package Pieri_Trees_io is @@ -24,8 +25,9 @@ -- DESCRIPTION : -- Writes all nodes of the Pieri tree, level by level. - procedure put ( t : in Pieri_Tree; level : in natural ); - procedure put ( file : in file_type; t : in Pieri_Tree; level : in natural ); + procedure put ( t : in Pieri_Tree; level : in natural32 ); + procedure put ( file : in file_type; t : in Pieri_Tree; + level : in natural32 ); -- DESCRIPTION : -- Writes all nodes of the Pieri tree at the indicated level. diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/READ_ME phcpack-2.4.85/src/Ada/Schubert/Pieri/READ_ME --- phcpack-2.4.84/src/Ada/Schubert/Pieri/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Numerical Schubert Calculus using Pieri homotopies with PHCv2.4.83 +Numerical Schubert Calculus using Pieri homotopies with PHCv2.4.85 This directory was delivered with release 2 of PHCpack. Release 2.1 has only minor updates to facilitate the connection with C. @@ -9,6 +9,11 @@ 2) poset-based organization of the Pieri homotopies The test programs are grouped per part. +Run "gprbuild pieri.gpr" to make all test programs. +On windows, type "gprbuild pieri.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean pieri.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/solve_pieri_leaves.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/solve_pieri_leaves.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/solve_pieri_leaves.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/solve_pieri_leaves.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,8 @@ +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Numbers; use Standard_Complex_Numbers; with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; -with Standard_Natural_Vectors; +with Standard_Integer_Vectors; with Standard_Complex_Vectors; with Standard_Complex_Linear_Solvers; use Standard_Complex_Linear_Solvers; @@ -8,9 +10,9 @@ ( file : file_type; b1,b2 : Bracket; m : Matrix ) return Matrix is res : Matrix(m'range(1),b1'range); - n : constant natural := m'last(1); - dim : constant natural := m'last(2)-1; -- dimension of linear system - equ : Bracket(1..dim); -- equations : res(equ(i),*) = 0 + n : constant integer32 := m'last(1); + dim : constant integer32 := m'last(2)-1; -- dimension of linear system + equ : Bracket(1..dim); -- equations : res(equ(i),*) = 0 sys : Matrix(1..dim,1..dim); rhs : Standard_Complex_Vectors.Vector(1..dim); gen : Standard_Complex_Vectors.Vector(1..n); @@ -22,21 +24,21 @@ -- equations that the resulting plane has to satisfy. -- These equations define the space C. - cnt : natural := 0; + cnt : integer32 := 0; zero_row : boolean; begin for i in 1..n loop zero_row := true; for j in b1'range loop - if ((i < b2(j)) or (i > n+1-b1(b1'last+1-j))) + if ((i < integer32(b2(j))) or (i > n+1-integer32(b1(b1'last+1-j)))) then null; else zero_row := false; end if; end loop; - if zero_row - then cnt := cnt+1; - equ(cnt) := i; + if zero_row then + cnt := cnt+1; + equ(cnt) := natural32(i); end if; end loop; end Initialize_Solution_Plane; @@ -50,21 +52,21 @@ -- determines the generator for the line of intersection with the -- space C and the given m-plane. - ipvt : Standard_Natural_Vectors.Vector(1..dim); - info : natural; + ipvt : Standard_Integer_Vectors.Vector(1..dim); + info : integer32; -- orgsys : Standard_Complex_Matrices.Matrix(1..dim,1..dim); -- orgrhs,resi : Standard_Complex_Vectors.Vector(1..dim); - use Standard_Complex_Vectors,Standard_Complex_Matrices; + use Standard_Complex_Vectors; begin for j in 1..dim loop for i in equ'range loop - sys(i,j) := m(equ(i),j); + sys(i,j) := m(integer32(equ(i)),j); end loop; end loop; -- orgsys := sys; for i in 1..dim loop - rhs(i) := m(equ(i),m'last(2)); + rhs(i) := m(integer32(equ(i)),m'last(2)); end loop; -- orgrhs := rhs; lufac(sys,dim,ipvt,info); @@ -93,7 +95,7 @@ begin for i in 1..n loop for j in b1'range loop - if ((i < b2(j)) or (i > n+1-b1(b1'last+1-j))) + if ((i < integer32(b2(j))) or (i > n+1-integer32(b1(b1'last+1-j)))) then res(i,j) := Create(0.0); else res(i,j) := gen(i); end if; diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/ts_org_pieri.adb phcpack-2.4.85/src/Ada/Schubert/Pieri/ts_org_pieri.adb --- phcpack-2.4.84/src/Ada/Schubert/Pieri/ts_org_pieri.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/ts_org_pieri.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,10 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Natural_Vectors; use Standard_Natural_Vectors; with Standard_Natural_Vectors_io; use Standard_Natural_Vectors_io; @@ -21,14 +25,14 @@ with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; with Matrix_Indeterminates; use Matrix_Indeterminates; -with Drivers_for_Poly_Continuation; use Drivers_for_Poly_Continuation; +with Main_Poly_Continuation; use Main_Poly_Continuation; with Brackets,Brackets_io; use Brackets,Brackets_io; with Bracket_Monomials; use Bracket_Monomials; with Bracket_Monomials_io; use Bracket_Monomials_io; with Bracket_Expansions; use Bracket_Expansions; -with Bracket_Polynomials; use Bracket_Polynomials; -with Bracket_Polynomials_io; use Bracket_Polynomials_io; -with Bracket_Systems; use Bracket_Systems; +with Standard_Bracket_Polynomials; use Standard_Bracket_Polynomials; +with Standard_Bracket_Polynomials_io; use Standard_Bracket_Polynomials_io; +with Standard_Bracket_Systems; use Standard_Bracket_Systems; with Pieri_Trees,Pieri_Trees_io; use Pieri_Trees,Pieri_Trees_io; with Pieri_Root_Counts; use Pieri_Root_Counts; with Symbolic_Minor_Equations; use Symbolic_Minor_Equations; @@ -45,7 +49,7 @@ -- the paper "Numerical Schubert Calculus" of Birkett Huber, Frank Sottile -- and Bernd Sturmfels. - function Maximum ( n1,n2 : natural ) return natural is + function Maximum ( n1,n2 : natural32 ) return natural32 is begin if n1 >= n2 then return n1; @@ -72,13 +76,13 @@ -- DISPLAYING THE REPRESENTATIONS OF THE PLANES : procedure Display_Polynomial_Pattern - ( file : in file_type; n : in natural; b1,b2 : in Bracket ) is + ( file : in file_type; n : in integer32; b1,b2 : in Bracket ) is -- DESCRIPTION : -- Displays the pattern by a polynomial matrix. pm : Standard_Complex_Poly_Matrices.Matrix(1..n,b1'range) - := Schubert_Pattern(n,b1,b2); + := Schubert_Pattern(natural32(n),b1,b2); begin put(file,pm); @@ -144,16 +148,16 @@ end Expand_Minors; procedure Pieri_Equations - ( file : in file_type; n,d : in natural; bs : in Bracket_System; - b1,b2 : in Bracket ) is + ( file : in file_type; n,d : in integer32; + bs : in Bracket_System; b1,b2 : in Bracket ) is -- DESCRIPTION : -- Writes the Pieri equations corresponding to the pair of brackets. - cffmat : Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) - := Random_Matrix(n,n-d); + cffmat : constant Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) + := Random_Matrix(natural32(n),natural32(n-d)); polmat : Standard_Complex_Poly_Matrices.Matrix(1..n,1..d) - := Schubert_Pattern(n,b1,b2); + := Schubert_Pattern(natural32(n),b1,b2); sys : Poly_Sys(bs'first+1..bs'last); sol : Standard_Complex_Matrices.Matrix(1..n,1..d); @@ -175,16 +179,17 @@ sys := Expanded_Minors(cffmat,polmat,bs); put_line(sys); Standard_Complex_Poly_Matrices.Clear(polmat); - if Pieri_Condition(n,b1,b2) - then put("The "); put(d,1); put_line("-plane at the leaves :"); - sol := Solve_Pieri_Leaves(Standard_Output,b1,b2,cffmat); put(sol); - put_line("The solution evaluated at the system : "); - put(Evaluate(sys,sol)); new_line; - else put_line("Pair of leaves does not satisfy Pieri's condition."); + if Pieri_Condition(natural32(n),b1,b2) then + put("The "); put(d,1); put_line("-plane at the leaves :"); + sol := Solve_Pieri_Leaves(Standard_Output,b1,b2,cffmat); put(sol); + put_line("The solution evaluated at the system : "); + put(Evaluate(sys,sol)); new_line; + else + put_line("Pair of leaves does not satisfy Pieri's condition."); end if; end Pieri_Equations; - procedure Expand_Minors ( n,d : in natural; bs : in Bracket_System ) is + procedure Expand_Minors ( n,d : in integer32; bs : in Bracket_System ) is -- DESCRIPTION : -- Expands the minors to obtain a symbolic formulation of the equations. @@ -198,17 +203,18 @@ end Expand_Minors; procedure Pieri_Equations_for_Paired_Chains - ( file : in file_type; n,d : in natural; bs : in Bracket_System; - b1,b2 : in bracket_Array ) is + ( file : in file_type; n,d : in integer32; + bs : in Bracket_System; b1,b2 : in bracket_Array ) is -- DESCRIPTION : -- Writes the equations for each node along a pair of chains. - maxlen : constant natural := Maximum(b1'last,b2'last); + maxlen : constant natural32 + := Maximum(natural32(b1'last),natural32(b2'last)); lb1,lb2 : Link_to_Bracket; begin - for i in b1'first..maxlen loop + for i in b1'first..integer32(maxlen) loop if i <= b1'last then lb1 := b1(i); else lb1 := b1(b1'last); @@ -222,8 +228,8 @@ end Pieri_Equations_for_Paired_Chains; procedure Write_Pieri_Equations - ( file : in file_type; n,d : in natural; t1,t2 : in Pieri_Tree; - bs : in Bracket_System ) is + ( file : in file_type; n,d : in integer32; + t1,t2 : in Pieri_Tree; bs : in Bracket_System ) is -- DESCRIPTION : -- Writes the Pieri Equations for all pairs of chains. @@ -240,9 +246,9 @@ end Write_Pieri_Equations; procedure Write_Pieri_Equations - ( n,d : in natural; t1,t2 : in Pieri_Tree ) is + ( n,d : in integer32; t1,t2 : in Pieri_Tree ) is - k,kd : natural; + k,kd : integer32 := 0; bm : Bracket_Monomial; file : file_type; @@ -252,10 +258,11 @@ Read_Name_and_Create_File(file); put("Give k to determine (m-k+1)-plane : "); get(k); kd := n-k+1; - bm := Maximal_Minors(n,kd); -- because n = m+p + bm := Maximal_Minors(natural32(n),natural32(kd)); -- because n = m+p put(file,"All maximal minors : "); put(file,bm); new_line(file); declare - bs : constant Bracket_System := Minor_Equations(kd,kd-d,bm); + bs : constant Bracket_System + := Minor_Equations(natural32(kd),natural32(kd-d),bm); begin put_line(file,"The generic equation in the Laplace expansion : "); put(file,bs(0)); @@ -297,17 +304,18 @@ procedure Write_Polynomial_Patterns ( file : in file_type; - n : in natural; b1,b2 : in Bracket_Array ) is + n : in integer32; b1,b2 : in Bracket_Array ) is -- DESCRIPTION : -- Writes the two chains in a paired fashion. If they have unequal -- length, then the last element of the shortest chain appears repeated. - maxlen : constant natural := Maximum(b1'last,b2'last); + maxlen : constant natural32 + := Maximum(natural32(b1'last),natural32(b2'last)); lb1,lb2 : Link_to_Bracket; begin - for i in b1'first..maxlen loop + for i in b1'first..integer32(maxlen) loop put(file,"("); if i <= b1'last then lb1 := b1(i); @@ -325,18 +333,19 @@ procedure Write_Paired_Chain ( file : in file_type; - n : in natural; b1,b2 : in Bracket_Array ) is + n : in integer32; b1,b2 : in Bracket_Array ) is -- DESCRIPTION : -- Writes the two chains in a paired fashion. If they have unequal -- length, then the last element of the shortest chain appears repeated. - maxlen : constant natural := Maximum(b1'last,b2'last); + maxlen : constant natural32 + := Maximum(natural32(b1'last),natural32(b2'last)); begin put(file,"("); put(file,b1(b1'first).all); put(file,","); put(file,b2(b2'first).all); put(file,")"); - for i in b1'first+1..maxlen loop + for i in b1'first+1..integer32(maxlen) loop put(file," < "); put(file,"("); if i <= b1'last then put(file,b1(i).all); @@ -351,13 +360,14 @@ end loop; new_line(file); Write_Polynomial_Patterns(Standard_Output,n,b1,b2); - if Pieri_Condition(n,b1(b1'last).all,b2(b2'last).all) + if Pieri_Condition(natural32(n),b1(b1'last).all,b2(b2'last).all) then put_line("Leaves satisfy Pieri's condition."); else put_line("Leaves do not satisfy Pieri's condition."); end if; end Write_Paired_Chain; - procedure Write_Pieri_Chains ( n : in natural; t1,t2 : in Pieri_Tree ) is + procedure Write_Pieri_Chains + ( n : in integer32; t1,t2 : in Pieri_Tree ) is -- DESCRIPTION : -- Enumerates all pairs of chains and checks Pieri's condition @@ -375,12 +385,13 @@ end Write_Pieri_Chains; function First_Standard_Plane - ( n,m,r : natural ) return Standard_Complex_Matrices.Matrix is + ( n,m,r : integer32 ) return Standard_Complex_Matrices.Matrix is -- DESCRIPTION : -- Returns the plane spanned by the first m+1-r standard basis vectors. - res : Standard_Complex_Matrices.Matrix := Random_Matrix(n,m+1-r); + res : Standard_Complex_Matrices.Matrix + := Random_Matrix(natural32(n),natural32(m+1-r)); begin for i in res'range(1) loop @@ -395,12 +406,13 @@ end First_Standard_Plane; function Last_Standard_Plane - ( n,m,r : natural ) return Standard_Complex_Matrices.Matrix is + ( n,m,r : integer32 ) return Standard_Complex_Matrices.Matrix is -- DESCRIPTION : -- Returns the plane spanned by the first m+1-r standard basis vectors. - res : Standard_Complex_Matrices.Matrix := Random_Matrix(n,m+1-r); + res : Standard_Complex_Matrices.Matrix + := Random_Matrix(natural32(n),natural32(m+1-r)); begin for i in res'range(1) loop @@ -415,7 +427,7 @@ end Last_Standard_Plane; function First_Random_Input_Sequence - ( n,m,a : natural; kp : Vector ) return VecMat is + ( n,m,a : integer32; kp : Vector ) return VecMat is -- DESCRIPTION : -- Returns the first sequence of random input planes. The first plane @@ -426,16 +438,17 @@ begin res(0) := new Standard_Complex_Matrices.Matrix' - (First_Standard_Plane(n,m,kp(1))); + (First_Standard_Plane(n,m,integer32(kp(1)))); for i in 1..res'last loop res(i) := new Standard_Complex_Matrices.Matrix' - (Random_Matrix(n,m+1-kp(i+1))); + (Random_Matrix(natural32(n), + natural32(m)+1-natural32(kp(i+1)))); end loop; return res; end First_Random_Input_Sequence; function Second_Random_Input_Sequence - ( n,m,a : natural; kp : Vector ) return VecMat is + ( n,m,a : integer32; kp : Vector ) return VecMat is -- DESCRIPTION : -- Returns the second sequence of random input planes. The first plane @@ -445,10 +458,11 @@ begin res(0) := new Standard_Complex_Matrices.Matrix' - (Last_Standard_Plane(n,m,kp(1))); + (Last_Standard_Plane(n,m,integer32(kp(1)))); for i in 1..res'last loop res(i) := new Standard_Complex_Matrices.Matrix' - (Random_Matrix(n,m+1-kp(a+1+i))); + (Random_Matrix(natural32(n), + natural32(m)+1-natural32(kp(a+1+i)))); end loop; return res; end Second_Random_Input_Sequence; @@ -504,7 +518,7 @@ -- DESCRIPTION : -- Interactive determination of the continuation and output parameters. - oc : natural; + oc : natural32; begin new_line; @@ -521,21 +535,21 @@ -- Returns a selection of the list of pairs. res,res_last : List_of_Paired_Nodes; - k : natural; + k : integer32 := 0; tmp : List_of_Paired_Nodes := lps; begin put("Give the number of pairs : "); get(k); declare sel : Standard_Natural_Vectors.Vector(1..k); - ind : natural := 1; + ind : integer32 := 1; begin put("Give an increasing sequence of "); put(k,1); put(" numbers : "); get(sel); for i in 1..Length_Of(lps) loop - if i = sel(ind) - then ind := ind+1; - Append(res,res_last,Head_Of(tmp)); + if i = sel(ind) then + ind := ind+1; + Append(res,res_last,Head_Of(tmp)); end if; tmp := Tail_Of(tmp); end loop; @@ -560,7 +574,7 @@ end loop; end put; - procedure Root_Count ( n,d,a : in natural; kp : in Vector ) is + procedure Root_Count ( n,d,a : in integer32; kp : in Vector ) is -- DESCRIPTION : -- Set up of Pieri trees from a partition of the planes. @@ -575,23 +589,24 @@ file : file_type; timer : Timing_Widget; ans : character; - m : constant natural := n-d; - v1 : Vector(0..a-1) := kp(1..a); - t1 : Pieri_Tree(d,a-1) := Create(n,d,v1); - a2 : constant natural := kp'last-a-1; - v2 : Vector(0..a2-1) := kp(a+1..kp'last-1); - t2 : Pieri_Tree(d,a2) := Create(n,d,v2); + m : constant integer32 := n-d; + v1 : constant Vector(0..a-1) := kp(1..a); + t1 : Pieri_Tree(d,a-1) := Create(natural32(n),natural32(d),v1); + a2 : constant integer32 := kp'last-a-1; + v2 : constant Vector(0..a2-1) := kp(a+1..kp'last-1); + t2 : Pieri_Tree(d,a2) := Create(natural32(n),natural32(d),v2); lp : List_of_Paired_Nodes := Create(n,d,t1,t2); - np : Nodal_Pair(d) := Create(d,lp); + np : constant Nodal_Pair(d) := Create(d,lp); sel_lp : List_of_Paired_Nodes; - rc : constant natural := Length_Of(lp); - nb : constant natural := Number_of_Paths(np); + rc : constant natural32 := Length_Of(lp); + nb : constant natural32 := Number_of_Paths(np); l1 : VecMat(0..a-1) := First_Random_Input_Sequence(n,m,a,kp); l2 : VecMat(0..kp'last-a-2) := Second_Random_Input_Sequence(n,m,a,kp); - ln : Standard_Complex_Matrices.Matrix(1..n,1..m+1-kp(kp'last)) - := Random_Matrix(n,m+1-kp(kp'last)); + ln : Standard_Complex_Matrices.Matrix(1..n,1..m+1-integer32(kp(kp'last))) + := Random_Matrix(natural32(n), + natural32(m)+1-natural32(kp(kp'last))); report,outlog : boolean; - sols : VecMat(1..rc); + sols : VecMat(1..integer32(rc)); begin skip_line; @@ -652,10 +667,11 @@ put(file,l2,2); put_line(file,"The last random input plane :"); put(file,ln,2); put_line(file,"Starting the deformations at the paired leaves."); - Matrix_Indeterminates.Initialize_Symbols(n,d); + Matrix_Indeterminates.Initialize_Symbols(natural32(n),natural32(d)); Add_t_Symbol; tstart(timer); - Deform_Pairs(file,n,d,sel_lp,l1,l2,ln,report,outlog,sols); + Deform_Pairs(file,natural32(n),natural32(d),sel_lp,l1,l2,ln,report, + outlog,sols); tstop(timer); new_line(file); print_times(file,timer,"Pieri Deformations"); @@ -667,25 +683,24 @@ -- FIVE MAJOR TEST PROGRAMS : - procedure Test_Pieri_Condition ( n,d : in natural ) is + procedure Test_Pieri_Condition ( n,d : in integer32 ) is -- DESCRIPTION : -- Reads two brackets and tests Pieri's condition. b1,b2 : Bracket(1..d); ans : character; - cnt : natural := 0; begin new_line; put_line("Interactive test on Pieri's condition for pair of brackets."); - Matrix_Indeterminates.Initialize_Symbols(n,d); + Matrix_Indeterminates.Initialize_Symbols(natural32(n),natural32(d)); loop new_line; put("Give first bracket : "); get(b1); put("Give second bracket : "); get(b2); put("("); put(b1); put(","); put(b2); put(")"); - if Pieri_Condition(n,b1,b2) + if Pieri_Condition(natural32(n),b1,b2) then put_line(" satisfies Pieri's condition."); else put_line(" does not satisfy Pieri's condition."); end if; @@ -695,11 +710,11 @@ Matrix_Indeterminates.Clear_Symbols; end Test_Pieri_Condition; - procedure Test_Pieri_Tree ( n,d : in natural ) is + procedure Test_Pieri_Tree ( n,d : in integer32 ) is -- DESCRIPTION : Constructs T(r_0,r_1,..,r_a). - a : natural; + a : integer32 := 0; ans : character; begin @@ -713,7 +728,7 @@ t : Pieri_Tree(d,a); begin put("Give "); put(a+1,1); put(" natural numbers : "); get(v); - t := Create(n,d,v); + t := Create(natural32(n),natural32(d),v); put_line("The Pieri tree : "); Write_Tree(t); --put(t); put_line("The chains in the Pieri tree :"); Write_Chains(t); Clear(t); @@ -723,14 +738,15 @@ end loop; end Test_Pieri_Tree; - procedure Test_Root_Count ( n,d : in natural ) is + procedure Test_Root_Count ( n,d : in integer32 ) is -- DESCRIPTION : -- Reads the input planes and sets up a pair of trees to perform -- the combinatorial root count. - m : constant natural := n-d; - np,sum,a : natural; + m : constant integer32 := n-d; + sum : natural32; + np,a : integer32 := 0; ans : character; begin @@ -752,16 +768,17 @@ sum := sum + kp(i); end loop; put(" = "); put(sum,1); - if sum = m*d - then put_line(" = m*p"); - loop - put("Give number of elements in first set : "); get(a); - Root_Count(n,d,a,kp); - new_line; - put("Do you want to test other partitions ? (y/n) "); get(ans); - exit when ans /= 'y'; - end loop; - else put_line(" /= m*p"); + if integer32(sum) = m*d then + put_line(" = m*p"); + loop + put("Give number of elements in first set : "); get(a); + Root_Count(n,d,a,kp); + new_line; + put("Do you want to test other partitions ? (y/n) "); get(ans); + exit when ans /= 'y'; + end loop; + else + put_line(" /= m*p"); end if; end; put("Do you want more tests ? (y/n) "); get(ans); @@ -769,12 +786,12 @@ end loop; end Test_Root_Count; - procedure Test_Pieri_Equations ( n,d : in natural ) is + procedure Test_Pieri_Equations ( n,d : in integer32 ) is -- DESCRIPTION : -- Set up of the expansions of the maximal minors. - k,kd,nb : natural; + k,kd,nb : integer32 := 0; bm : Bracket_Monomial; ans : character; b1,b2 : Bracket(1..d); @@ -782,15 +799,16 @@ begin new_line; put_line("Set up equations for certain Schubert conditions."); - Matrix_Indeterminates.Initialize_Symbols(n,d); + Matrix_Indeterminates.Initialize_Symbols(natural32(n),natural32(d)); loop new_line; put("Give k to determine (m-k+1)-plane : "); get(k); kd := n-k+1; - bm := Maximal_Minors(n,kd); -- because n = m+p + bm := Maximal_Minors(natural32(n),natural32(kd)); -- because n = m+p put("All maximal minors : "); put(bm); new_line; declare - bs : constant Bracket_System := Minor_Equations(kd,kd-d,bm); + bs : constant Bracket_System + := Minor_Equations(natural32(kd),natural32(kd-d),bm); begin put_line("The generic equation in the Laplace expansion : "); put(bs(0)); @@ -807,52 +825,52 @@ Matrix_Indeterminates.Clear_Symbols; new_line; put("Do you want to test memory consumption ? (y/n) "); get(ans); - if ans = 'y' - then put("Give number of times : "); get(nb); - k := 1; - for i in 1..d loop - b1(i) := i; - b2(i) := i; - end loop; - for i in 1..nb loop - kd := n-k+1; - bm := Maximal_Minors(n,kd); - declare - nva : constant natural := n*d+1; - bs : Bracket_System(0..Number_of_Brackets(bm)) - := Minor_Equations(kd,kd-d,bm); - cffmat : Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) - := Random_Matrix(n,n-d); - stamat : Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) - := Random_Matrix(n,n-d); - movmat : Standard_Complex_Poly_Matrices.Matrix - (cffmat'range(1),cffmat'range(2)) - := Moving_U_Matrix(nva,stamat,cffmat); - polmat : Standard_Complex_Poly_Matrices.Matrix(1..n,1..d) - := Schubert_Pattern(n,b1,b2); - sys : Poly_Sys(1..bs'last) - := Expanded_Minors(cffmat,polmat,bs); - movcyc : Poly_Sys(1..bs'last) - := Lifted_Expanded_Minors(movmat,polmat,bs); - begin - Clear(bm); Clear(bs); - Standard_Complex_Poly_Matrices.Clear(movmat); - Standard_Complex_Poly_Matrices.Clear(polmat); - Clear(sys); Clear(movcyc); - end; - end loop; + if ans = 'y' then + put("Give number of times : "); get(nb); + k := 1; + for i in 1..d loop + b1(i) := natural32(i); + b2(i) := natural32(i); + end loop; + for i in 1..nb loop + kd := n-k+1; + bm := Maximal_Minors(natural32(n),natural32(kd)); + declare + nva : constant integer32 := n*d+1; + bs : Bracket_System(0..integer32(Number_of_Brackets(bm))) + := Minor_Equations(natural32(kd),natural32(kd-d),bm); + cffmat : constant Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) + := Random_Matrix(natural32(n),natural32(n-d)); + stamat : constant Standard_Complex_Matrices.Matrix(1..n,1..(n-d)) + := Random_Matrix(natural32(n),natural32(n-d)); + movmat : Standard_Complex_Poly_Matrices.Matrix + (cffmat'range(1),cffmat'range(2)) + := Moving_U_Matrix(nva,stamat,cffmat); + polmat : Standard_Complex_Poly_Matrices.Matrix(1..n,1..d) + := Schubert_Pattern(natural32(n),b1,b2); + sys : Poly_Sys(1..bs'last) + := Expanded_Minors(cffmat,polmat,bs); + movcyc : Poly_Sys(1..bs'last) + := Lifted_Expanded_Minors(movmat,polmat,bs); + begin + Clear(bm); Clear(bs); + Standard_Complex_Poly_Matrices.Clear(movmat); + Standard_Complex_Poly_Matrices.Clear(polmat); + Clear(sys); Clear(movcyc); + end; + end loop; end if; end Test_Pieri_Equations; - procedure Test_Pieri_Homotopies ( n,d : in natural ) is + procedure Test_Pieri_Homotopies ( n,d : in integer32 ) is -- DESCRIPTION : -- Set up of the parametric families in the Pieri homotopy algorithm. b1,b2 : Bracket(1..d); - m : constant natural := n-d; - nva : constant natural := n*d+1; - k,kd : natural; + m : constant integer32 := n-d; + nva : constant integer32 := n*d+1; + k,kd : integer32 := 0; bm : Bracket_Monomial; F1 : constant Standard_Complex_Matrices.Matrix := Random_Upper_Triangular(n); @@ -863,7 +881,7 @@ new_line; put_line("Set up the moving cycles in the Pieri homotopy algorithm."); new_line; - Matrix_Indeterminates.Initialize_Symbols(n,d); + Matrix_Indeterminates.Initialize_Symbols(natural32(n),natural32(d)); Add_t_Symbol; put_line("The general upper triangular matrix F : "); put(F1,2); put_line("The general lower triangular matrix F' : "); put(F2,2); @@ -873,15 +891,17 @@ put("("); put(b1); put(","); put(b2); put_line(")"); put("Give k to determine (m-k+1)-plane : "); get(k); kd := n-k+1; - bm := Maximal_Minors(n,kd); + bm := Maximal_Minors(natural32(n),natural32(kd)); declare - L : constant Standard_Complex_Matrices.Matrix := Random_Matrix(n,m+1-k); + L : constant Standard_Complex_Matrices.Matrix + := Random_Matrix(natural32(n),natural32(m+1-k)); X : Standard_Complex_Poly_Matrices.Matrix(1..n,b1'range); U1 : constant Standard_Complex_Matrices.Matrix := U_Matrix(F1,b1); movU1 : Standard_Complex_Poly_Matrices.Matrix(L'range(1),L'range(2)); U2 : constant Standard_Complex_Matrices.Matrix := U_Matrix(F2,b2); movU2 : Standard_Complex_Poly_Matrices.Matrix(L'range(1),L'range(2)); - bs : constant Bracket_System := Minor_Equations(kd,kd-d,bm); + bs : constant Bracket_System + := Minor_Equations(natural32(kd),natural32(kd-d),bm); movcyc1,movcyc2 : Poly_Sys(1..bs'last); begin put("The U-matrix for F and "); put(b1); put_line(" :"); put(U1,2); @@ -891,7 +911,7 @@ put_line("The first moving U-matrix :"); put(movU1); movU2 := Moving_U_Matrix(nva,U2,L); put_line("The second moving U-matrix :"); put(movU2); - X := Schubert_Pattern(n,b1,b2); + X := Schubert_Pattern(natural32(n),b1,b2); put("The unknown "); put(d,1); put_line("-plane X :"); put(X); movcyc1 := Lifted_Expanded_Minors(movU1,X,bs); put_line("The polynomial system for the first moving U-matrix :"); @@ -900,7 +920,8 @@ put_line("The polynomial system for the second moving U-matrix :"); put_line(movcyc2); put_line("Target system at t = 1 :"); - put_line(Eval(movcyc2,Create(1.0),Number_of_Unknowns(movcyc2(1)))); + put_line(Eval(movcyc2,Create(1.0), + integer32(Number_of_Unknowns(movcyc2(1))))); put_line("System that must be solved :"); put_line(Expanded_Minors(L,X,bs)); end; @@ -909,7 +930,7 @@ procedure Main is - m,p,n : natural; + m,p,n : integer32 := 0; ans : character; begin diff -Nru phcpack-2.4.84/src/Ada/Schubert/Pieri/UPDATES phcpack-2.4.85/src/Ada/Schubert/Pieri/UPDATES --- phcpack-2.4.84/src/Ada/Schubert/Pieri/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/Pieri/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,13 @@ +Sun 13 Jun 2021 : fixed pieri_trees, pieri_trees_io, pieri_root_counts, + pieri_deformations, solve_pieri_leaves, ts_org_pieri.adb, so the code + for the original Pieri homotopy algorithm compiles again, + with the build instructions in pieri.gpr. + Fixed deformation_posets_io.adb. + +Thu 10 Jun 2021 : defined the exec_dir attribute in pieri.gpr. + +Wed 9 Jun 2021 : defined pieri.gpr to build the test procedures. + Thu 3 Dec 2020 : moved the procedure bablenum to the package main_pieri_count. Sun 29 Nov 2020 : removed superfluous procedures driver_for_pieri_homotopies diff -Nru phcpack-2.4.84/src/Ada/Schubert/READ_ME phcpack-2.4.85/src/Ada/Schubert/READ_ME --- phcpack-2.4.84/src/Ada/Schubert/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,10 +1,15 @@ -Numerical Schubert Calculus with PHCv2.4.82 +Numerical Schubert Calculus with PHCv2.4.85 + +Run "gprbuild schubert.gpr" to make all test programs. +On windows, type "gprbuild schubert.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean schubert.gpr" removes all files created by gprbuild. This directory was delivered with release 2 of PHCpack, with some minor updates in release 2.1 for the connection with C. In release 2.2, the code for SAGBI and Pieri homotopies was dispersed in two separate subdirectories, to make room for the -new homotopies to implement Schubert Induction. +Littlewood-Richardson homotopies to implement Schubert Induction. In release 2.3 most changes are in Induction. The Littlewood-Richardson homotopies became available in double double @@ -16,4 +21,7 @@ Schubert : 5. numerical Schubert calculus |-- SAGBI : 5.1 SAGBI homotopies |-- Pieri : 5.2 deformations based on Pieri's rule - |-- Induction : 5.3 Schubert induction + |-- Induction : 5.3 Littlewood-Richardson homotopies + +The numerical Schubert calculus provides homotopy methods derived +from geometric root counting formulas. diff -Nru phcpack-2.4.84/src/Ada/Schubert/SAGBI/maximal_minors.adb phcpack-2.4.85/src/Ada/Schubert/SAGBI/maximal_minors.adb --- phcpack-2.4.84/src/Ada/Schubert/SAGBI/maximal_minors.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/SAGBI/maximal_minors.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,10 +1,12 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Floating_Numbers_io; use Standard_Floating_Numbers_io; with Standard_Natural_Vectors; use Standard_Natural_Vectors; with Standard_Natural_Vectors_io; use Standard_Natural_Vectors_io; +with Standard_Integer_Vectors; use Standard_Integer_Vectors; with Standard_Floating_Linear_Solvers; use Standard_Floating_Linear_Solvers; procedure Maximal_Minors ( file : in file_type; - n,d : in natural; mat : in Matrix; + n,d : in natural32; mat : in Matrix; min,max : out double_float ) is function Determinant @@ -16,14 +18,14 @@ res : double_float := 1.0; sqm : Matrix(rows'range,rows'range); - piv : Standard_Natural_Vectors.Vector(rows'range); - inf : natural; + piv : Standard_Integer_Vectors.Vector(rows'range); + inf : integer32; begin for i in rows'range loop piv(i) := i; for j in rows'range loop - sqm(i,j) := mat(rows(i),j); + sqm(i,j) := mat(integer32(rows(i)),j); end loop; end loop; lufac(sqm,rows'last,piv,inf); @@ -40,32 +42,34 @@ procedure Main is - rows : Standard_Natural_Vectors.Vector(1..d); + rows : Standard_Natural_Vectors.Vector(1..integer32(d)); first : boolean := true; mindet,maxdet : double_float; - procedure Select_Rows ( k,start : in natural ) is + procedure Select_Rows ( k,start : in integer32 ) is det : double_float; begin - if k > d - then det := Determinant(mat,rows); - put(file,"Minor "); put(file,rows); put(file," equals "); - put(file,det); new_line(file); - det := abs(det); - if first - then mindet := det; maxdet := det; first := false; - else if det > maxdet - then maxdet := det; - elsif det < mindet - then mindet := det; - end if; - end if; - else for j in start..n loop - rows(k) := j; - Select_Rows(k+1,j+1); - end loop; + if k > integer32(d) then + det := Determinant(mat,rows); + put(file,"Minor "); put(file,rows); put(file," equals "); + put(file,det); new_line(file); + det := abs(det); + if first then + mindet := det; maxdet := det; first := false; + else + if det > maxdet then + maxdet := det; + elsif det < mindet then + mindet := det; + end if; + end if; + else + for j in start..integer32(n) loop + rows(k) := natural32(j); + Select_Rows(k+1,j+1); + end loop; end if; end Select_Rows; diff -Nru phcpack-2.4.84/src/Ada/Schubert/SAGBI/maximal_minors.ads phcpack-2.4.85/src/Ada/Schubert/SAGBI/maximal_minors.ads --- phcpack-2.4.84/src/Ada/Schubert/SAGBI/maximal_minors.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/SAGBI/maximal_minors.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,9 +1,10 @@ with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Floating_Matrices; use Standard_Floating_Matrices; procedure Maximal_Minors ( file : in file_type; - n,d : in natural; mat : in Matrix; + n,d : in natural32; mat : in Matrix; min,max : out double_float ); -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/Schubert/SAGBI/READ_ME phcpack-2.4.85/src/Ada/Schubert/SAGBI/READ_ME --- phcpack-2.4.84/src/Ada/Schubert/SAGBI/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/SAGBI/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Numerical Schubert Calculus using SAGBI homotopy in PHCv2.4.82 +Numerical Schubert Calculus using SAGBI homotopies in PHCv2.4.85 This directory was delivered with release 2 of PHCpack, and stowed away in a separate directory in release 2.2. @@ -12,6 +12,11 @@ Schubert calculus, but were later outperformed (both in mathematical beauty and efficiency) by the Pieri homotopies. +Run "gprbuild sagbi.gpr" to make all test programs. +On windows, type "gprbuild sagbi.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean sagbi.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Schubert/SAGBI/sagbi.gpr phcpack-2.4.85/src/Ada/Schubert/SAGBI/sagbi.gpr --- phcpack-2.4.84/src/Ada/Schubert/SAGBI/sagbi.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/SAGBI/sagbi.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,69 @@ +project sagbi is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../../System", "../../System/Unix_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../Pieri"); + when "windows" => + for Source_Dirs use + (".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/Trackers", + "../../Deformations/End_Games", + "../../Deformations/Continuation", + "../../Root_Counts/Product", "../../Root_Counts/Binomials", + "../../Root_Counts/Implift", "../../Root_Counts/Stalift", + "../../Root_Counts/Dynlift", "../Pieri"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../../../Objects"; + for Exec_Dir use "../../../bin"; + + for Main use + ( + "ts_subsets.adb", -- tests generation of subsets + "ts_brackets.adb", -- tests manipulation of brackets + "ts_brackmons.adb", -- tests bracket monomials + "ts_brackpols.adb", -- tests bracket polynomials + "ts_straighten.adb", -- tests straightening algorithm + "ts_expand.adb", -- tests expansion of brackets + "ts_local.adb", -- tests localization + "ts_cheby.adb", -- tests working with Chebychev polynomials + "ts_topos.adb", -- tests total positivity + "ts_shapiro.adb", -- tests generation of input planes + "ts_eremenko.adb", -- tests variant of generation of inputs + "ts_detrock.adb", -- tests various root counts on (m,p)-system + "ts_mathom.adb", -- tests matrix homotopies + "ts_sagbi.adb" -- tests the main SAGBI homotopies + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end sagbi; diff -Nru phcpack-2.4.84/src/Ada/Schubert/SAGBI/UPDATES phcpack-2.4.85/src/Ada/Schubert/SAGBI/UPDATES --- phcpack-2.4.84/src/Ada/Schubert/SAGBI/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/SAGBI/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Sun 13 Jun 2021 : fixed maximal_minors. + +Thu 10 Jun 2021 : defined the exec_dir attribute in sagbi.gpr. + +Wed 9 Jun 2021 : defined sagbi.gpr to build the test procedures. + Sun 29 Nov 2020 : renamed the package drivers_for_sagbi_homotopies into main_sagbi_homotopies. diff -Nru phcpack-2.4.84/src/Ada/Schubert/schubert.gpr phcpack-2.4.85/src/Ada/Schubert/schubert.gpr --- phcpack-2.4.84/src/Ada/Schubert/schubert.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/schubert.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,10 @@ +aggregate project schubert is + + for Project_Files use + ( + "SAGBI/sagbi.gpr", -- SAGBI homotopies + "Pieri/pieri.gpr", -- deformations based on Pieri's rule + "Induction/induction.gpr" -- Littlewood-Richardson homotopies + ); + +end schubert; diff -Nru phcpack-2.4.84/src/Ada/Schubert/UPDATES phcpack-2.4.85/src/Ada/Schubert/UPDATES --- phcpack-2.4.84/src/Ada/Schubert/UPDATES 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Schubert/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,60 @@ +Tue 15 Jun 2021 : defined schubert.gpr to build all test procedures. + +Thu 27 Mar 2003 : created directories SAGBI and Pieri under Schubert + +Sun 13 Oct 2002 : quantum Pieri solver has now limit on number of + solution maps that need to be computed. + +Mon 24 Jun 2002 : deformation_posets has now a silent quantum solver, + and pieri_continuation has a silent Quantum_Trace_Paths + Moved some routines from driver_for_quantum_pieri into + determinantal_systems, needed for the pieri_solver.adb. + +Wed 14 Nov 2001 : changes driver_for_pieri_homotopies.adb so that it + prints the solutions in matrix format + +Tue 13 Nov 2001 : changed drivers_for_input_planes.adb to allow also + to give in complex input planes for the Pieri homotopy algorithm +Wed 31 May 2000 : due to modified Newton in root refiners, changed + driver_for_pieri_homotopies.adb, driver_for_quantum_pieri.adb, + driver_for_sagbi_homotopies.adb, and pieri_continuation.adb. + +Sat 1 Sep 2001 : created pieri_root_count and ts_piroco to call the + combinatorial Pieri root count of the Schubert calculus + +Thu 30 Nov 2000 : changed driver_for_quantum_pieri.adb, line 284 + contained "lnd : Link_to_Node" was never assigned a value. + pieri_homotopies.adb had empty "Two_General_Quantum_Homotopy", + commented that one out. + +Wed 2 May 2000 : added the package complex_osculating_planes to test + a variant of the Shapiro^2 conjectures, ts_emerenko.adb does a small + comparison on the generation of the input planes. + Also updated "drivers_for_input_planes.adb". + +Thu 16 Sep 1999: copied brackets, localization_posets, ts_posets, + deformation_posets, pieri_homotopies, ts_defpos, specialization_of_planes, + numeric_minor_equations, determinantal_systems, driver_for_pieri_homotopies, + drivers_for_input_planes, driver_for_quantum_pieri, pieri_continuation, + pieri_deformations and ts_org_pieri to the public distribution. + +Mon 6 Sep 1999: changed specialization_of_planes.ads + adb, + numerical_minor_equations.ads + adb and determinantal_systems.adb. + Also changed are driver_for_pieri_homotopies.adb, + ts_org_pieri.adb and pieri_deformations.adb. + +Sun 5 Sep 1999: adapted specifications and implementations of + deformation_posets. Expanded the testing program ts_defpos. + Changed also the package pieri_homotopies.ads. + +Sat 4 Sep 1999: implemented new root count for general quantum + Pieri rule, in the file localization_posets.adb, also updated the + testing program ts_posets.adb. Also localization_posets.ads + is slightly modified. + +Mon 30 Aug 1999: changed deformation_posets.ad* so that now an + overview of timings for each level is maintained. + +Sat 19 Jun 1999: changed driver_for_pieri_homotopies so that + now determinantal cheater for overconstrained systems. + Copied to the public distribution directory. diff -Nru phcpack-2.4.84/src/Ada/System/Basic_Timer/READ_ME phcpack-2.4.85/src/Ada/System/Basic_Timer/READ_ME --- phcpack-2.4.84/src/Ada/System/Basic_Timer/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/Basic_Timer/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -10,6 +10,8 @@ ------------------------------------------------------------------------------ get_clock.c : calls the C routine "clock" get_clocks_per_sec.c : returns the constant CLOCKS_PER_SEC from time.h +ts_ctimer : timing with a call to ANSI C +------------------------------------------------------------------------------ timing_package : measures usage of computing resources ts_timer : timing of summation of natural numbers ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Ada/System/Basic_Timer/ts_ctimer.adb phcpack-2.4.85/src/Ada/System/Basic_Timer/ts_ctimer.adb --- phcpack-2.4.84/src/Ada/System/Basic_Timer/ts_ctimer.adb 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/Basic_Timer/ts_ctimer.adb 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,44 @@ +with text_io,integer_io; use text_io,integer_io; +with Timing_Package; use Timing_Package; + +procedure ts_ctimer is + + function get_clock return integer; + pragma Import(C,get_clock,"get_clock"); + + function get_clocks_per_sec return integer; + pragma Import(C,get_clocks_per_sec,"get_clocks_per_sec"); + + clocks_per_sec : constant integer := get_clocks_per_sec; + + n : constant integer := 1500000000; + timer : Timing_Widget; + a,b,c : float; + save_clock,now,user_time,millisec,elapsed : integer; + +begin + put("Clocks per second : "); put(clocks_per_sec,1); new_line; + b := 2.333; c := 3.4444; + tstart(timer); + save_clock := get_clock; + for i in 1..n loop + a := b*c; + if i mod 10000 = 0 + then put_line("10000 multiplications done"); + end if; + end loop; + now := get_clock; + tstop(timer); + elapsed := now - save_clock; + user_time := elapsed/clocks_per_sec; + millisec := elapsed/(clocks_per_sec/1000); + put("Elapsed user time : "); + put(user_time,1); put_line(" seconds."); + put("Elapsed user time : "); + put(millisec,1); put_line(" milliseconds."); + millisec := millisec - user_time*1000; + put("Elapsed user time : "); + put(user_time,1); put(" seconds and "); + put(millisec,1); put_line(" milliseconds."); + print_times(Standard_Output,timer,"Checking C timer"); +end ts_ctimer; diff -Nru phcpack-2.4.84/src/Ada/System/Basic_Timer/UPDATES phcpack-2.4.85/src/Ada/System/Basic_Timer/UPDATES --- phcpack-2.4.84/src/Ada/System/Basic_Timer/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/Basic_Timer/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1 +1,3 @@ +Sat 26 Jun 2021 : added ts_ctimer.adb from the ../System folder. + Sun 18 Mar 2018 : added array_of_duration to timing_package.ads. diff -Nru phcpack-2.4.84/src/Ada/System/READ_ME phcpack-2.4.85/src/Ada/System/READ_ME --- phcpack-2.4.84/src/Ada/System/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -OS dependent features and general utilities in PHCv2.4.80 +OS dependent features and general utilities in PHCv2.4.85 New in the second release is the inclusion of test programs (prefix "ts_"). A timer interfacing with C was needed for the Windows platform and Itanium @@ -8,6 +8,11 @@ Multithreading was added in release 2.3.39. New in 2.3.58 is the package string_splitters. +Run "gprbuild system.gpr" to make all test procedures. +On windows, type "gprbuild system.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean system.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -28,7 +33,6 @@ multithreading : encapsulation for GNAT.Threads ------------------------------------------------------------------------------ ts_stamps : test on date, time, and elapsed time -ts_ctimer : timing with a call to ANSI C ts_syscall : execution of a system call : "ls" ts_mach : prints system information of current process ts_cmdline : prints the arguments of the command line diff -Nru phcpack-2.4.84/src/Ada/System/system.gpr phcpack-2.4.85/src/Ada/System/system.gpr --- phcpack-2.4.84/src/Ada/System/system.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/system.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,51 @@ +project system is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Languages use ("Ada"); + for Source_Dirs use (".", "Unix_Timer"); + for Main use + ( + "ts_stamps.adb", -- tests date, time, and elapsed time + "ts_syscall.adb", -- tests execution of a system call + "ts_mach.adb", -- prints system information + "ts_cmdline.adb", -- prints command line arguments + "ts_byemess.adb", -- prints the end message + "ts_strsplit.adb", -- tests string_splitters package + "ts_commuser.adb", -- tests the dialogues with the user + "ts_filescan.adb", -- tests file scanning + "ts_striscan.adb", -- tests on string_parsing.scan() + "ts_timer.adb" -- tests the timer + ); + when "windows" => + for Languages use ("Ada", "C"); + for Source_Dirs use (".", "Basic_Timer"); + for Main use + ( + "ts_stamps.adb", -- tests date, time, and elapsed time + "ts_syscall.adb", -- tests execution of a system call + "ts_mach.adb", -- prints system information + "ts_cmdline.adb", -- prints command line arguments + "ts_byemess.adb", -- prints the end message + "ts_strsplit.adb", -- tests string_splitters package + "ts_commuser.adb", -- tests the dialogues with the user + "ts_filescan.adb", -- tests file scanning + "ts_striscan.adb", -- tests on string_parsing.scan() + "ts_ctimer.adb", -- tests the C timer + "ts_timer.adb" -- tests the timer + ); + end case; + + for Object_Dir use "../../Objects"; + for Exec_Dir use "../../bin"; + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + end Compiler; + +end system; diff -Nru phcpack-2.4.84/src/Ada/System/ts_ctimer.adb phcpack-2.4.85/src/Ada/System/ts_ctimer.adb --- phcpack-2.4.84/src/Ada/System/ts_ctimer.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/ts_ctimer.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -with text_io,integer_io; use text_io,integer_io; -with Timing_Package; use Timing_Package; - -procedure ts_ctimer is - - function get_clock return integer; - pragma Import(C,get_clock,"get_clock"); - - function get_clocks_per_sec return integer; - pragma Import(C,get_clocks_per_sec,"get_clocks_per_sec"); - - clocks_per_sec : constant integer := get_clocks_per_sec; - - n : constant integer := 1500000000; - timer : Timing_Widget; - a,b,c : float; - save_clock,now,user_time,millisec,elapsed : integer; - -begin - put("Clocks per second : "); put(clocks_per_sec,1); new_line; - b := 2.333; c := 3.4444; - tstart(timer); - save_clock := get_clock; - for i in 1..n loop - a := b*c; - if i mod 10000 = 0 - then put_line("10000 multiplications done"); - end if; - end loop; - now := get_clock; - tstop(timer); - elapsed := now - save_clock; - user_time := elapsed/clocks_per_sec; - millisec := elapsed/(clocks_per_sec/1000); - put("Elapsed user time : "); - put(user_time,1); put_line(" seconds."); - put("Elapsed user time : "); - put(millisec,1); put_line(" milliseconds."); - millisec := millisec - user_time*1000; - put("Elapsed user time : "); - put(user_time,1); put(" seconds and "); - put(millisec,1); put_line(" milliseconds."); - print_times(Standard_Output,timer,"Checking C timer"); -end ts_ctimer; diff -Nru phcpack-2.4.84/src/Ada/System/Unix_Timer/unix_timing_package.adb phcpack-2.4.85/src/Ada/System/Unix_Timer/unix_timing_package.adb --- phcpack-2.4.84/src/Ada/System/Unix_Timer/unix_timing_package.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/Unix_Timer/unix_timing_package.adb 1970-01-01 00:00:00.000000000 +0000 @@ -1,265 +0,0 @@ -with Text_Io, Unix_Resource_Usage; - -package body Timing_Package is - - package duration_io is new text_io.fixed_io(duration); - package integer_io is new text_io.integer_io (integer); - - function duration_to_string (dur : duration) - return string; - pragma inline (duration_to_string); - - type timing_item is record - start_time : Unix_Resource_Usage.Process_Times; - stop_time : Unix_Resource_Usage.Process_Times; - end record; - - type rusage_timing_stuff is - record - total_time : duration; - user_time : duration; - system_time : duration; --- max_resident_size : natural; --- shared_pages : natural; --- unshared_pages : natural; --- stack_pages : natural; - non_io_faults : natural; - io_faults : natural; - swaps : natural; --- input_blocks : natural; --- output_blocks : natural; --- messages_out : natural; --- messages_in : natural; - signals : natural; --- vol_context_switches : natural; --- invol_context_switches : natural; - total_context_switches : natural; - end record; - - function to_rusage_timing_stuff (item : Timing_Widget) - return rusage_timing_stuff; - pragma inline (to_rusage_timing_stuff); - - procedure tstart ( widget : out Timing_Widget ) is - - answer : timing_item; - - begin - answer.start_time := Unix_Resource_Usage.get_process_times; - widget := new timing_item'(answer); - end tstart; - - procedure tstop ( widget : in out Timing_Widget ) is - begin - widget.all.stop_time := Unix_Resource_Usage.get_process_times; - end tstop; - - function Elapsed_Total_Time ( widget : Timing_Widget ) return duration is - begin - return (Unix_Resource_Usage.Total_Time_of(widget.Stop_Time) - - Unix_Resource_Usage.Total_Time_of(widget.Start_Time)); - end Elapsed_Total_Time; - - function Elapsed_User_Time ( widget : Timing_Widget ) return duration is - begin - return (Unix_Resource_Usage.User_CPU_Time_of(widget.Stop_Time) - - Unix_Resource_Usage.User_CPU_Time_of(widget.Start_Time)); - end Elapsed_User_Time; - - function Elapsed_System_Time ( widget : Timing_Widget ) return duration is - begin - return (Unix_Resource_Usage.System_CPU_Time_of(widget.Stop_Time) - - Unix_Resource_Usage.System_CPU_Time_of(widget.Start_Time)); - end Elapsed_System_Time; - - procedure print_time ( file : file_type; mach_time : duration ) is - begin - duration_io.put(file,mach_time); - end print_time; - - function truncate ( d : duration ) return integer is - - rd : integer := integer(d); - - begin - if rd > 0 - then if duration(rd) > d - then rd := rd-1; - end if; - end if; - return rd; - end truncate; - - procedure print_hms ( file : file_type; mach_time : duration ) is - - seconds : integer := truncate(mach_time); - millsec : integer := integer((mach_time-duration(seconds))*1000); - minutes,hours : integer; - - begin - if millsec >= 1000 -- could be due to rounding - then seconds := seconds + 1; - millsec := millsec - 1000; - end if; - minutes := seconds/60; - hours := minutes/60; - seconds := seconds - 60*minutes; - minutes := minutes - 60*hours; - integer_io.put(file,hours,2); text_io.put(file,"h"); - integer_io.put(file,minutes,2); text_io.put(file,"m"); - integer_io.put(file,seconds,2); text_io.put(file,"s"); - integer_io.put(file,millsec,3); text_io.put(file,"ms"); - end print_hms; - - procedure print_times ( widget : Timing_Widget; tag : string := "" ) is - begin - print_times(Standard_Output,widget,tag); - end print_times; - - procedure print_times ( file : file_type; - widget : Timing_Widget; tag : string := "") is - - rusage_stuff : rusage_timing_stuff; - - printout_column : text_io.positive_count := 40; - function "+" (l,r : text_io.positive_count) - return text_io.positive_count renames Text_IO."+"; - - begin - text_io.put_line (file,"TIMING INFORMATION for " & tag); - rusage_stuff := to_rusage_timing_stuff (widget); - -- print out total time - Text_Io.Put (file,"The elapsed time in seconds was "); - -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); - -- sun4 modification : - text_io.set_col (file,Text_IO.positive_count(printout_column)); - duration_io.put (file,rusage_stuff.total_time); - text_io.put(file," = "); print_hms(file,rusage_stuff.total_time); - text_io.new_line(file); - -- print out user time - Text_Io.Put (file,"User time in seconds was "); - -- text_io.set_col (file,Text_IO.positive_count(printout_column + 3)); - -- sun4 modification : - text_io.set_col (file,Text_IO.positive_count(printout_column)); - duration_io.put (file,rusage_stuff.user_time); - text_io.put(file," = "); print_hms(file,rusage_stuff.user_time); - text_io.new_line(file); - -- print out system time - Text_Io.Put (file,"System CPU time in seconds was "); - -- text_io.set_col (file,text_io.positive_count(printout_column + 3)); - -- sun4 modification : - text_io.set_col (file,text_io.positive_count(printout_column)); - duration_io.put (file,rusage_stuff.system_time); - text_io.put(file," = "); print_hms(file,rusage_stuff.system_time); - text_io.new_line(file); - -- print out non-I/O page faults - Text_IO.put (file,"Non-I/O page faults was "); - text_io.set_col (file,printout_column); - integer_io.put (file,rusage_stuff.non_io_faults); - Text_IO.new_line(file); - -- print out I/O page faults - Text_IO.put (file,"I/O page faults was "); - text_io.set_col (file,printout_column); - integer_io.put (file,rusage_stuff.io_faults); - text_io.new_line(file); - -- print out signals - Text_IO.put (file,"Signals delivered was "); - text_io.set_col (file,printout_column); - integer_io.put (file,rusage_stuff.signals); - text_io.new_line(file); - -- print out swaps - text_io.put (file,"Swaps was "); - text_io.set_col (file,printout_column); - integer_io.put (file,rusage_stuff.swaps); - text_io.new_line(file); - -- print out total context switches - text_io.put (file,"Total context switches was "); - text_io.set_col (file,printout_column); - integer_io.put (file,rusage_stuff.total_context_switches); - text_io.new_line(file); - -- text_io.put_line - --("-----------------------------------------------------------------"); - end print_times; - - function times_to_string (widget : Timing_Widget; - delimiter : string := ":") - return string - is - rusage_stuff : rusage_timing_stuff; - begin - rusage_stuff := to_rusage_timing_stuff(widget); - return "Total Time in seconds => " - & duration_to_string (rusage_stuff.total_time) & delimiter - & "User Time in seconds => " - & duration_to_string (rusage_stuff.user_time) & delimiter - & "System Time in seconds => " - & duration_to_string (rusage_stuff.system_time) & delimiter - & "Non I/O Page Faults => " - & integer'image (rusage_stuff.non_io_faults) & delimiter - & "I/O Page Faults => " - & integer'image (rusage_stuff.io_faults) & delimiter - & "Swaps => " - & integer'image (rusage_stuff.swaps) & delimiter - & "Signals Delivered => " - & integer'image (rusage_stuff.signals) & delimiter - & "Total Context Switches => " - & integer'image (rusage_stuff.total_context_switches) & delimiter; - end times_to_string; - - function duration_to_string (dur : duration) return string is - - answer : string(1..(duration'fore + duration'aft + 1)); - - begin - duration_io.put (to => answer, item => dur); - return answer; - end duration_to_string; - - function to_rusage_timing_stuff (item : Timing_Widget) - return rusage_timing_stuff is - - answer : rusage_timing_stuff; - - begin - answer.total_time := Unix_Resource_Usage.total_time_of - (item.Stop_Time) - - Unix_Resource_Usage.total_time_of - (item.Start_Time); - answer.user_time := Unix_Resource_Usage.user_cpu_time_of - (Item.Stop_time) - - Unix_Resource_Usage.user_cpu_time_of - (Item.Start_time); - answer.system_time := Unix_Resource_Usage.system_cpu_time_of - (Item.Stop_time) - - Unix_Resource_Usage.system_cpu_time_of - (Item.Start_time); - answer.non_io_faults := integer(Unix_Resource_Usage.non_io_page_faults_of - (item.stop_time) - - Unix_Resource_Usage.non_io_page_faults_of - (item.start_time)); - answer.io_faults := integer (Unix_Resource_Usage.io_page_faults_of - (item.stop_time) - - Unix_Resource_Usage.io_page_faults_of - (item.start_time)); - answer.swaps := (Unix_Resource_Usage.swaps_of - (item.stop_time) - - Unix_Resource_Usage.swaps_of - (item.start_time)); - answer.signals := (Unix_Resource_Usage.signals_delivered_of - (item.stop_time) - - Unix_Resource_Usage.signals_delivered_of - (item.start_time)); - - answer.total_context_switches - := ( Unix_Resource_Usage.voluntary_context_switches_of - (item.stop_time) - - Unix_Resource_Usage.voluntary_context_switches_of - (item.start_time)) - + (Unix_Resource_Usage.involuntary_context_switches_of - (item.stop_time) - - Unix_Resource_Usage.involuntary_context_switches_of - (item.start_time)); - return answer; - end to_rusage_timing_stuff; - -end Timing_Package; diff -Nru phcpack-2.4.84/src/Ada/System/UPDATES phcpack-2.4.85/src/Ada/System/UPDATES --- phcpack-2.4.84/src/Ada/System/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/System/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Sat 26 Jun 2021 : moved ts_ctimer.adb to the folder Basic_Timer, + updated system.gpr. Modified system.gpr, as C timer is only for Windows. + Improved system.gpr to cover tests in the subfolders. + +Thu 10 Jun 2021 : defined system.gpr to build the test procedures. + Sun 23 Aug 2020 : extended communications_with_user with end of input message. Fri 10 Jul 2020 : minor layout adjustments in communications_with_user.adb. diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_matrix_x_vector.adb phcpack-2.4.85/src/Ada/Tasking/multitasking_matrix_x_vector.adb --- phcpack-2.4.84/src/Ada/Tasking/multitasking_matrix_x_vector.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_matrix_x_vector.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Multitasking; use Multitasking; with Standard_Complex_Numbers; with DoblDobl_Complex_Numbers; @@ -7,14 +8,14 @@ package body Multitasking_Matrix_x_Vector is function Silent_Multiply - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector is res : Standard_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use Standard_Complex_Numbers; @@ -36,21 +37,21 @@ end Silent_Multiply; function Silent_Multiply - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector is res : DoblDobl_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use DoblDobl_Complex_Numbers; begin for r in A'range(1) loop if r mod n = i-1 then - res(r) := Create(0); + res(r) := Create(integer32(0)); for j in A'range(2) loop res(r) := res(r) + A(r,j)*v(j); end loop; @@ -65,21 +66,21 @@ end Silent_Multiply; function Silent_Multiply - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector is res : QuadDobl_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use QuadDobl_Complex_Numbers; begin for r in A'range(1) loop if r mod n = i-1 then - res(r) := Create(0); + res(r) := Create(integer32(0)); for j in A'range(2) loop res(r) := res(r) + A(r,j)*v(j); end loop; @@ -94,14 +95,14 @@ end Silent_Multiply; function Reporting_Multiply - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector is res : Standard_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use Standard_Complex_Numbers; @@ -125,14 +126,14 @@ end Reporting_Multiply; function Reporting_Multiply - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector is res : DoblDobl_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use DoblDobl_Complex_Numbers; @@ -141,7 +142,7 @@ for r in A'range(1) loop if r mod n = i-1 then put_line("task " & to_string(i) & " computes " & to_string(r)); - res(r) := Create(0); + res(r) := Create(integer32(0)); for j in A'range(2) loop res(r) := res(r) + A(r,j)*v(j); end loop; @@ -156,14 +157,14 @@ end Reporting_Multiply; function Reporting_Multiply - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector is res : QuadDobl_Complex_Vectors.Vector(A'range(1)); - procedure Job ( i,n : natural ) is + procedure Job ( i,n : integer32 ) is use QuadDobl_Complex_Numbers; @@ -172,7 +173,7 @@ for r in A'range(1) loop if r mod n = i-1 then put_line("task " & to_string(i) & " computes " & to_string(r)); - res(r) := Create(0); + res(r) := Create(integer32(0)); for j in A'range(2) loop res(r) := res(r) + A(r,j)*v(j); end loop; diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_matrix_x_vector.ads phcpack-2.4.85/src/Ada/Tasking/multitasking_matrix_x_vector.ads --- phcpack-2.4.84/src/Ada/Tasking/multitasking_matrix_x_vector.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_matrix_x_vector.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,4 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Vectors; with Standard_Complex_Matrices; with DoblDobl_Complex_Vectors; @@ -12,17 +13,17 @@ -- for various types of arithmetic. function Silent_Multiply - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Silent_Multiply - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Silent_Multiply - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector; @@ -31,17 +32,17 @@ -- Returns A*v computed with n tasks without any output. function Reporting_Multiply - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Reporting_Multiply - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Reporting_Multiply - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector; diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_polynomial_functions.adb phcpack-2.4.85/src/Ada/Tasking/multitasking_polynomial_functions.adb --- phcpack-2.4.84/src/Ada/Tasking/multitasking_polynomial_functions.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_polynomial_functions.adb 2021-06-30 23:22:40.000000000 +0000 @@ -13,7 +13,7 @@ -- JOBS to EVALUATE THE MONOMIALS : procedure Silent_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in Standard_Complex_Vectors.Vector; y : out Standard_Complex_Vectors.Vector ) is @@ -26,7 +26,7 @@ end Silent_Eval_Job; procedure Silent_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in DoblDobl_Complex_Vectors.Vector; y : out DoblDobl_Complex_Vectors.Vector ) is @@ -39,7 +39,7 @@ end Silent_Eval_Job; procedure Silent_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in QuadDobl_Complex_Vectors.Vector; y : out QuadDobl_Complex_Vectors.Vector ) is @@ -52,7 +52,7 @@ end Silent_Eval_Job; procedure Reporting_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in Standard_Complex_Vectors.Vector; y : out Standard_Complex_Vectors.Vector ) is @@ -67,7 +67,7 @@ end Reporting_Eval_Job; procedure Reporting_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in DoblDobl_Complex_Vectors.Vector; y : out DoblDobl_Complex_Vectors.Vector ) is @@ -82,7 +82,7 @@ end Reporting_Eval_Job; procedure Reporting_Eval_Job - ( i,n : in natural; + ( i,n : in integer32; v : in Standard_Integer_VecVecs.VecVec; x : in QuadDobl_Complex_Vectors.Vector; y : out QuadDobl_Complex_Vectors.Vector ) is @@ -99,14 +99,14 @@ -- EVALUATION OF THE MONOMIALS : function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector is res : Standard_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in v'range loop if r mod n = i-1 then @@ -122,14 +122,14 @@ end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector is res : DoblDobl_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in v'range loop if r mod n = i-1 then @@ -145,14 +145,14 @@ end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector is res : QuadDobl_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in v'range loop if r mod n = i-1 then @@ -168,14 +168,14 @@ end Silent_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector is res : Standard_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in v'range loop @@ -193,14 +193,14 @@ end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector is res : DoblDobl_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in v'range loop @@ -218,14 +218,14 @@ end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector is res : QuadDobl_Complex_Vectors.Vector(v'range); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in v'range loop @@ -245,7 +245,7 @@ -- EVALUATION OF THE DENSE FLATTENED SYSTEM : function Silent_Eval - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) @@ -258,7 +258,7 @@ end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) @@ -271,7 +271,7 @@ end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) @@ -284,7 +284,7 @@ end Silent_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) @@ -297,7 +297,7 @@ end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) @@ -310,7 +310,7 @@ end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) @@ -325,7 +325,7 @@ -- EVALUATION OF THE SPARSE FLATTENED SYSTEM : function Silent_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -335,7 +335,7 @@ res : Standard_Complex_Vectors.Vector(c'range); vx : constant Standard_Complex_Vectors.Vector := Silent_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in c'range loop if r mod n = i-1 then @@ -354,7 +354,7 @@ end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -364,7 +364,7 @@ res : DoblDobl_Complex_Vectors.Vector(c'range); vx : constant DoblDobl_Complex_Vectors.Vector := Silent_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in c'range loop if r mod n = i-1 then @@ -376,14 +376,14 @@ begin for i in res'range loop - res(i) := DoblDobl_Complex_Numbers.Create(0); + res(i) := DoblDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Silent_Eval; function Silent_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -393,7 +393,7 @@ res : QuadDobl_Complex_Vectors.Vector(c'range); vx : constant QuadDobl_Complex_Vectors.Vector := Silent_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin for r in c'range loop if r mod n = i-1 then @@ -405,14 +405,14 @@ begin for i in res'range loop - res(i) := QuadDobl_Complex_Numbers.Create(0); + res(i) := QuadDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Silent_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -422,7 +422,7 @@ res : Standard_Complex_Vectors.Vector(c'range); vx : constant Standard_Complex_Vectors.Vector := Reporting_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in res'range loop @@ -443,7 +443,7 @@ end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -453,7 +453,7 @@ res : DoblDobl_Complex_Vectors.Vector(c'range); vx : constant DoblDobl_Complex_Vectors.Vector := Reporting_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in res'range loop @@ -467,14 +467,14 @@ begin for i in res'range loop - res(i) := DoblDobl_Complex_Numbers.Create(0); + res(i) := DoblDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Reporting_Eval; function Reporting_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -484,7 +484,7 @@ res : QuadDobl_Complex_Vectors.Vector(c'range); vx : constant QuadDobl_Complex_Vectors.Vector := Reporting_Eval(n,v,x); - procedure Job ( i,n : in natural ) is + procedure Job ( i,n : in integer32 ) is begin put_line("hello from task " & to_string(i)); for r in res'range loop @@ -498,7 +498,7 @@ begin for i in res'range loop - res(i) := QuadDobl_Complex_Numbers.Create(0); + res(i) := QuadDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; @@ -507,7 +507,7 @@ -- EVALUATION OF THE SPARSE FLATTENED SYSTEM with LOOPING Workers : function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -520,7 +520,7 @@ use Standard_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then Silent_Eval_Job(i,n,v,x,vx); @@ -546,7 +546,7 @@ end Silent_Looping_Eval; function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -559,7 +559,7 @@ use DoblDobl_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then Silent_Eval_Job(i,n,v,x,vx); @@ -578,14 +578,14 @@ begin for i in res'range loop - res(i) := DoblDobl_Complex_Numbers.Create(0); + res(i) := DoblDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Silent_Looping_Eval; function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -598,7 +598,7 @@ use QuadDobl_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then Silent_Eval_Job(i,n,v,x,vx); @@ -617,14 +617,14 @@ begin for i in res'range loop - res(i) := QuadDobl_Complex_Numbers.Create(0); + res(i) := QuadDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Silent_Looping_Eval; function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -637,7 +637,7 @@ use Standard_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then put_line("hello from task " & to_string(i) & " at first stage"); @@ -666,7 +666,7 @@ end Reporting_Looping_Eval; function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -679,7 +679,7 @@ use DoblDobl_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then put_line("hello from task " & to_string(i) & " at first stage"); @@ -701,14 +701,14 @@ begin for i in res'range loop - res(i) := DoblDobl_Complex_Numbers.Create(0); + res(i) := DoblDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; end Reporting_Looping_Eval; function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -721,7 +721,7 @@ use QuadDobl_Polynomial_Flatteners; - procedure Job ( i,n : in natural; continue : out boolean ) is + procedure Job ( i,n : in integer32; continue : out boolean ) is begin if first(i) then put_line("hello from task " & to_string(i) & " at first stage"); @@ -743,7 +743,7 @@ begin for i in res'range loop - res(i) := QuadDobl_Complex_Numbers.Create(0); + res(i) := QuadDobl_Complex_Numbers.Create(integer32(0)); end loop; do_jobs(n); return res; diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_polynomial_functions.ads phcpack-2.4.85/src/Ada/Tasking/multitasking_polynomial_functions.ads --- phcpack-2.4.84/src/Ada/Tasking/multitasking_polynomial_functions.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_polynomial_functions.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,4 @@ +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Natural_VecVecs; with Standard_Integer_VecVecs; with Standard_Complex_Vectors; @@ -20,17 +21,17 @@ -- EVALUATION OF THE MONOMIALS : function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector; @@ -40,17 +41,17 @@ -- at the complex vector x. There is no intermediate output. function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) return QuadDobl_Complex_Vectors.Vector; @@ -62,19 +63,19 @@ -- EVALUATION OF THE DENSE FLATTENED SYSTEM : function Silent_Eval - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) @@ -86,19 +87,19 @@ -- There is no intermediate output. function Reporting_Eval - ( n : natural; + ( n : integer32; A : Standard_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; A : DoblDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; A : QuadDobl_Complex_Matrices.Matrix; v : Standard_Integer_VecVecs.VecVec; x : QuadDobl_Complex_Vectors.Vector ) @@ -112,21 +113,21 @@ -- EVALUATION OF THE SPARSE FLATTENED SYSTEM : function Silent_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Silent_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -139,21 +140,21 @@ -- There is no intermediate output. function Reporting_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Reporting_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -168,21 +169,21 @@ -- EVALUATION OF THE SPARSE FLATTENED SYSTEM with LOOPING Workers : function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Silent_Looping_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; @@ -195,21 +196,21 @@ -- There is no intermediate output. function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : Standard_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : Standard_Complex_Vectors.Vector ) return Standard_Complex_Vectors.Vector; function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : DoblDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; x : DoblDobl_Complex_Vectors.Vector ) return DoblDobl_Complex_Vectors.Vector; function Reporting_Looping_Eval - ( n : natural; + ( n : integer32; c : QuadDobl_Complex_VecVecs.VecVec; v : Standard_Integer_VecVecs.VecVec; k : Standard_Natural_VecVecs.VecVec; diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_sampling.adb phcpack-2.4.85/src/Ada/Tasking/multitasking_sampling.adb --- phcpack-2.4.84/src/Ada/Tasking/multitasking_sampling.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_sampling.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,7 @@ -with integer_io; use integer_io; with Communications_with_User; use Communications_with_User; with Timing_Package; use Timing_Package; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Standard_Random_Numbers; use Standard_Random_Numbers; with Standard_Natural_Vectors; @@ -26,7 +27,7 @@ h : in Standard_Complex_VecVecs.VecVec ) return Poly_Sys is - d : constant natural := h'last; + d : constant integer32 := h'last; res : Poly_Sys(p'range); begin @@ -40,7 +41,7 @@ end Change_Slices; procedure Silent_Sampler - ( s : in out Solution_List; n,d : in natural; + ( s : in out Solution_List; n,d : in integer32; h : in Standard_Complex_VecVecs.VecVec; gamma : in Complex_Number; q : in Poly_Sys; p : out Poly_Sys ) is @@ -52,7 +53,7 @@ end Silent_Sampler; procedure Reporting_Sampler - ( s : in out Solution_List; n,d : in natural; + ( s : in out Solution_List; n,d : in integer32; h : in Standard_Complex_VecVecs.VecVec; gamma : in Complex_Number; q : in Poly_Sys; p : out Poly_Sys ) is @@ -64,13 +65,13 @@ end Reporting_Sampler; procedure Driver_to_Sampler - ( file : in file_type; n,d : in natural; + ( file : in file_type; n,d : in integer32; ep : in Poly_Sys; esols : in out Solution_List ) is target : Poly_Sys(ep'range); - h : Standard_Complex_VecVecs.VecVec(1..d) - := Witness_Sets.Random_Hyperplanes(d,ep'last); - gamma : Complex_Number := Random1; + h : constant Standard_Complex_VecVecs.VecVec(1..d) + := Witness_Sets.Random_Hyperplanes(natural32(d),natural32(ep'last)); + gamma : constant Complex_Number := Random1; ans : character; timer : Timing_Widget; @@ -101,7 +102,7 @@ -- Returns the vector of inner products of the vector in key -- with the solutions in s. - res : Standard_Complex_Vectors.Vector(1..Length_Of(s)); + res : Standard_Complex_Vectors.Vector(1..integer32(Length_Of(s))); tmp : Solution_List := s; ls : Link_to_Solution; @@ -126,7 +127,7 @@ -- REQUIRED : Length_Of(s1) = Length_Of(s2). - dim : constant natural := Length_Of(s1); + dim : constant integer32 := integer32(Length_Of(s1)); res : Standard_Natural_Vectors.Vector(1..dim); k1 : constant Standard_Complex_Vectors.Vector(1..dim) := Keys(k,s1); k2 : constant Standard_Complex_Vectors.Vector(1..dim) := Keys(k,s2); @@ -138,7 +139,7 @@ procedure Update_Decomposition ( deco : in out Standard_Natural_VecVecs.Link_to_VecVec; - nbfac : in out natural; + nbfac : in out integer32; k : in Standard_Complex_Vectors.Vector; s1,s2 : in Solution_List; tol : double_float ) is @@ -146,34 +147,35 @@ -- Updates the current decomposition with two solution lists -- obtained after one loop. - p : Standard_Natural_Vectors.Vector(1..Length_Of(s1)) := Map(k,s1,s2,tol); + p : Standard_Natural_Vectors.Vector(1..integer32(Length_Of(s1))) + := Map(k,s1,s2,tol); begin put_line("the permutation : "); put(p); new_line; - Monodromy_Partitions.Add_Map(deco,nbfac,p); + Monodromy_Partitions.Add_Map(deco,natural32(nbfac),p); put("number of irreducible factors : "); put(nbfac,1); put_line(" :"); Monodromy_Partitions.Write_Factors(standard_output,deco.all); end Update_Decomposition; procedure Driver_to_Monodromy - ( file : in file_type; n,d : in natural; + ( file : in file_type; n,d : in integer32; ep : in Poly_Sys; esols : in out Solution_List ) is tol : constant double_float := 1.0E-8; target_alpha,target_beta : Poly_Sys(ep'range); s : Standard_Complex_VecVecs.VecVec(1..d) - := Witness_Sets.Slices(ep,d); + := Witness_Sets.Slices(ep,natural32(d)); h : Standard_Complex_VecVecs.VecVec(1..d); - dim : constant natural := ep'last-d; + dim : constant integer32 := ep'last-d; key : Standard_Complex_Vectors.Vector(1..dim) := Standard_Random_Vectors.Random_Vector(1,dim); alpha,beta : Complex_Number; timer : Timing_Widget; sols0 : Solution_List; - degree : constant natural := Length_Of(esols); + degree : constant natural32 := Length_Of(esols); deco : Standard_Natural_VecVecs.Link_to_VecVec := Monodromy_Partitions.Init_Factors(degree); - nbfac : natural := degree; + nbfac : integer32 := integer32(degree); begin Copy(esols,sols0); @@ -181,7 +183,7 @@ tstart(timer); for i in 1..10 loop -- put_line("going forward ..."); - h := Witness_Sets.Random_Hyperplanes(d,ep'last); + h := Witness_Sets.Random_Hyperplanes(natural32(d),natural32(ep'last)); alpha := Random1; beta := Random1; Silent_Sampler(esols,n,d,h,alpha,ep,target_alpha); -- put(file,target_alpha,esols); diff -Nru phcpack-2.4.84/src/Ada/Tasking/multitasking_sampling.ads phcpack-2.4.85/src/Ada/Tasking/multitasking_sampling.ads --- phcpack-2.4.84/src/Ada/Tasking/multitasking_sampling.ads 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/multitasking_sampling.ads 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ with text_io; use text_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Complex_Numbers; use Standard_Complex_Numbers; with Standard_Complex_VecVecs; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; @@ -23,12 +24,12 @@ -- REQUIRED : h'range = 1..d. procedure Silent_Sampler - ( s : in out Solution_List; n,d : in natural; + ( s : in out Solution_List; n,d : in integer32; h : in Standard_Complex_VecVecs.VecVec; gamma : in Complex_Number; q : in Poly_Sys; p : out Poly_Sys ); procedure Reporting_Sampler - ( s : in out Solution_List; n,d : in natural; + ( s : in out Solution_List; n,d : in integer32; h : in Standard_Complex_VecVecs.VecVec; gamma : in Complex_Number; q : in Poly_Sys; p : out Poly_Sys ); @@ -51,7 +52,7 @@ --- in particular, we have: p = Change_Slices(q,d,h). procedure Driver_to_Sampler - ( file : in file_type; n,d : in natural; + ( file : in file_type; n,d : in integer32; ep : in Poly_Sys; esols : in out Solution_List ); -- DESCRIPTION : @@ -69,7 +70,7 @@ -- esols embedded list of solution for ep. procedure Driver_to_Monodromy - ( file : in file_type; n,d : in natural; + ( file : in file_type; n,d : in integer32; ep : in Poly_Sys; esols : in out Solution_List ); -- DESCRIPTION : diff -Nru phcpack-2.4.84/src/Ada/Tasking/number_of_cores.adb phcpack-2.4.85/src/Ada/Tasking/number_of_cores.adb --- phcpack-2.4.84/src/Ada/Tasking/number_of_cores.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/number_of_cores.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,9 +1,13 @@ +with System.Multiprocessors; + function Number_of_Cores return integer32 is - function core_count return integer32; - pragma import(C, core_count, "corecount"); + -- function core_count return integer32; + -- pragma import(C, core_count, "corecount"); + -- res : constant integer32 := core_count; - res : constant integer32 := core_count; + res : constant integer32 + := integer32(System.Multiprocessors.Number_of_CPUs); begin return res; diff -Nru phcpack-2.4.84/src/Ada/Tasking/READ_ME phcpack-2.4.85/src/Ada/Tasking/READ_ME --- phcpack-2.4.84/src/Ada/Tasking/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Multitasked linear algebra, evaluation and path tracking in PHCv2.4.83 +Multitasked linear algebra, evaluation and path tracking in PHCv2.4.85 This directory is entirely new in release 2.3.45 of PHCpack. Tasks in Ada are mapped to kernel threads. @@ -26,6 +26,11 @@ With this pipelining, the tracking of the paths is interlaced with the mixed volume computation. +Run "gprbuild tasking.gpr" to make all test programs. +On windows, type "gprbuild tasking.gpr -Xos=windows" +at the PowerShell prompt. +The "gprclean tasking.gpr" removes all files created by gprbuild. + ------------------------------------------------------------------------------- file name : short description ------------------------------------------------------------------------------- diff -Nru phcpack-2.4.84/src/Ada/Tasking/tasking.gpr phcpack-2.4.85/src/Ada/Tasking/tasking.gpr --- phcpack-2.4.84/src/Ada/Tasking/tasking.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/tasking.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,140 @@ +project tasking is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + (".", "../System", "../System/Unix_Timer", + "../Math_Lib/Numbers", "../Math_Lib/QD", + "../Math_Lib/Vectors", "../Math_Lib/Matrices", + "../Math_Lib/Reduction", "../Math_Lib/Divisors", + "../Math_Lib/Polynomials", "../Math_Lib/Functions", + "../Math_Lib/Series", "../Math_Lib/Circuits", + "../Math_Lib/Supports", + "../Deformations/Solutions", "../Deformations/Homotopy", + "../Deformations/Newton", "../Deformations/Curves", + "../Deformations/Trackers", "../Deformations/End_Games", + "../Deformations/Sweep", "../Deformations/Continuation", + "../Root_Counts/Product", "../Root_Counts/Binomials", + "../Root_Counts/Implift", "../Root_Counts/Stalift", + "../Root_Counts/MixedVol", "../Root_Counts/DEMiCs", + "../Root_Counts/Dynlift", "../Root_Counts/Symmetry", + "../Components/Samplers", "../Components/Factorization", + "../Components/Interpolators", "../Components/Decomposition", + "../Components/Solver", "../Components/Tropical", + "../Schubert/SAGBI", "../Schubert/Pieri", + "../Schubert/Induction", + "../CtoPHC/Types", "../CtoPHC/Structures", + "../CtoPHC/State", "../Main"); + for Languages use ("Ada", "C", "C++"); + for Excluded_Source_Files use + ( + "corecount.c", "corecountwindows.c", + "double_double.c", "relation_table.c", "cell_stack.c", + "zero_index_tree.c", "index_tree_lp.c", "mixed_volume.c", + "mv.c", "prepare_for_mv.c", "one_level_lp.c", "form_lp.c" + ); + when "windows" => + for Source_Dirs use + ( + ".", "../System", "../System/Basic_Timer", + "../Math_Lib/Numbers", "../Math_Lib/QD", + "../Math_Lib/Vectors", "../Math_Lib/Matrices", + "../Math_Lib/Reduction", "../Math_Lib/Divisors", + "../Math_Lib/Polynomials", "../Math_Lib/Functions", + "../Math_Lib/Series", "../Math_Lib/Circuits", + "../Math_Lib/Supports", + "../Deformations/Solutions", "../Deformations/Homotopy", + "../Deformations/Newton", "../Deformations/Curves", + "../Deformations/Trackers", "../Deformations/End_Games", + "../Deformations/Sweep", "../Deformations/Continuation", + "../Root_Counts/Product", "../Root_Counts/Binomials", + "../Root_Counts/Implift", "../Root_Counts/Stalift", + "../Root_Counts/MixedVol", "../Root_Counts/DEMiCs", + "../Root_Counts/Dynlift", "../Root_Counts/Symmetry", + "../Components/Samplers", "../Components/Factorization", + "../Components/Interpolators", "../Components/Decomposition", + "../Components/Solver", "../Components/Tropical", + "../Schubert/SAGBI", "../Schubert/Pieri", + "../Schubert/Induction", + "../CtoPHC/Types", "../CtoPHC/Structures", + "../CtoPHC/State", "../Main" + ); + for Excluded_Source_Files use + ( + "double_double.c", + "corecount.c", "zero_index_tree.c", "index_tree_lp.c", + "relation_table.c", "prepare_for_mv.c", "one_level_lp.c", + "mv.c", "mixed_volume.c", "form_lp.c", "cell_stack.c" + ); + for Languages use ("Ada", "C", "C++"); + end case; + + for Object_Dir use "../../Objects"; + for Exec_Dir use "../../bin"; + + for Main use + ( + -- "use_c2phc.adb", + "ts_corecount.adb", -- prints the number of cores + "ts_tasking.adb", -- tests task creation + "ts_mutex.adb", -- tests mutual exclusion + "ts_jobs.adb", -- tests dynamic job scheduling + "ts_mtmatvec.adb", -- tests multitasked matrix*vector + "ts_mtpolval.adb", -- tests multitasked polynomial evaluation + "ts_mtlinsol.adb", -- tests multitasked linear system solving + "ts_mtsols.adb", -- multitasking on solutions + "ts_mtstref.adb", -- multitasking solution refinement + "ts_mtddref.adb", -- multitasking refiner with dd cmplx numbers + "ts_mtqdref.adb", -- multitasking refiner with qd cmplx numbers + "ts_mtsharp.adb", -- multitasking multiprecision refinement + "ts_mtcont.adb", -- tests multitasking continuation + "ts_mtsam.adb", -- tests multitasking sampling + "ts_mtvol.adb", -- tests multitasking volume computation + "ts_mtvolcon.adb", -- tests polyhedral path trackers + "ts_mtmva.adb", -- tests cell production/processing + "ts_mtverify.adb", -- tesst multitasked root refinement + "ts_mtperm.adb", -- tests multitasked permanent computation + "ts_mtmbthom.adb", -- tests multitasked homotopy membertest + "ts_mtcelidx.adb", -- tests pipelining cell indices + "ts_mtadcnv.adb", -- tests multitasked algorithmic differentiation + "ts_mtserlin.adb", -- tests multitasked linearization + "ts_mtnewton.adb", -- tests multitasked Newton + "ts_mthessian.adb", -- tests multitasked Hessian + "ts_mthesscrc.adb", -- tests multitasked Hessian circuits + "ts_mtratapp.adb", -- tests multitasked Pade approximation + "ts_mtshiftcnv.adb", -- tests multitasked shift circuits + "ts_mtpcscnv.adb" -- tests predictor-corrector-shift loops + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("use_c2phc.adb") use ("-c"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + end Compiler; + + package Binder is + + for Switches ("use_c2phc.adb") use ("-n"); + + end Binder; + +end tasking; diff -Nru phcpack-2.4.84/src/Ada/Tasking/ts_mtcelidx.adb phcpack-2.4.85/src/Ada/Tasking/ts_mtcelidx.adb --- phcpack-2.4.84/src/Ada/Tasking/ts_mtcelidx.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/ts_mtcelidx.adb 2021-06-30 23:22:40.000000000 +0000 @@ -40,8 +40,8 @@ with Multitasking; with Polyhedral_Start_Systems; use Polyhedral_Start_Systems; with Pipelined_Cell_Trackers; use Pipelined_Cell_Trackers; - with Pipelined_Polyhedral_Homotopies; use Pipelined_Polyhedral_Homotopies; +with use_c2phc; -- to force compilation ... procedure ts_mtcelidx is diff -Nru phcpack-2.4.84/src/Ada/Tasking/ts_mtcont.adb phcpack-2.4.85/src/Ada/Tasking/ts_mtcont.adb --- phcpack-2.4.84/src/Ada/Tasking/ts_mtcont.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/ts_mtcont.adb 2021-06-30 23:22:40.000000000 +0000 @@ -11,7 +11,7 @@ with Standard_Homotopy; with Standard_Complex_Solutions; use Standard_Complex_Solutions; with Standard_System_and_Solutions_io; use Standard_System_and_Solutions_io; -with Drivers_for_Poly_Continuation; use Drivers_for_Poly_Continuation; +with Main_Poly_Continuation; use Main_Poly_Continuation; with Multitasking_Continuation; use Multitasking_Continuation; procedure ts_mtcont is diff -Nru phcpack-2.4.84/src/Ada/Tasking/ts_mtmatvec.adb phcpack-2.4.85/src/Ada/Tasking/ts_mtmatvec.adb --- phcpack-2.4.84/src/Ada/Tasking/ts_mtmatvec.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/ts_mtmatvec.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,5 +1,7 @@ with text_io; use text_io; with Multitasking; use Multitasking; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Complex_Vectors; @@ -117,7 +119,7 @@ A : constant Standard_Complex_Matrices.Matrix := Standard_Random_Matrices.Random_Matrix(r,c); v : constant Standard_Complex_Vectors.Vector - := Standard_Random_Vectors.Random_Vector(1,c); + := Standard_Random_Vectors.Random_Vector(1,integer32(c)); begin Run_Standard_Multiply(A,v); @@ -132,7 +134,7 @@ A : constant DoblDobl_Complex_Matrices.Matrix := DoblDobl_Random_Matrices.Random_Matrix(r,c); v : constant DoblDobl_Complex_Vectors.Vector - := DoblDobl_Random_Vectors.Random_Vector(1,c); + := DoblDobl_Random_Vectors.Random_Vector(1,integer32(c)); begin Run_DoblDobl_Multiply(A,v); @@ -147,7 +149,7 @@ A : constant QuadDobl_Complex_Matrices.Matrix := QuadDobl_Random_Matrices.Random_Matrix(r,c); v : constant QuadDobl_Complex_Vectors.Vector - := QuadDobl_Random_Vectors.Random_Vector(1,c); + := QuadDobl_Random_Vectors.Random_Vector(1,integer32(c)); begin Run_QuadDobl_Multiply(A,v); diff -Nru phcpack-2.4.84/src/Ada/Tasking/ts_mtpolval.adb phcpack-2.4.85/src/Ada/Tasking/ts_mtpolval.adb --- phcpack-2.4.84/src/Ada/Tasking/ts_mtpolval.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/ts_mtpolval.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,6 +1,9 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; with Timing_Package; use Timing_Package; with Communications_with_User; use Communications_with_User; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; +with Standard_Integer_Numbers_io; use Standard_Integer_Numbers_io; with Standard_Random_Numbers; with Standard_Natural_VecVecs; with Standard_Integer_VecVecs; @@ -53,7 +56,7 @@ -- needs to be fixed or not. Allows the user to give a seed. ans : character; - seed : natural; + seed : integer32 := 0; begin put("Set the seed for the random number generator ? (y/n) "); @@ -61,12 +64,12 @@ if ans = 'y' then put("Give a value for the seed : "); get(seed); put("Setting the seed to "); put(seed,1); put_line("."); - Standard_Random_Numbers.Set_Seed(seed); + Standard_Random_Numbers.Set_Seed(natural32(seed)); end if; end Prompt_to_Fix_Seed; function Standard_Random_System - ( n,d,m : natural) + ( n,d,m : integer32) return Standard_Complex_Poly_Systems.Poly_Sys is -- DESCRIPTION : @@ -84,8 +87,9 @@ Prompt_to_Fix_Seed; for i in 1..n loop if m = 0 - then res(i) := Random_Dense_Poly(n,d,0); - else res(i) := Random_Sparse_Poly(n,d,m,0); + then res(i) := Random_Dense_Poly(natural32(n),natural32(d),0); + else res(i) := Random_Sparse_Poly + (natural32(n),natural32(d),natural32(m),0); end if; end loop; for i in 1..n loop @@ -97,7 +101,7 @@ end Standard_Random_System; function DoblDobl_Random_System - ( n,d,m : natural) + ( n,d,m : integer32) return DoblDobl_Complex_Poly_Systems.Poly_Sys is -- DESCRIPTION : @@ -115,8 +119,9 @@ Prompt_to_Fix_Seed; for i in 1..n loop if m = 0 - then res(i) := Random_Dense_Poly(n,d,0); - else res(i) := Random_Sparse_Poly(n,d,m,0); + then res(i) := Random_Dense_Poly(natural32(n),natural32(d),0); + else res(i) := Random_Sparse_Poly + (natural32(n),natural32(d),natural32(m),0); end if; end loop; for i in 1..n loop @@ -128,7 +133,7 @@ end DoblDobl_Random_System; function QuadDobl_Random_System - ( n,d,m : natural) + ( n,d,m : integer32) return QuadDobl_Complex_Poly_Systems.Poly_Sys is -- DESCRIPTION : @@ -146,8 +151,9 @@ Prompt_to_Fix_Seed; for i in 1..n loop if m = 0 - then res(i) := Random_Dense_Poly(n,d,0); - else res(i) := Random_Sparse_Poly(n,d,m,0); + then res(i) := Random_Dense_Poly(natural32(n),natural32(d),0); + else res(i) := Random_Sparse_Poly + (natural32(n),natural32(d),natural32(m),0); end if; end loop; for i in 1..n loop @@ -159,7 +165,7 @@ end QuadDobl_Random_System; procedure Standard_Dense_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in Standard_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -202,7 +208,7 @@ end Standard_Dense_Test; procedure Standard_Sparse_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in Standard_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -241,7 +247,7 @@ end loop; end Standard_Sparse_Test; - procedure Standard_Test ( nt,n,d,m : in natural ) is + procedure Standard_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Tests evaluation at a random system. @@ -259,7 +265,7 @@ end if; end Standard_Test; - procedure Standard_Performance_Test ( nt,n,d,m : in natural ) is + procedure Standard_Performance_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Generates a random system of dimension n, with largest degree d @@ -269,7 +275,7 @@ p : constant Standard_Complex_Poly_Systems.Poly_Sys := Standard_Random_System(n,d,m); - ntimes : natural; + ntimes : integer32; timer : Timing_Widget; sup : List := Standard_Polynomial_Flatteners.Distinct_Supports(p); lsp : List := Lexicographical_Supports.Sort(sup); @@ -297,7 +303,7 @@ end Standard_Performance_Test; procedure DoblDobl_Dense_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in DoblDobl_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -341,7 +347,7 @@ end DoblDobl_Dense_Test; procedure DoblDobl_Sparse_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in DoblDobl_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -380,7 +386,7 @@ end loop; end DoblDobl_Sparse_Test; - procedure DoblDobl_Test ( nt,n,d,m : in natural ) is + procedure DoblDobl_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Tests evaluation at a random system. @@ -398,7 +404,7 @@ end if; end DoblDobl_Test; - procedure DoblDobl_Performance_Test ( nt,n,d,m : in natural ) is + procedure DoblDobl_Performance_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Generates a random system of dimension n, with largest degree d @@ -408,7 +414,7 @@ p : constant DoblDobl_Complex_Poly_Systems.Poly_Sys := DoblDobl_Random_System(n,d,m); - ntimes : natural; + ntimes : integer32; timer : Timing_Widget; sup : List := DoblDobl_Polynomial_Flatteners.Distinct_Supports(p); lsp : List := Lexicographical_Supports.Sort(sup); @@ -436,7 +442,7 @@ end DoblDobl_Performance_Test; procedure QuadDobl_Dense_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in QuadDobl_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -480,7 +486,7 @@ end QuadDobl_Dense_Test; procedure QuadDobl_Sparse_Test - ( nt,n : in natural; + ( nt,n : in integer32; p : in QuadDobl_Complex_Poly_Systems.Poly_Sys ) is -- DESCRIPTION : @@ -519,7 +525,7 @@ end loop; end QuadDobl_Sparse_Test; - procedure QuadDobl_Test ( nt,n,d,m : in natural ) is + procedure QuadDobl_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Tests evaluation at a random system. @@ -537,7 +543,7 @@ end if; end QuadDobl_Test; - procedure QuadDobl_Performance_Test ( nt,n,d,m : in natural ) is + procedure QuadDobl_Performance_Test ( nt,n,d,m : in integer32 ) is -- DESCRIPTION : -- Generates a random system of dimension n, with largest degree d @@ -547,7 +553,7 @@ p : constant QuadDobl_Complex_Poly_Systems.Poly_Sys := QuadDobl_Random_System(n,d,m); - ntimes : natural; + ntimes : integer32; timer : Timing_Widget; sup : List := QuadDobl_Polynomial_Flatteners.Distinct_Supports(p); lsp : List := Lexicographical_Supports.Sort(sup); @@ -587,7 +593,7 @@ procedure Main is - n,d,m,nt : natural; + n,d,m,nt : integer32 := 0; ans : character; begin diff -Nru phcpack-2.4.84/src/Ada/Tasking/ts_mtsam.adb phcpack-2.4.85/src/Ada/Tasking/ts_mtsam.adb --- phcpack-2.4.84/src/Ada/Tasking/ts_mtsam.adb 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/ts_mtsam.adb 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,7 @@ -with text_io,integer_io; use text_io,integer_io; +with text_io; use text_io; +with Standard_Natural_Numbers; use Standard_Natural_Numbers; +with Standard_Natural_Numbers_io; use Standard_Natural_Numbers_io; +with Standard_Integer_Numbers; use Standard_Integer_Numbers; with Communications_with_User; use Communications_with_User; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; with Standard_Complex_Solutions; use Standard_Complex_Solutions; @@ -12,7 +15,7 @@ procedure Main is - n,d : natural; + n,d : natural32 := 0; p : Link_to_Poly_Sys; sols : Solution_List; file : file_type; @@ -29,7 +32,8 @@ put_line("Reading the name of the output file ..."); Read_Name_and_Create_File(file); -- Multitasking_Sampling.Driver_to_Sampler(file,n,d,p.all,sols); - Multitasking_Sampling.Driver_to_Monodromy(file,n,d,p.all,sols); + Multitasking_Sampling.Driver_to_Monodromy + (file,integer32(n),integer32(d),p.all,sols); end Main; begin diff -Nru phcpack-2.4.84/src/Ada/Tasking/UPDATES phcpack-2.4.85/src/Ada/Tasking/UPDATES --- phcpack-2.4.84/src/Ada/Tasking/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Ada/Tasking/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,17 @@ +Thu 17 Jun 2021 : added "with use_c2phc;" to ts_mtcelidx.adb to force the + compilation of use_c2phc when building with the updated tasking.gpr. + +Mon 14 Jun 2021 : fixed ts_mtmatvec, ts_mtpolval, ts_mtsam, and the packages + multitasking_{matrix_x_vector,polynomial_functions,sampling}, + updated tasking.gpr. + +Sat 12 Jun 2021 : fixed ts_mtcont.adb, updated tasking.gpr. + +Fri 11 Jun 2021 : defined tasking.gpr to build the test procedures. + +Mon 31 May 2021 : number_of_cores.adb uses System.Multiprocessors instead + of the C interface. + Sat 5 Dec 2020 : new package multitasked_power_newton with code extracted from test_mtnewton_convolutions.adb. diff -Nru phcpack-2.4.84/src/doc/source/conf.py phcpack-2.4.85/src/doc/source/conf.py --- phcpack-2.4.84/src/doc/source/conf.py 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/doc/source/conf.py 2021-06-30 23:22:40.000000000 +0000 @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '2.4.84' +version = '2.4.85' # The full version, including alpha/beta/rc tags. -release = '2.4.84' +release = '2.4.85' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -Nru phcpack-2.4.84/src/doc/source/options.rst phcpack-2.4.85/src/doc/source/options.rst --- phcpack-2.4.84/src/doc/source/options.rst 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/doc/source/options.rst 2021-06-30 23:22:40.000000000 +0000 @@ -566,8 +566,8 @@ will give two generic points on the sphere, computed in quad double precision. -phc -m : mixed volume computation via lift+prune and MixedVol -============================================================= +phc -m : mixed volumes, MixedVol, DEMiCs, polyhedral homotopies +=============================================================== The menu choices of ``phc -m`` are a subset of the menu of ``phc -r``. The focus on ``phc -m`` is on mixed volumes. For polynomial systems diff -Nru phcpack-2.4.84/src/doc/source/refman.rst phcpack-2.4.85/src/doc/source/refman.rst --- phcpack-2.4.84/src/doc/source/refman.rst 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/doc/source/refman.rst 2021-06-30 23:22:40.000000000 +0000 @@ -71,57 +71,60 @@ :: - Ada : Ada source code of PHC - |-- System : 0. OS dependencies, e.g.: timing package - |-- Math_Lib : 1. general mathematical library - | |-- Numbers : 1.1. number representations - | |-- QD : 1.2. multiple double arithmetic - | |-- Vectors : 1.3. vectors and vectors of vectors - | |-- Matrices : 1.4. matrices and linear-system solvers - | |-- Divisors : 1.5. common divisors, integer linear algebra - | |-- Reduction : 1.6. row reduction, numerical linear algebra - | |-- Polynomials : 1.7. multivariate polynomial systems - | |-- Functions : 1.8. evaluation and differentiation - | |-- Supports : 1.9. support sets and linear programming - | |-- Circuits : 1.A. circuits for algorithmic differentation - | |-- Series : 1.B. manipulating truncated series - | |-- AD : 1.C. algorithmic differentiation of Path library - |-- Deformations : 2. homotopies, Newton's method & path trackers - | |-- Solutions : 2.1. solutions of systems and homotopies - | |-- Homotopy : 2.2. homotopies, scaling and reduction - | |-- Newton : 2.3. root refining and modified Newton's method - | |-- Curves : 2.4. univariate solving & plane algebraic curves - | |-- End_Games : 2.5. extrapolation end games with Puiseux series - | |-- Trackers : 2.6. path-tracking routines - | |-- Sweep : 2.7. sweeping for singularities - | |-- Continuation : 2.8. drivers and data management - |-- Root_Counts : 3. root counts and homotopy construction - | |-- Product : 3.1. linear-product start systems - | |-- Binomials : 3.2. solvers for binomial and simplicial systems - | |-- Implift : 3.3. implicit lifting - | |-- Stalift : 3.4. static lifting - | |-- Dynlift : 3.5. dynamic lifting - | |-- Symmetry : 3.6. exploitation of symmetry relations - | |-- MixedVol : 3.7. translation of ACM TOMS Algorithm 846 - | |-- DEMiCs : 3.8. interface to the DEMiCs program - | |-- Puiseux : 3.9. Puiseux series for curves - |-- Schubert : 4. numerical Schubert calculus - | |-- SAGBI : 4.1. SAGBI homotopies - | |-- Pieri : 4.2. deformations based on Pieri's rule - | |-- Induction : 4.3. Schubert induction - |-- Components : 5. numerical irreducible decomposition - | |-- Samplers : 5.1. computing witness points - | |-- Interpolators : 5.2. finding equations for components - | |-- Factorization : 5.3. factorization into irreducible components - | |-- Decomposition : 5.4. sequence of homotopies to filter and factor - | |-- Solver : 5.5. incremental equation by equation solver - | |-- Tropical : 5.6. tropical view on witness sets - |-- CtoPHC : 6. interface from C to phc - | |-- Funky : 6.1. functional interface, C -> Ada -> C - | |-- State : 6.2. state machine gateway, C <-> Ada - |-- PHCtoC : 7. GPU acceleration via a C interface - |-- Tasking : 8. multitasking - |-- Main : 9. main dispatcher + Ada : Ada source code of PHC + |-- System : 0. OS dependencies, e.g.: timing package + |-- Math_Lib : 1. general mathematical library + | |-- Numbers : 1.1. number representations + | |-- QD : 1.2. multiple double arithmetic + | |-- Vectors : 1.3. vectors and vectors of vectors + | |-- Matrices : 1.4. matrices and linear-system solvers + | |-- Divisors : 1.5. common divisors, integer linear algebra + | |-- Reduction : 1.6. row reduction, numerical linear algebra + | |-- Polynomials : 1.7. multivariate polynomial systems + | |-- Functions : 1.8. evaluation and differentiation + | |-- Supports : 1.9. support sets and linear programming + | |-- Circuits : 1.A. circuits for algorithmic differentation + | |-- Series : 1.B. manipulating truncated series + | |-- Laurent : 1.C. series with integer leading exponents + | |-- AD : 1.D. algorithmic differentiation of Path library + |-- Deformations : 2. homotopies, Newton's method & path trackers + | |-- Solutions : 2.1. solutions of systems and homotopies + | |-- Homotopy : 2.2. homotopies, scaling and reduction + | |-- Newton : 2.3. root refining and modified Newton's method + | |-- Curves : 2.4. univariate solving & plane algebraic curves + | |-- End_Games : 2.5. extrapolation end games with Puiseux series + | |-- Trackers : 2.6. path-tracking routines + | |-- Sweep : 2.7. sweeping for singularities + | |-- Continuation : 2.8. drivers and data management + |-- Root_Counts : 3. root counts and homotopy construction + | |-- Product : 3.1. linear-product start systems + | |-- Binomials : 3.2. solvers for binomial and simplicial systems + | |-- Implift : 3.3. implicit lifting + | |-- Stalift : 3.4. static lifting + | |-- Dynlift : 3.5. dynamic lifting + | |-- Symmetry : 3.6. exploitation of symmetry relations + | |-- MixedVol : 3.7. translation of ACM TOMS Algorithm 846 + | |-- DEMiCs : 3.8. interface to the DEMiCs program + | |-- Puiseux : 3.9. Puiseux series for curves + |-- Schubert : 4. numerical Schubert calculus + | |-- SAGBI : 4.1. SAGBI homotopies + | |-- Pieri : 4.2. deformations based on Pieri's rule + | |-- Induction : 4.3. Schubert induction + |-- Components : 5. numerical irreducible decomposition + | |-- Samplers : 5.1. computing witness points + | |-- Interpolators : 5.2. finding equations for components + | |-- Factorization : 5.3. factorization into irreducible components + | |-- Decomposition : 5.4. sequence of homotopies to filter and factor + | |-- Solver : 5.5. incremental equation by equation solver + | |-- Tropical : 5.6. tropical view on witness sets + |-- CtoPHC : 6. interface from C to phc + | |-- Types : 6.1. C types equivalent to Ada + | |-- Structures : 6.2. system and solution wrappers + | |-- Funky : 6.3. functional interface, C -> Ada -> C + | |-- State : 6.4. state machine gateway, C <-> Ada + |-- PHCtoC : 7. GPU acceleration via a C interface + |-- Tasking : 8. multitasking + |-- Main : 9. the main programs Every directory contains a collection of test procedures. The following sections describe the functionality defined @@ -303,7 +306,7 @@ For sparse system, the information of the Newton polytopes provides a much sharper root count than the ones provided by the degrees. -There are eight subdirecties in the ``Root_Counts`` directory. +There are nine subdirecties in the ``Root_Counts`` directory. Total degree and linear-product start systems are constructed in the subdirectory ``Product``. The subdirectory ``Binomials`` provides solvers for the sparsest polynomial systems. @@ -311,6 +314,8 @@ implement polyhedral homotopies, respectively with implicit, static, and dynamic lifting methods. In ``MixedVol`` is an adaptation of a fast mixed volume calculator. +The code in the folder ``DEMiCs`` applies dynamic enumeration +to compute mixed cells. Code to exploit permutation symmetry is in the subdirectory ``Symmetry``. A generalization of the Newton-Puiseux algorithm is implemented in the subdirectory ``Puiseux``. @@ -388,6 +393,8 @@ which define two different types of interfacing the Ada code with C. The first type is a functional interface, the second type is an interface which operates as a state machine. +The first folder ``Types`` in ``CtoPHC`` defines the equivalenties +between the basic array types in C and in Ada. In a functional interface, the main C program calls an Ada function, which then calls a C function to process the results computed by the @@ -403,7 +410,9 @@ ``use_c2phc`` function, which defines more than 700 jobs. The implementation of this function relies on various container packages which hold the persistent objects, mainly polynomial systems -and solution lists. +and solution lists. Those container types are defined in the folder +``Structures`` intended to give the C programming access to the main +data structures. If the main program is not an Ada procedure, but a C function, then ``adainit`` and ``adafinal`` must be called by the C code, @@ -786,6 +795,9 @@ To solve Hermite-Laurent interpolation problems, a lower triangular echelon form is provided. +The directory ``Laurent`` contains code to work with series +that have a leading terms with negative or positive exponents. + Homotopies, Newton's Method, and Path Trackers ============================================== @@ -1193,6 +1205,18 @@ The code is restricted for randomly generated lifting values. +DEMiCs applies dynamic enumeration to compute mixed cells +--------------------------------------------------------- + +The code in the directory ``DEMiCs`` was developed by +Tomohiko Mizutani, Akiko Takeda, and Masakazu Kojima. +The directory contains the original code with a basic interface +and a second interface that calls the code modified with +callback functions. + +The pace at which the mixed cells are computed is faster than +MixedVol which is beneficial for pipelined polyhedral homotopies. + The Newton-Puiseux Method ------------------------- diff -Nru phcpack-2.4.84/src/doc/source/welcome.rst phcpack-2.4.85/src/doc/source/welcome.rst --- phcpack-2.4.84/src/doc/source/welcome.rst 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/doc/source/welcome.rst 2021-06-30 23:22:40.000000000 +0000 @@ -141,6 +141,13 @@ with other object code compiled by another version of gcc, for example gcc 4.9.2. +Last but certainly not least, programs can be build with +the ``GPRbuild`` of the the GNAT Project Manager, +a multi-language builder tool. +The folders of the source contain each one file with the extension +``.gpr`` which defines the build-related characteristics of the +main programs provided in the source folder. + Project History =============== diff -Nru phcpack-2.4.84/src/Feedback/feedback.c phcpack-2.4.85/src/Feedback/feedback.c --- phcpack-2.4.84/src/Feedback/feedback.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Feedback/feedback.c 2021-06-30 23:22:40.000000000 +0000 @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "timer.h" @@ -21,6 +22,9 @@ double *pts, double *input, char *filename ); extern void adafinal(); +void skip_info(FILE *ifp); +/* skips the dimensions information */ + void feedback ( int n, int m, int p, int q, int nb, int output_level, int nn, int input, char *ifn, char *ofn ); @@ -77,6 +81,20 @@ return 0; } +void skip_info(FILE *ifp) +{ + int i; + char s[30]; + + i=0; + while(1) /*skips all the space before the first number*/ + { + if(!isspace(fgetc(ifp))) + break; + } + fgets(s, 30, ifp); /*skips first line */ +} + void feedback ( int n, int m, int p, int q, int nb, int output_level, int nn, int input, char *ifn, char *ofn) @@ -97,7 +115,7 @@ if(input == 0) { ifp=fopen(ifn, "r"); /* open for reading */ - skip(ifp); + skip_info(ifp); read_dcmatrix0(n, n, A, ifp); printf("The given matrix A(%d*%d) is:\n", n, n); print_dcmatrix(n, n, A); @@ -119,7 +137,7 @@ if(input == 1) { ifp=fopen(ifn, "r"); /*open for reading*/ - skip(ifp); + skip_info(ifp); read_dcmatrix2(n, n, A, ifp); printf("The given matrix A(%d*%d) is:\n", n, n); print_dcmatrix(n, n, A); @@ -193,7 +211,7 @@ if(input == 4) { ifp=fopen(ifn, "r"); /*open for reading*/ - skip(ifp); + skip_info(ifp); read_dcmatrix0(n, n, A, ifp); printf( "The given matrix A(%d*%d) is:\n", n, n); print_dcmatrix(n, n, A); diff -Nru phcpack-2.4.84/src/Feedback/feedback.gpr phcpack-2.4.85/src/Feedback/feedback.gpr --- phcpack-2.4.84/src/Feedback/feedback.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Feedback/feedback.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,215 @@ +project feedback is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../Ada/System", "../Ada/System/Unix_Timer", + "../Ada/Math_Lib/Numbers", "../Ada/Math_Lib/QD", + "../Ada/Math_Lib/Vectors", "../Ada/Math_Lib/Matrices", + "../Ada/Math_Lib/Reduction", "../Ada/Math_Lib/Divisors", + "../Ada/Math_Lib/Polynomials", "../Ada/Math_Lib/Functions", + "../Ada/Math_Lib/Supports", "../Ada/Math_Lib/Series", + "../Ada/Math_Lib/Circuits", "../Ada/Math_Lib/Laurent", + "../Ada/Deformations/Solutions", + "../Ada/Deformations/Homotopy", + "../Ada/Deformations/Newton", "../Ada/Deformations/Curves", + "../Ada/Deformations/End_Games", + "../Ada/Deformations/Trackers", "../Ada/Deformations/Sweep", + "../Ada/Deformations/Continuation", + "../Ada/Root_Counts/Product", "../Ada/Root_Counts/Binomials", + "../Ada/Root_Counts/Implift", "../Ada/Root_Counts/Stalift", + "../Ada/Root_Counts/Dynlift", "../Ada/Root_Counts/Symmetry", + "../Ada/Root_Counts/MixedVol", "../Ada/Root_Counts/Puiseux", + "../Ada/Root_Counts/DEMiCs", + "../Ada/Components/Samplers", + "../Ada/Components/Interpolators", + "../Ada/Components/Factorization", + "../Ada/Components/Decomposition", + "../Ada/Components/Solver", "../Ada/Components/Tropical", + "../Ada/Schubert/SAGBI", "../Ada/Schubert/Pieri", + "../Ada/Schubert/Induction", + "../Ada/CtoPHC/Types", "../Ada/CtoPHC/Funky", + "../Ada/CtoPHC/Structures", "../Ada/CtoPHC/State", + "../Ada/Tasking", "../Ada/Main" + ); + for Languages use ("Ada", "C++", "C"); + for Excluded_Source_Files use + ( + "ts_timer.c", "ts_roots.adb", + "corecount.c", "corecountwindows.c", + "multithreading.ads", "multithreading.adb", + "ts_threads.adb", "ts_natdiv.adb", + "ts_gcd.adb", "ts_smith.adb", + "track_paths.ads", "track_paths.adb", + "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb" + ); + when "windows" => + for Source_Dirs use + ( + ".", "../Ada/System", "../Ada/System/Basic_Timer", + "../Ada/Math_Lib/Numbers", "../Ada/Math_Lib/QD", + "../Ada/Math_Lib/Vectors", "../Ada/Math_Lib/Matrices", + "../Ada/Math_Lib/Reduction", "../Ada/Math_Lib/Divisors", + "../Ada/Math_Lib/Polynomials", "../Ada/Math_Lib/Functions", + "../Ada/Math_Lib/Supports", "../Ada/Math_Lib/Series", + "../Ada/Math_Lib/Circuits", "../Ada/Math_Lib/Laurent", + "../Ada/Deformations/Solutions", + "../Ada/Deformations/Homotopy", + "../Ada/Deformations/Newton", "../Ada/Deformations/Curves", + "../Ada/Deformations/End_Games", + "../Ada/Deformations/Trackers", "../Ada/Deformations/Sweep", + "../Ada/Deformations/Continuation", + "../Ada/Root_Counts/Product", "../Ada/Root_Counts/Binomials", + "../Ada/Root_Counts/Implift", "../Ada/Root_Counts/Stalift", + "../Ada/Root_Counts/Dynlift", "../Ada/Root_Counts/Symmetry", + "../Ada/Root_Counts/MixedVol", "../Ada/Root_Counts/Puiseux", + "../Ada/Root_Counts/DEMiCs", + "../Ada/Components/Samplers", + "../Ada/Components/Interpolators", + "../Ada/Components/Factorization", + "../Ada/Components/Decomposition", + "../Ada/Components/Solver", "../Ada/Components/Tropical", + "../Ada/Schubert/SAGBI", "../Ada/Schubert/Pieri", + "../Ada/Schubert/Induction", + "../Ada/CtoPHC/Types", "../Ada/CtoPHC/Funky", + "../Ada/CtoPHC/Structures", "../Ada/CtoPHC/State", + "../Ada/Tasking", "../Ada/Main" + ); + for Languages use ("Ada", "C++", "C"); + for Excluded_Source_Files use + ( + "ts_timer.c", "ts_roots.adb", + "corecount.c", "corecountwindows.c", + "multithreading.ads", "multithreading.adb", + "ts_threads.adb", "ts_natdiv.adb", + "ts_gcd.adb", "ts_smith.adb", + "track_paths.ads", "track_paths.adb", + "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_solver_trf.adb" + ); + end case; + + for Object_Dir use "../Objects"; + for Exec_Dir use "../bin"; + + for Main use + ( + "ts_dcmplx.c", -- tests complex numbers + "ts_roots.c", -- tests root finding operations + "ts_dc_determinant.c", -- tests determinant computation + "ts_dc_inverse.c", -- tests inverse computation + "ts_gcd.c", -- tests greatest common divisor + "ts_hermite.c", -- tests Hermite normal form + "ts_smith.c", -- tests Smith normal form + "ts_multiply.c", -- tests polynomial multiplication + "ts_divide.c", -- tests polynomial division + "ts_poly_inverse.c", -- tests inverse of polynomial matrix + "ts_c2ada.c", -- tests format conversions + "ts_realization.c", -- tests the realization algorithms + "ts_feedback.c" -- tests dynamic output feedback + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("use_c2phc.adb") use ("-c"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + end Compiler; + + package Binder is + + for Switches ("use_c2phc.adb") use ("-n"); + + end Binder; + + package Linker is + + for Switches ("main.cpp") use ("-o demics"); + + end Linker; + +end feedback; diff -Nru phcpack-2.4.84/src/Feedback/poly_gcd.c phcpack-2.4.85/src/Feedback/poly_gcd.c --- phcpack-2.4.84/src/Feedback/poly_gcd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Feedback/poly_gcd.c 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,5 @@ -/* file poly_gcd.c provides an implementation of the extended gcd method */ +/* poly_gcd.c provides an implementation of the extended gcd method */ + #include #include "dc_roots.h" #include "poly_gcd.h" @@ -6,25 +7,29 @@ #include "dc_interpolation.h" #include "dcmplx.h" -POLY* ExtPolyGcd1(POLY a, POLY b) +POLY* ExtPolyGcd1 ( POLY a, POLY b ) { - dcmplx **gcd_coeff; - POLY* result=(POLY*) calloc(5, sizeof(POLY)); - int i, dgcd, dk, dl, dbd, dad; - - gcd_coeff=ExtPolyGcd(a.d+1, a.p, b.d+1, b.p, &dgcd, &dk, &dl, &dbd, &dad); - for(i=0; i<5; i++) - result[i].p=gcd_coeff[i]; - result[0].d=dk; - result[1].d=dl; - result[2].d=dgcd; - result[3].d=dbd; - result[4].d=dad; + dcmplx **gcd_coeff; + POLY* result=(POLY*) calloc(5, sizeof(POLY)); + + int i, dgcd, dk, dl, dbd, dad; + + gcd_coeff=ExtPolyGcd(a.d+1, a.p, b.d+1, b.p, &dgcd, &dk, &dl, &dbd, &dad); + + for(i=0; i<5; i++) result[i].p=gcd_coeff[i]; + + result[0].d=dk; + result[1].d=dl; + result[2].d=dgcd; + result[3].d=dbd; + result[4].d=dad; - return result; + return result; } -dcmplx** ExtPolyGcd (int n, dcmplx a[n], int m, dcmplx b[m], int *dgcd, int *dk, int *dl, int *dbd, int *dad) +dcmplx** ExtPolyGcd + ( int n, dcmplx a[n], int m, dcmplx b[m], int *dgcd, int *dk, int *dl, + int *dbd, int *dad ) { dcmplx **result=(dcmplx**) calloc(5, sizeof(dcmplx*)); dcmplx ra[n-1], rb[m-1]; @@ -112,7 +117,7 @@ return result; } - gcd( n, a, m, b, dgcd, ra, rb ); + rootsGCD(n,a,m,b,dgcd,ra,rb); *dk = m-2-*dgcd; *dl = n-2-*dgcd; @@ -200,170 +205,170 @@ } -void gcd (int n, dcmplx a[n], int m, dcmplx b[m], int *l, dcmplx ra[n-1], dcmplx -rb[m-1] ) +void rootsGCD + ( int n, dcmplx a[n], int m, dcmplx b[m], int *l, + dcmplx ra[n-1], dcmplx rb[m-1] ) { - double eps = 1.0e-12; - double tol = 1.0e-8; - double mul_tol = 1.0e-2; - int i, j, mult1[n-1], mult2[m-1] ; - int c=0; + double eps = 1.0e-12; + double tol = 1.0e-8; + double mul_tol = 1.0e-2; + + int i, j, mult1[n-1], mult2[m-1] ; + int c=0; - multiple_roots(n, a, eps, 10*n, ra, mul_tol, mult1); - multiple_roots(m, b, eps, 10*m, rb, mul_tol, mult2); + multiple_roots(n, a, eps, 10*n, ra, mul_tol, mult1); + multiple_roots(m, b, eps, 10*m, rb, mul_tol, mult2); - for(i=c; i0; j--) - { - poly[j]=add_dcmplx(mul_dcmplx(root1[i], poly[j]), poly[j-1]); - } - poly[0]=mul_dcmplx(root1[i], poly[0]); - poly[i+1]=create1(1.0); - } - return poly; + int i, j; + dcmplx *root1; + dcmplx *poly=(dcmplx*) calloc(n+1, sizeof(dcmplx)); + + root1=assign(n, root); + if(n==0) + { + poly[0]=create1(1.0); + return poly; + } + poly[0]=min_dcmplx(root1[0]); + poly[1]=create1(1.0); + + for(i=1; i0; j--) + { + poly[j]=add_dcmplx(mul_dcmplx(root1[i], poly[j]), poly[j-1]); + } + poly[0]=mul_dcmplx(root1[i], poly[0]); + poly[i+1]=create1(1.0); + } + return poly; } - -void free_gcd_coeff(dcmplx ** gcd_coeff) +void free_gcd_coeff (dcmplx **gcd_coeff ) { - int i; + int i; - for (i=0; i<5; i++) - { - free(gcd_coeff[i]); - } - free(gcd_coeff); + for(i=0; i<5; i++) + { + free(gcd_coeff[i]); + } + free(gcd_coeff); } -void free_gcd_coeff1(POLY * result) +void free_gcd_coeff1 ( POLY *result ) { - int i; + int i; - for (i=0; i<5; i++) - { - free(result[i].p); - } - free(result); + for(i=0; i<5; i++) + { + free(result[i].p); + } + free(result); } -int group_points(int n, double tol, dcmplx x[n], dcmplx f[n], int m[n]) +int group_points ( int n, double tol, dcmplx x[n], dcmplx f[n], int m[n] ) { int i, j, tmp, mult; dcmplx delta; @@ -376,90 +381,91 @@ for(j=i+1; j1) - mult = 1; + if(m[i]>1) mult = 1; } return mult; } -dcmplx **rational_derivative(int n, dcmplx *num, int m, dcmplx *denom, int *d_num, int *d_denom ) +dcmplx **rational_derivative + ( int n, dcmplx *num, int m, dcmplx *denom, int *d_num, int *d_denom ) { - dcmplx *t1, *t2; - int t1_d, t2_d; - dcmplx dnum[n], ddenom[m]; - dcmplx **derive, *deriv_num, *deriv_denom; + dcmplx *t1, *t2; + int t1_d, t2_d; + dcmplx dnum[n], ddenom[m]; + dcmplx **derive, *deriv_num, *deriv_denom; - derivative(n+1, num, dnum); - derivative(m+1, denom, ddenom); + derivative(n+1, num, dnum); + derivative(m+1, denom, ddenom); - t1=mul_poly(n-1, dnum, m, denom, &t1_d); - t2=mul_poly(n, num, m-1, ddenom, &t2_d); - deriv_num=min_poly(t1_d, t1, t2_d, t2, d_num); - deriv_denom=mul_poly(m, denom, m, denom, d_denom); - - derive=(dcmplx**) calloc(2, sizeof(dcmplx*)); - derive[0]=deriv_num; - derive[1]=deriv_denom; - - return derive; + t1=mul_poly(n-1, dnum, m, denom, &t1_d); + t2=mul_poly(n, num, m-1, ddenom, &t2_d); + deriv_num=min_poly(t1_d, t1, t2_d, t2, d_num); + deriv_denom=mul_poly(m, denom, m, denom, d_denom); + derive=(dcmplx**) calloc(2, sizeof(dcmplx*)); + derive[0]=deriv_num; + derive[1]=deriv_denom; + + return derive; } -void hermite_derivative(int root_num, dcmplx root[root_num], int p_num, dcmplx x[p_num], dcmplx f[p_num], int m[p_num]) +void hermite_derivative + ( int root_num, dcmplx root[root_num], int p_num, + dcmplx x[p_num], dcmplx f[p_num], int m[p_num]) { - int i,j; - dcmplx *pp, *num, *denom, n_value, d_value, result; - dcmplx **deriv; - int d_num, d_denom, td1, td2, fact; - - pp=get_poly(root_num, root); - for(i=0; i1) - { - num=(dcmplx*) calloc(1, sizeof(dcmplx)); - num[0]=one; - denom=assign(td2, pp); - for(j=0; j1) + { + num=(dcmplx*) calloc(1, sizeof(dcmplx)); + num[0]=one; + denom=assign(td2, pp); + for(j=0; j in pieri_sols.c and added "include "pieri_sols.h" diff -Nru phcpack-2.4.84/src/GPU/Convolutions/dbl_convolutions_host.cpp phcpack-2.4.85/src/GPU/Convolutions/dbl_convolutions_host.cpp --- phcpack-2.4.84/src/GPU/Convolutions/dbl_convolutions_host.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/dbl_convolutions_host.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -14,6 +14,13 @@ } } +void CPU_dbl_Laurent_product + ( int deg, int xe, int ye, int *ze, double *x, double *y, double *z ) +{ + *ze = xe + ye; + CPU_dbl_product(deg,x,y,z); +} + void CPU_cmplx_product ( int deg, double *xre, double *xim, double *yre, double *yim, double *zre, double *zim ) @@ -48,6 +55,14 @@ } } +void CPU_cmplx_Laurent_product + ( int deg, int xe, int ye, int *ze, double *xre, double *xim, + double *yre, double *yim, double *zre, double *zim ) +{ + *ze = xe + ye; + CPU_cmplx_product(deg,xre,xim,yre,yim,zre,zim); +} + void CPU_dbl_inverse ( int deg, double *x, double *y ) { y[0] = 1.0/x[0]; @@ -59,6 +74,13 @@ } } +void CPU_dbl_Laurent_inverse + ( int deg, int xe, int *ye, double *x, double *y ) +{ + *ye = -xe; + CPU_dbl_inverse(deg,x,y); +} + void CPU_cmplx_inverse ( int deg, double *xre, double *xim, double *yre, double *yim ) { @@ -95,3 +117,11 @@ yre[i] = rpa; yim[i] = ipa; } } + +void CPU_cmplx_Laurent_inverse + ( int deg, int xe, int *ye, double *xre, double *xim, + double *yre, double *yim ) +{ + *ye = -xe; + CPU_cmplx_inverse(deg,xre,xim,yre,yim); +} diff -Nru phcpack-2.4.84/src/GPU/Convolutions/dbl_convolutions_host.h phcpack-2.4.85/src/GPU/Convolutions/dbl_convolutions_host.h --- phcpack-2.4.84/src/GPU/Convolutions/dbl_convolutions_host.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/dbl_convolutions_host.h 2021-06-30 23:22:40.000000000 +0000 @@ -22,6 +22,28 @@ * ON RETURN : * z coefficients of the product x*y. */ +void CPU_dbl_Laurent_product + ( int deg, int xe, int ye, int *ze, double *x, double *y, double *z ); +/* + * DESCRIPTION : + * Computes the product of two Laurent series with the same precision, + * for real double coefficients. + * + * REQUIRED : + * The arrays x, y, and z have allocated space for deg+1 doubles, + * for range 0 up to deg, deg included. + * + * ON ENTRY : + * deg truncation degree of the series x, y, and z; + * xe the leading exponent of the first series x; + * ye the leading exponent of the second series y; + * x coefficients of the first series; + * y coefficients of the second series. + * + * ON RETURN : + * ze the leading exponent of the product of x with y; + * z coefficients of the product x*y. */ + void CPU_cmplx_product ( int deg, double *xre, double *xim, double *yre, double *yim, double *zre, double *zim ); @@ -45,6 +67,32 @@ * zre real parts of the coefficients of the product x*y; * zim imaginary parts of the coefficients of the product x*y. */ +void CPU_cmplx_Laurent_product + ( int deg, int xe, int ye, int *ze, double *xre, double *xim, + double *yre, double *yim, double *zre, double *zim ); +/* + * DESCRIPTION : + * Computes the product of two Laurent series with the same precision, + * for complex double coefficients. + * + * REQUIRED : + * All arrays xre, xim, yre, yim, zre, and zim have allocated space + * for deg+1 doubles, for range 0 up to deg, deg included. + * + * ON ENTRY : + * deg truncation degree of the series x, y, and z; + * xe the leading exponent of the first series x; + * ye the leading exponent of the second series y; + * xre real parts of the coefficients of the first series; + * xim imaginary parts of the coefficients of the first series; + * yre real parts of the coefficients of the second series. + * yim imaginary parts of the coefficients of the second series. + * + * ON RETURN : + * ze the leading exponent of the product of x with y; + * zre real parts of the coefficients of the product x*y; + * zim imaginary parts of the coefficients of the product x*y. */ + void CPU_dbl_inverse ( int deg, double *x, double *y ); /* * DESCRIPTION : @@ -63,6 +111,26 @@ * ON RETURN : * y coefficients of the inverse of the series x. */ +void CPU_dbl_Laurent_inverse + ( int deg, int xe, int *ye, double *x, double *y ); +/* + * DESCRIPTION : + * Computes the inverse of the Laurent series for real double coefficients. + * + * REQUIRED : The lead coefficient x(0) of x is nonzero. + * The arrays x and y have allocated space for deg+1 doubles, + * for range 0 up to deg, deg included. + * + * ON ENTRY : + * deg truncation degree of the series x and y; + * xe the leading exponent of the series x; + * x coefficients of a power series; + * y space for deg+1 coefficients. + * + * ON RETURN : + * ye the leading exponent of the inverse of the series x; + * y coefficients of the inverse of the series x. */ + void CPU_cmplx_inverse ( int deg, double *xre, double *xim, double *yre, double *yim ); /* @@ -85,4 +153,29 @@ * yre real parts of the coefficients of the inverse of x; * yim imaginary parts of the coefficients of the inverse of x. */ +void CPU_cmplx_Laurent_inverse + ( int deg, int xe, int *ye, double *xre, double *xim, + double *yre, double *yim ); +/* + * DESCRIPTION : + * Computes the inverse of the Laurent series for complex coefficients + * in double precision. + * + * REQUIRED : The lead coefficient x(0) of x is nonzero. + * The arrays x and y have allocated space for deg+1 doubles, + * for range 0 up to deg, deg included. + * + * ON ENTRY : + * deg truncation degree of the series x and y; + * xe the leading coefficient of the series x; + * xre real parts of the coefficients of a power series; + * xim imaginary parts of the coefficients of a power series; + * yre space for deg+1 coefficients; + * yim space for deg+1 coefficients. + * + * ON RETURN : + * ye the leading exponent of the inverse; + * yre real parts of the coefficients of the inverse of x; + * yim imaginary parts of the coefficients of the inverse of x. */ + #endif diff -Nru phcpack-2.4.84/src/GPU/Convolutions/random_series.cpp phcpack-2.4.85/src/GPU/Convolutions/random_series.cpp --- phcpack-2.4.84/src/GPU/Convolutions/random_series.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/random_series.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -87,3 +87,51 @@ cmplx_exponentials(deg,*xre,*xim,pluxre,pluxim,minxre,minxim); } + +void dbl_logarithm ( int deg, double x, double *s ) +{ + double pwrx = x; + s[0] = x; + + for(int k=1; k<=deg; k++) + { + pwrx = -x*pwrx; // alternating sign + s[k] = pwrx/k; + } +} + +void cmplx_logarithm + ( int deg, double xre, double xim, double *sre, double *sim ) +{ + double pwrxre = xre; + double pwrxim = xim; + sre[0] = xre; + sim[0] = xim; + + for(int k=1; k<=deg; k++) + { + pwrxre = xre*pwrxre - xim*pwrxim; + pwrxim = xre*pwrxim + xim*pwrxre; + pwrxre = -pwrxre; // alternating sign + pwrxim = -pwrxim; + sre[k] = pwrxre/k; + sim[k] = pwrxim/k; + } +} + +void random_dbl_logarithm ( int deg, double *x, double *s ) +{ + *x = random_double(); + dbl_logarithm(deg,*x,s); +} + +void random_cmplx_logarithm + ( int deg, double *xre, double *xim, double *sre, double *sim ) +{ + const double r = random_angle(); + + *xre = cos(r); + *xim = sin(r); + + cmplx_logarithm(deg,*xre,*xim,sre,sim); +} diff -Nru phcpack-2.4.84/src/GPU/Convolutions/random_series.h phcpack-2.4.85/src/GPU/Convolutions/random_series.h --- phcpack-2.4.84/src/GPU/Convolutions/random_series.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/random_series.h 2021-06-30 23:22:40.000000000 +0000 @@ -7,8 +7,8 @@ void dbl_exponential ( int deg, double x, double *s ); /* * DESCRIPTION : - * Returns power series for exp(x) truncated at degree deg, - * for real x. + * Returns power series truncated at degree deg, for real x, + * following the expansion of exp(x). * * ON ENTRY : * deg degree to truncate the series; @@ -21,7 +21,7 @@ void dbl_exponentials ( int deg, double x, double *plux, double *minx ); /* * DESCRIPTION : - * Returns power series for exp(x) and exp(-x), + * Returns power series following the expansions of exp(x) and exp(-x), * with real coefficients in double precision. * * ON ENTRY : @@ -31,20 +31,21 @@ * minx space for deg+1 doubles for the exp(-x) series. * * ON RETURN : - * plux power series of exp(+x) truncated to degree deg; - * minx power series of exp(-x) truncated to degree deg. */ + * plux power series of exp(+x) truncated at degree deg; + * minx power series of exp(-x) truncated at degree deg. */ void random_dbl_exponential ( int deg, double *x, double *s ); /* * DESCRIPTION : - * Returns a power series of exp(x) truncated at degree deg - * for a randomly generated double x. */ + * Returns a power series truncated at degree deg + * for a randomly generated double x, + * following the expansion of exp(x). */ void random_dbl_exponentials ( int deg, double *x, double *plux, double *minx ); /* * DESCRIPTION : - * Returns power series for exp(x) and exp(-x), + * Returns power series following the expansions of exp(x) and exp(-x), * truncated to degree deg for a random double x. * Parameters are the same as dbl_exponentials, * except that x is a return parameter. */ @@ -53,7 +54,8 @@ ( int deg, double xre, double xim, double *sre, double *sim ); /* * DESCRIPTION : - * Returns power series for exp(x) truncated at degree deg. + * Returns power series truncated at degree deg, + * following the expansion of exp(x). * * ON ENTRY : * deg degree to truncate the series; @@ -63,9 +65,9 @@ * sim space for deg+1 doubles. * * ON RETURN : - * sre real parts of power series of exp(x), + * sre real parts of power series following exp(x), * truncated to degree deg; - * sim imaginary parts of power series of exp(x), + * sim imaginary parts of power series following exp(x), * truncated to degree deg. */ void cmplx_exponentials @@ -73,7 +75,7 @@ double *pluxre, double *pluxim, double *minxre, double *minxim ); /* * DESCRIPTION : - * Returns power series for exp(x) and exp(-x), + * Returns power series following the expansions of exp(x) and exp(-x), * with complex coefficients in double precision. * * ON ENTRY : @@ -91,30 +93,80 @@ * * ON RETURN : * pluxre real parts of the power series of exp(+x) - * truncated to degree deg; + * truncated at degree deg; * pluxim imaginary parts of the power series of exp(+x) - * truncated to degree deg; + * truncated at degree deg; * minxre real parts of the power series of exp(-x) - * truncated to degree deg; + * truncated at degree deg; * minxim imaginary parts of the power series of exp(-x) - * truncated to degree deg. */ + * truncated at degree deg. */ void random_cmplx_exponential ( int deg, double *xre, double *xim, double *sre, double *sim ); /* * DESCRIPTION : - * Returns power series for exp(x), for a complex x, with randomly - * generated real and imaginary parts returned in xre and xim, - * truncated at degree deg. */ + * Returns power series following the expansion of exp(x), + * for a complex x, with randomly generated real and imaginary parts + * returned in xre and xim, truncated at degree deg. */ void random_cmplx_exponentials ( int deg, double *xre, double *xim, double *pluxre, double *pluxim, double *minxre, double *minxim ); /* * DESCRIPTION : - * Returns power series for exp(x) and exp(-x), + * Returns power series following the expansions of exp(x) and exp(-x), * truncated to degree deg for a random complex double x. * Parameters are the same as dbl_exponentials, * except that xre and xim are return parameters. */ +void dbl_logarithm ( int deg, double x, double *s ); +/* + * DESCRIPTION : + * Returns power series truncated at degree deg, for real x, + * following the expansion of log(1+x). + * + * ON ENTRY : + * deg degree to truncate the series; + * x some double; + * s space for deg+1 doubles. + * + * ON RETURN : + * s power series following the expansion of log(1+x), + * truncated at degree deg. */ + +void cmplx_logarithm + ( int deg, double xre, double xim, double *sre, double *sim ); +/* + * DESCRIPTION : + * Returns power series truncated at degree deg, + * following the expansion of log(1+x). + * + * ON ENTRY : + * deg degree to truncate the series; + * xre real part of some complex number x; + * xim imaginary part of some complex number x; + * sre space for deg+1 doubles; + * sim space for deg+1 doubles. + * + * ON RETURN : + * sre real parts of power series following log(1+x), + * truncated at degree deg; + * sim imaginary parts of power series following log(1+x), + * truncated at degree deg. */ + +void random_dbl_logarithm ( int deg, double *x, double *s ); +/* + * DESCRIPTION : + * Returns a power series truncated at degree deg + * for a randomly generated double x, + * following the expansion of log(1+x). */ + +void random_cmplx_logarithm + ( int deg, double *xre, double *xim, double *sre, double *sim ); +/* + * DESCRIPTION : + * Returns power series following the expansion of log(1+x), + * for a complex x, with randomly generated real and imaginary parts + * returned in xre and xim, truncated at degree deg. */ + #endif diff -Nru phcpack-2.4.84/src/GPU/Convolutions/READ_ME phcpack-2.4.85/src/GPU/Convolutions/READ_ME --- phcpack-2.4.84/src/GPU/Convolutions/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -Accelerated Convolutions for Power Series Multiplication in PHCv2.4.84. +Accelerated Convolutions for Power Series Multiplication in PHCv2.4.85. The code in this folder concerns the product of two power series, truncated to the same degree. diff -Nru phcpack-2.4.84/src/GPU/Convolutions/UPDATES phcpack-2.4.85/src/GPU/Convolutions/UPDATES --- phcpack-2.4.84/src/GPU/Convolutions/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Convolutions/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,9 @@ +Mon 28 Jun 2021 : extended random_series with function to generate series + following the expansion of log(1+x). + +Mon 5 Apr 2021 : extended dbl_convolutions_host with functions to multiply + Laurent series and to compute the inverse of a Laurent series. + Sat 13 Feb 2021 : extended dbl_convolutions_host with a function to compute the inverse of a series with complex coefficients. diff -Nru phcpack-2.4.84/src/GPU/Matrices/dbl_linearization.cpp phcpack-2.4.85/src/GPU/Matrices/dbl_linearization.cpp --- phcpack-2.4.84/src/GPU/Matrices/dbl_linearization.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/dbl_linearization.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,44 @@ +// The file dbl_linearization.cpp defines the functions +// specified in dbl_linearization.h. + +#include "dbl_linearization.h" + +void dbl_linear_series_vector + ( int dim, int deg, double **v, double **w ) +{ + for(int i=0; i #include #include "dbl_convolutions_host.h" +#include "dbl_matrices_host.h" -// for debugging +// for debugging and verbose mode #include + using namespace std; -void real_inner_product +void CPU_dbl_inner_product ( int dim, int deg, double **x, double **y, double *z ) { double *prod = new double[deg+1]; @@ -25,7 +27,7 @@ free(prod); } -void cmplx_inner_product +void CPU_cmplx_inner_product ( int dim, int deg, double **xre, double **xim, double **yre, double **yim, double *zre, double *zim ) @@ -49,22 +51,22 @@ free(prodre); free(prodim); } -void real_matrix_vector_product +void CPU_dbl_matrix_vector_product ( int rows, int cols, int deg, double ***A, double **x, double **y ) { for(int k=0; k=0; i--) { + if(verbose) cout << "prod = b[" << i << "], level 0" << endl; + for(int k=0; k<=deg; k++) prod[k] = b[i][k]; - for(int j=i+1; ji; j--) { + if(verbose) cout << "work = U[" << i << "][" << j << "]*x[" << j + << "], level " << ++lvl << endl; + CPU_dbl_product(deg,U[i][j],x[j],work); + if(verbose) cout << "prod = prod - work, level = " + << ++lvl << endl; + for(int k=0; k<=deg; k++) prod[k] = prod[k] - work[k]; + + lvl = lvl + 1; } + if(verbose) cout << "work = 1/U[" << i << "][" << i + << "], level 0" << endl; + CPU_dbl_inverse(deg,U[i][i],work); + + if(verbose) cout << "x[" << i << "] = prod/U[" + << i << "][" << i << "], level " + << lvl << endl; + CPU_dbl_product(deg,work,prod,x[i]); } free(prod); free(work); } -void cmplx_upper_solver +void CPU_cmplx_upper_solver ( int dim, int deg, double ***Ure, double ***Uim, - double **bre, double **bim, double **xre, double **xim ) + double **bre, double **bim, double **xre, double **xim, bool verbose ) { double *prodre = new double[deg+1]; double *prodim = new double[deg+1]; double *workre = new double[deg+1]; double *workim = new double[deg+1]; + int lvl; + + if(verbose) cout << "Level of operations in backward substitution :" + << endl; for(int i=dim-1; i>=0; i--) { + if(verbose) cout << "prod = b[" << i << "], level 0" << endl; + for(int k=0; k<=deg; k++) { prodre[k] = bre[i][k]; prodim[k] = bim[i][k]; } - for(int j=i+1; ji; j--) { + if(verbose) cout << "work = U[" << i << "][" << j << "]*x[" << j + << "], level " << ++lvl << endl; + CPU_cmplx_product (deg,Ure[i][j],Uim[i][j],xre[j],xim[j],workre,workim); + if(verbose) cout << "prod = prod - work, level = " + << ++lvl << endl; + for(int k=0; k<=deg; k++) { prodre[k] = prodre[k] - workre[k]; prodim[k] = prodim[k] - workim[k]; } + lvl = lvl + 1; } + if(verbose) cout << "work = 1/U[" << i << "][" << i + << "], level 0" << endl; + CPU_cmplx_inverse(deg,Ure[i][i],Uim[i][i],workre,workim); + + if(verbose) cout << "x[" << i << "] = prod/U[" + << i << "][" << i << "], level " + << lvl << endl; + CPU_cmplx_product(deg,workre,workim,prodre,prodim,xre[i],xim[i]); } free(prodre); free(workre); free(prodim); free(workim); } -void real_lufac ( int dim, int deg, double ***A, int *pivots ) +void CPU_dbl_upper_lead_solver + ( int dim, double **U, double *b, double *x ) +{ + int idx = dim-1; + x[idx] = b[idx]/U[idx][idx]; + + for(int i=idx-1; i>=0; i--) + { + x[i] = b[i]; + for(int j=i+1; j=0; i--) + { + xre[i] = bre[i]; xim[i] = bim[i]; + for(int j=i+1; j +#include +#include "dbl_matrices_kernels.h" + +__global__ void dbl_convolutions ( double *x, double *y, int deg1 ) +{ + const int j = blockIdx.x; // convolution of j-th series in x and y + const int k = threadIdx.x; // thread k computes k-th coefficient + const int offset = j*deg1+k; // position of the k-th coefficient + + __shared__ double xv[d_shmemsize]; + __shared__ double yv[d_shmemsize]; + __shared__ double zv[d_shmemsize]; + + int idx = deg1+k; + + xv[k] = x[offset]; + yv[k] = 0.0; // padded with zeros + yv[idx] = y[offset]; + + zv[k] = xv[0]*yv[idx]; + + for(int i=1; i>>(x_d,y_d,deg1); + + if(mode==1) // do all additions on the host + { + cudaMemcpy(x_h,x_d,szdim,cudaMemcpyDeviceToHost); + + for(int i=0; i>>(x_d,lag,restshift,deg1); + + if(restshift == 0) // no shift left + { + restshift = (lag % 2 == 0 ? 0 : deg1); + lag = (lag == 1 ? 1 : lag/2); + } + else // have shift left + { + if(lag % 2 == 0) // if even lag, + lag = lag/2; // then keep the shift + else + { + restshift = 0; // set shift to zero + lag = (lag == 1 ? 1 : lag/2); + if(L < ceil2log-2) lag = lag + 1; + } + } + } + } + cudaMemcpy(z,x_d,szdeg,cudaMemcpyDeviceToHost); + } + free(x_h); free(y_h); +} + +void GPU_cmplx_inner_product + ( int BS, int dim, int deg, + double **xre, double **xim, double **yre, double **yim, + double *zre, double *zim, int mode, bool verbose ) +{ + const int deg1 = deg+1; // coefficient series length + + double* xre_d; // xre_d is xre_h on the device + double* xim_d; // xim_d is xim_h on the device + double* yre_d; // yre_d is yre_h on the device + double* yim_d; // yim_d is yim_h on the device + double* zre_d; // zre_d is zre_h on the device + double* zim_d; // zim_d is zim_h on the device + + size_t szdeg = deg1*sizeof(double); + size_t szdim = dim*szdeg; + + double* xre_h = new double[dim*deg1]; + double* xim_h = new double[dim*deg1]; + double* yre_h = new double[dim*deg1]; + double* yim_h = new double[dim*deg1]; + int ix = 0; + for(int i=0; i>>(xre_d,xim_d,yre_d,yim_d,deg1); + + if(mode==1) // do all additions on the host + { + cudaMemcpy(xre_h,xre_d,szdim,cudaMemcpyDeviceToHost); + cudaMemcpy(xim_h,xim_d,szdim,cudaMemcpyDeviceToHost); + + for(int i=0; i>>(xre_d,xim_d,lag,restshift,deg1); + + if(restshift == 0) // no shift left + { + restshift = (lag % 2 == 0 ? 0 : deg1); + lag = (lag == 1 ? 1 : lag/2); + } + else // have shift left + { + if(lag % 2 == 0) // if even lag, + lag = lag/2; // then keep the shift + else + { + restshift = 0; // set shift to zero + lag = (lag == 1 ? 1 : lag/2); + if(L < ceil2log-2) lag = lag + 1; + } + } + } + } + cudaMemcpy(zre,xre_d,szdeg,cudaMemcpyDeviceToHost); + cudaMemcpy(zim,xim_d,szdeg,cudaMemcpyDeviceToHost); + } + free(xre_h); free(yre_h); + free(xim_h); free(yim_h); +} + +void GPU_dbl_matrix_vector_product + ( int BS, int rows, int cols, int deg, double ***A, double **x, + double **y, int mode, bool verbose ) +{ + const int deg1 = deg+1; // coefficient series length + + double* row_d; // row_d is a row of A + double* x_d; // x_d is x_h on the device + + size_t szdeg = deg1*sizeof(double); + size_t szcol = cols*szdeg; + + double* x_h = new double[cols*deg1]; + int ix = 0; + for(int i=0; i>>(row_d,x_d,deg1); + + if(mode == 1) // do all additions on the host + { + cudaMemcpy(row_h,row_d,szcol,cudaMemcpyDeviceToHost); + + for(int k=0; k>>(row_d,lag,restshift,deg1); + + if(restshift == 0) // no shift left + { + restshift = (lag % 2 == 0 ? 0 : deg1); + lag = (lag == 1 ? 1 : lag/2); + } + else // have shift left + { + if(lag % 2 == 0) // if even lag, + lag = lag/2; // then keep the shift + else + { + restshift = 0; // set shift to zero + lag = (lag == 1 ? 1 : lag/2); + if(L < ceil2log-2) lag = lag + 1; + } + } + } + cudaMemcpy(y[i],row_d,szdeg,cudaMemcpyDeviceToHost); + } + } + } +} + +void GPU_cmplx_matrix_vector_product + ( int BS, int rows, int cols, int deg, double ***Are, double ***Aim, + double **xre, double **xim, double **yre, double **yim, + int mode, bool verbose ) +{ + const int deg1 = deg+1; // coefficient series length + + double* rowre_d; // row_d is a row of Are + double* rowim_d; // row_d is a row of Aim + double* xre_d; // xre_d is xre_h on the device + double* xim_d; // xim_d is xim_h on the device + // double* y_d; // y_d is y_h on the device + + size_t szdeg = deg1*sizeof(double); + size_t szcol = cols*szdeg; + + double* xre_h = new double[cols*deg1]; + double* xim_h = new double[cols*deg1]; + int ix = 0; + for(int i=0; i>>(rowre_d,rowim_d,xre_d,xim_d,deg1); + + cudaMemcpy(rowre_h,rowre_d,szcol,cudaMemcpyDeviceToHost); + cudaMemcpy(rowim_h,rowim_d,szcol,cudaMemcpyDeviceToHost); + + if(mode == 1) // do all additions on the host + { + for(int k=0; k>> + (rowre_d,rowim_d,lag,restshift,deg1); + + if(restshift == 0) // no shift left + { + restshift = (lag % 2 == 0 ? 0 : deg1); + lag = (lag == 1 ? 1 : lag/2); + } + else // have shift left + { + if(lag % 2 == 0) // if even lag, + lag = lag/2; // then keep the shift + else + { + restshift = 0; // set shift to zero + lag = (lag == 1 ? 1 : lag/2); + if(L < ceil2log-2) lag = lag + 1; + } + } + } + cudaMemcpy(yre[i],rowre_d,szdeg,cudaMemcpyDeviceToHost); + cudaMemcpy(yim[i],rowim_d,szdeg,cudaMemcpyDeviceToHost); + } + } + } +} diff -Nru phcpack-2.4.84/src/GPU/Matrices/dbl_matrices_kernels.h phcpack-2.4.85/src/GPU/Matrices/dbl_matrices_kernels.h --- phcpack-2.4.84/src/GPU/Matrices/dbl_matrices_kernels.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/dbl_matrices_kernels.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,193 @@ +/* The file dbl_matrices_kernels specifies functions on vectors and matrices + * of series truncated to the same degree in double precision. */ + +#ifndef __dbl_matrices_kernels_h__ +#define __dbl_matrices_kernels_h__ + +#define d_shmemsize 256 + +__global__ void dbl_convolutions ( double *x, double *y, int deg1 ); +/* + * DESCRIPTION : + * Makes all convolutions in the inner product of the vector x with y. + * + * ON ENTRY : + * x coefficients of the series in the first vector; + * y coefficients of the series in the second vector; + * deg1 number of coefficients in each series. + * + * ON RETURN : + * x coefficient of the product of the series in x with y. */ + +__global__ void cmplx_convolutions + ( double *xre, double *xim, double *yre, double *yim, int deg1 ); +/* + * DESCRIPTION : + * Makes all convolutions in the inner product of the vector x with y. + * + * ON ENTRY : + * xre real parts of series coefficients in the first vector; + * xim imaginary parts of series coefficients in the first vector; + * yre real parts of series coefficients in the second vector; + * yim imaginary parts of series coefficients in the second vector; + * deg1 number of coefficients in each series. + * + * ON RETURN : + * xre real parts of the coefficients of the inner product; + * xim imaginary parts of the coefficients of the inner product. */ + +__global__ void dbl_additions ( double *x, int lag, int shf, int deg1 ); +/* + * DESCRIPTION : + * Sums two series in x with distance apart as defined by lag, + * in the execution of a sum reduction. + * + * ON ENTRY : + * x deg1 coefficients of dim series; + * lag defines distance between two series; + * shf shift for an odd number of series; + * deg1 number of coefficients in all series. + * + * ON RETURN : + * x the first deg1 numbers are the coefficients of the sum, + * at the end of the sum reduction. */ + +__global__ void cmplx_additions + ( double *xre, double *xim, int lag, int shf, int deg1 ); +/* + * DESCRIPTION : + * Sums two series in x with distance apart as defined by lag, + * in the execution of a sum reduction. + * + * ON ENTRY : + * xre real parts of deg1 coefficients of dim series; + * xim imaginary parts of deg1 coefficients of dim series; + * lag defines distance between two series; + * shf shift for an odd number of series; + * deg1 number of coefficients in all series. + * + * ON RETURN : + * xre the first deg1 numbers are the real parts of the + * coefficients of the sum, at the end of the sum reduction; + * xim the first deg1 numbers are the imaginary parts of the + * coefficients of the sum, at the end of the sum reduction. */ + +void GPU_dbl_inner_product + ( int BS, int dim, int deg, double **x, double **y, double *z, + int mode, bool verbose ); +/* + * DESCRIPTION : + * Computes the product of two real vectors x and y of power series + * and assigns the result to z. + * + * ON ENTRY : + * BS number of threads in a block, must equal deg+1; + * dim dimension of the vectors x and y; + * deg truncation degree of the series; + * x dim series truncated to degree deg; + * y dim series truncated to degree deg; + * z space for deg+1 doubles; + * mode if 1, then the addition happens on the CPU, + * otherwise the addition kernel is called; + * verbose is the verbose flag. + * + * ON RETURN : + * z the sum of all x[k]*y[k] for k from 0 to dim-1, + * as a power series truncated to the degree deg. */ + +void GPU_cmplx_inner_product + ( int BS, int dim, int deg, + double **xre, double **xim, double **yre, double **yim, + double *zre, double *zim, int mode, bool verbose ); +/* + * DESCRIPTION : + * Computes the product of two complex vectors x and y of power series + * and assigns the result to z. + * + * ON ENTRY : + * BS number of threads in a block, must equal deg+1; + * dim dimension of the vectors x and y; + * deg truncation degree of the series; + * xre real parts of dim series truncated to degree deg; + * xim imaginary parts of dim series truncated to degree deg; + * yre real parts of dim series truncated to degree deg; + * yim imaginary parts of dim series truncated to degree deg; + * zre space for deg+1 doubles; + * zim space for deg+1 doubles; + * mode if 1, then the addition happens on the CPU, + * otherwise the addition kernel is called; + * verbose is the verbose flag. + * + * ON RETURN : + * zre the real part of the sum of all x[k]*y[k], + * for k from 0 to dim-1, + * as a power series truncated to the degree deg; + * zim the imaginary part of the sum of all x[k]*y[k], + * for k from 0 to dim-1, + * as a power series truncated to the degree deg. */ + +void GPU_dbl_matrix_vector_product + ( int BS, int rows, int cols, int deg, double ***A, double **x, + double **y, int mode, bool verbose ); +/* + * DESCRIPTION : + * Computes the product y of the matrix A with x, + * for truncated power series on real data. + * + * ON ENTRY : + * BS number of threads in a block, must equal deg+1; + * rows the number of rows in the matrix A + * and the dimension of y; + * cols the number of columns in the matrix A + * and the dimension of x; + * deg truncation degree of the series; + * A matrix of dimensions rows and cols, + * of power series truncated at the degree deg; + * x vector of dimension cols + * of power series truncated at the degree deg; + * y space allocated for a vector of dimension rows + * of power series truncated at the degree deg; + * mode if 1, then the addition happens on the CPU, + * otherwise the addition kernel is called; + * verbose is the verbose flag. + * + * ON RETURN : + * y the product of A with x. */ + +void GPU_cmplx_matrix_vector_product + ( int BS, int rows, int cols, int deg, double ***Are, double ***Aim, + double **xre, double **xim, double **yre, double **yim, + int mode, bool verbose ); +/* + * DESCRIPTION : + * Computes the product y of the matrix A with x, + * for truncated power series on complex data. + * + * ON ENTRY : + * BS number of threads in a block, must equal deg+1; + * rows the number of rows in the matrix A + * and the dimension of y; + * cols the number of columns in the matrix A + * and the dimension of x; + * deg truncation degree of the series; + * Are real parts of a matrix of dimensions rows and cols, + * of power series truncated at the degree deg; + * Aim imaginary parts of a matrix of dimensions rows and cols, + * of power series truncated at the degree deg; + * xre real parts of a vector of dimension cols + * of power series truncated at the degree deg; + * xim imaginary parts of a vector of dimension cols + * of power series truncated at the degree deg; + * yre space allocated for a vector of dimension rows + * of power series truncated at the degree deg; + * yim space allocated for a vector of dimension rows + * of power series truncated at the degree deg; + * mode if 1, then the addition happens on the CPU, + * otherwise the addition kernel is called; + * verbose is the verbose flag. + * + * ON RETURN : + * yre real parts of the product of A with x; + * yim imaginary parts of the product of A with x. */ + +#endif diff -Nru phcpack-2.4.84/src/GPU/Matrices/dbl_matrices_testers.cpp phcpack-2.4.85/src/GPU/Matrices/dbl_matrices_testers.cpp --- phcpack-2.4.84/src/GPU/Matrices/dbl_matrices_testers.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/dbl_matrices_testers.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -7,215 +7,12 @@ #include "random_numbers.h" #include "random_series.h" #include "random_matrices.h" +#include "dbl_linearization.h" #include "dbl_matrices_host.h" #include "dbl_matrices_testers.h" using namespace std; -void test_real_inner_product ( void ) -{ - cout << "Give the dimension : "; - int dim; cin >> dim; - - cout << "Give a degree larger than one : "; - int deg; cin >> deg; - - double *x = new double[dim]; - double **px = new double*[dim]; - double **mx = new double*[dim]; - - for(int i=0; i> dim; - - cout << "Give a degree larger than one : "; - int deg; cin >> deg; - - double *xre = new double[dim]; - double *xim = new double[dim]; - double **pxre = new double*[dim]; - double **pxim = new double*[dim]; - double **mxre = new double*[dim]; - double **mxim = new double*[dim]; - - for(int i=0; i> nbrows; - - cout << "Give the number of columns : "; - int nbcols; cin >> nbcols; - - cout << "Give a degree larger than one : "; - int deg; cin >> deg; - - double **rnd = new double*[nbrows]; - double ***mat = new double**[nbrows]; - for(int i=0; i> nbrows; - - cout << "Give the number of columns : "; - int nbcols; cin >> nbcols; - - cout << "Give a degree larger than one : "; - int deg; cin >> deg; - - double **rndre = new double*[nbrows]; - double **rndim = new double*[nbrows]; - double ***matre = new double**[nbrows]; - double ***matim = new double**[nbrows]; - for(int i=0; i +#include +#include +#include +#include +#include "random_numbers.h" +#include "random_series.h" +#include "random_matrices.h" +#include "dbl_matrices_host.h" +#include "dbl_matrices_kernels.h" +#include "dbl_vectors_testers.h" + +using namespace std; + +void test_real_inner_product ( void ) +{ + cout << "Give the dimension : "; + int dim; cin >> dim; + + cout << "Give a degree larger than one : "; + int deg; cin >> deg; + + cout << "Give the verbose level : "; + int vrblvl; cin >> vrblvl; + + double *x = new double[dim]; + double **px = new double*[dim]; + double **mx = new double*[dim]; + + for(int i=0; i 1) + { + cout << scientific << setprecision(16); + + for(int k=0; k 1) + { + cout << "the inner product computed by the CPU :" << endl; + for(int i=0; i<=deg; i++) cout << ip_h[i] << endl; + } + if(vrblvl > 0) + GPU_dbl_inner_product(deg+1,dim,deg,px,mx,ip_d,0,true); + else + GPU_dbl_inner_product(deg+1,dim,deg,px,mx,ip_d,0,false); + + if(vrblvl > 1) + { + cout << "the inner product computed by the GPU :" << endl; + for(int i=0; i<=deg; i++) cout << ip_d[i] << endl; + } + double sumerr = 0.0; + + for(int i=0; i<=deg; i++) + sumerr = sumerr + abs(ip_h[i] - ip_d[i]); + cout << scientific << setprecision(2); + cout << "Sum of all errors : " << sumerr << endl; +} + +void test_cmplx_inner_product ( void ) +{ + cout << "Give the dimension : "; + int dim; cin >> dim; + + cout << "Give a degree larger than one : "; + int deg; cin >> deg; + + cout << "Give the verbose level : "; + int vrblvl; cin >> vrblvl; + + double *xre = new double[dim]; + double *xim = new double[dim]; + double **pxre = new double*[dim]; + double **pxim = new double*[dim]; + double **mxre = new double*[dim]; + double **mxim = new double*[dim]; + + for(int i=0; i 1) + { + cout << scientific << setprecision(16); + + for(int k=0; k 1) + { + cout << "the inner product computed by the CPU :" << endl; + for(int i=0; i<=deg; i++) + cout << ipre_h[i] << " " << ipim_h[i] << endl; + } + if(vrblvl > 0) + GPU_cmplx_inner_product + (deg+1,dim,deg,pxre,pxim,mxre,mxim,ipre_d,ipim_d,0,true); + else + GPU_cmplx_inner_product + (deg+1,dim,deg,pxre,pxim,mxre,mxim,ipre_d,ipim_d,0,false); + + if(vrblvl > 1) + { + cout << "the inner product computed by the GPU :" << endl; + for(int i=0; i<=deg; i++) + cout << ipre_d[i] << " " << ipim_d[i] << endl; + } + double sumerr = 0.0; + for(int i=0; i<=deg; i++) + sumerr = sumerr + abs(ipre_h[i] - ipre_d[i]) + + abs(ipim_h[i] - ipim_d[i]); + + cout << scientific << setprecision(2); + cout << "Sum of all errors : " << sumerr << endl; +} + +void test_real_matrix_vector_product ( void ) +{ + cout << "Give the number of rows : "; + int nbrows; cin >> nbrows; + + cout << "Give the number of columns : "; + int nbcols; cin >> nbcols; + + cout << "Give a degree larger than one : "; + int deg; cin >> deg; + + cout << "Give the verbose level : "; + int vrblvl; cin >> vrblvl; + + double **rnd = new double*[nbrows]; + double ***mat = new double**[nbrows]; + for(int i=0; i 1) + { + cout << scientific << setprecision(16); + + for(int i=0; i 1) + { + for(int i=0; i 0) + GPU_dbl_matrix_vector_product + (deg+1,nbrows,nbcols,deg,mat,x,y_d,0,true); + else + GPU_dbl_matrix_vector_product + (deg+1,nbrows,nbcols,deg,mat,x,y_d,0,false); + + if(vrblvl > 1) + { + for(int i=0; i> nbrows; + + cout << "Give the number of columns : "; + int nbcols; cin >> nbcols; + + cout << "Give a degree larger than one : "; + int deg; cin >> deg; + + cout << "Give the verbose level : "; + int vrblvl; cin >> vrblvl; + + double **rndre = new double*[nbrows]; + double **rndim = new double*[nbrows]; + double ***matre = new double**[nbrows]; + double ***matim = new double**[nbrows]; + for(int i=0; i 1) + { + cout << scientific << setprecision(16); + + for(int i=0; i 1) + { + for(int i=0; i 0) + GPU_cmplx_matrix_vector_product + (deg+1,nbrows,nbcols,deg,matre,matim,xre,xim,yre_d,yim_d,0,true); + else + GPU_cmplx_matrix_vector_product + (deg+1,nbrows,nbcols,deg,matre,matim,xre,xim,yre_d,yim_d,0,false); + + if(vrblvl > 1) + { + for(int i=0; i>> compiling dbl_matricess_host ..." + @-echo ">>> compiling dbl_matrices_host ..." $(gpp) -O3 -c -I$(CNV) dbl_matrices_host.cpp +dbl_matrices_kernels.o: + @-echo ">>> compiling matrices kernels for doubles ..." + nvcc -ccbin=$(gpp) -arch=$(smflag) \ + -c dbl_matrices_kernels.cu + +dbl_vectors_testers.o: + @-echo ">>> compiling dbl_vectors_testers ..." + $(gpp) -O3 -c -I$(CUDA) -I$(MPD) -I$(CNV) dbl_vectors_testers.cpp + +test_dbl_vectors.o: + @-echo ">>> compiling test_dbl_vectors ..." + $(gpp) -O3 -c -I$(MPD) -I$(CNV) test_dbl_vectors.cpp + +test_dbl_vectors: random_numbers.o random_series.o \ + random_matrices.o dbl_convolutions_host.o \ + dbl_matrices_host.o dbl_matrices_kernels.o \ + dbl_vectors_testers.o test_dbl_vectors.o + @-echo ">>> linking ..." + $(gpp) -o test_dbl_vectors test_dbl_vectors.o \ + random_numbers.o random_series.o random_matrices.o \ + dbl_convolutions_host.o dbl_matrices_host.o \ + dbl_matrices_kernels.o dbl_vectors_testers.o \ + -lcuda -lcudart -L$(CUDALIB) + dbl_matrices_testers.o: - @-echo ">>> compiling dbl_matricess_testers ..." + @-echo ">>> compiling dbl_matrices_testers ..." $(gpp) -O3 -c -I$(MPD) -I$(CNV) dbl_matrices_testers.cpp -test_dbl_series_vectors.o: - @-echo ">>> compiling test_dbl_series_vectors ..." - $(gpp) -O3 -c -I$(MPD) -I$(CNV) test_dbl_series_vectors.cpp - -test_dbl_series_vectors: random_numbers.o random_series.o \ - random_matrices.o dbl_convolutions_host.o \ - dbl_matrices_host.o dbl_matrices_testers.o \ - test_dbl_series_vectors.o +test_dbl_matrices.o: + @-echo ">>> compiling test_dbl_matrices ..." + $(gpp) -O3 -c -I$(MPD) -I$(CNV) test_dbl_matrices.cpp + +test_dbl_matrices: random_numbers.o random_series.o \ + random_matrices.o dbl_convolutions_host.o \ + dbl_linearization.o dbl_matrices_host.o \ + dbl_matrices_testers.o test_dbl_matrices.o @-echo ">>> linking ..." - $(gpp) -o test_dbl_series_vectors test_dbl_series_vectors.o \ + $(gpp) -o test_dbl_matrices test_dbl_matrices.o \ random_numbers.o random_series.o random_matrices.o \ - dbl_convolutions_host.o dbl_matrices_host.o \ - dbl_matrices_testers.o + dbl_convolutions_host.o dbl_linearization.o \ + dbl_matrices_host.o dbl_matrices_testers.o + +test_upper_jobs.o: + @-echo ">>> compiling test_upper_jobs ..." + $(gpp) -O3 -c test_upper_jobs.cpp + +test_upper_jobs: test_upper_jobs.o + @-echo ">>> linking ..." + $(gpp) -o test_upper_jobs test_upper_jobs.o + +dbl_linearization.o: + @-echo ">>> compiling dbl_linearization ..." + $(gpp) -O3 -c dbl_linearization.cpp + +test_dbl_linearization.o: + @-echo ">>> compiling test_dbl_linearization ..." + $(gpp) -O3 -c test_dbl_linearization.cpp + +test_dbl_linearization: test_dbl_linearization.o random_numbers.o \ + random_series.o random_matrices.o dbl_linearization.o + @-echo ">>> linking ..." + $(gpp) -o test_dbl_linearization test_dbl_linearization.o \ + random_numbers.o random_series.o random_matrices.o \ + dbl_linearization.o clean: /bin/rm -f -r random_matrices.o dbl_matrices_host.o - /bin/rm -f -r dbl_matrices_testers.o - /bin/rm -f -r test_dbl_series_vectors.o test_dbl_series_vectors + /bin/rm -f -r dbl_matrices_kernels.o + /bin/rm -f -r dbl_matrices_testers.o dbl_vectors_testers.o + /bin/rm -f -r test_dbl_vectors.o test_dbl_vectors + /bin/rm -f -r test_dbl_matrices.o test_dbl_matrices + /bin/rm -f -r test_upper_jobs.o test_upper_jobs + /bin/rm -f -r dbl_linearization.o + /bin/rm -f -r test_dbl_linearization.o test_dbl_linearization cleanall: clean /bin/rm -f -r random_numbers.o random_series.o diff -Nru phcpack-2.4.84/src/GPU/Matrices/makefile_windows phcpack-2.4.85/src/GPU/Matrices/makefile_windows --- phcpack-2.4.84/src/GPU/Matrices/makefile_windows 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/makefile_windows 2021-06-30 23:22:40.000000000 +0000 @@ -59,7 +59,38 @@ @-echo ">>> compiling dbl_matrices_host ..." $(CL)\cl /c -I$(CNV) dbl_matrices_host.cpp \ -I$(winkitucrt) -I$(includepath) -O2 \ - /Fo: dbl_matrices_host.obj + /Fo: dbl_matrices_host.obj /EHsc + +dbl_matrices_kernels.obj: + @-echo ">>> compiling dbl_matrices_kernels ..." + nvcc -ccbin=$(CL) -arch=$(smflag) -c -O3 \ + dbl_matrices_kernels.cu \ + -o dbl_matrices_kernels.obj + +dbl_vectors_testers.obj: + @-echo ">>> compiling dbl_vectors_testers ..." + $(CL)\cl /c -I$(MPD) -I$(CNV) dbl_vectors_testers.cpp \ + -I$(winkitucrt) -I$(includepath) -O2 \ + /I$(CUDASDK)/include \ + /Fo: dbl_vectors_testers.obj /EHsc + +test_dbl_vectors.obj: + @-echo ">>> compiling test_dbl_vectors ..." + $(CL)\cl /c test_dbl_vectors.cpp \ + -I$(winkitucrt) -I$(includepath) -I$(MPD) -I$(CNV) -O2 \ + /I$(CUDASDK)/include \ + /Fo: test_dbl_vectors.obj /EHsc + +test_dbl_vectors: random_numbers.obj random_series.obj \ + random_matrices.obj dbl_convolutions_host.obj \ + dbl_matrices_host.obj dbl_matrices_kernels.obj \ + dbl_vectors_testers.obj test_dbl_vectors.obj + @-echo ">>> linking ..." + nvcc -ccbin=$(CL) -o test_dbl_vectors.exe \ + random_numbers.obj random_series.obj random_matrices.obj \ + dbl_convolutions_host.obj dbl_matrices_host.obj \ + dbl_matrices_kernels.obj dbl_vectors_testers.obj \ + test_dbl_vectors.obj dbl_matrices_testers.obj: @-echo ">>> compiling dbl_matrices_testers ..." @@ -67,29 +98,71 @@ -I$(winkitucrt) -I$(includepath) -O2 \ /Fo: dbl_matrices_testers.obj /EHsc -test_dbl_series_vectors.obj: - @-echo ">>> compiling test_dbl_series_vectors ..." - $(CL)\cl /c test_dbl_series_vectors.cpp \ +test_dbl_matrices.obj: + @-echo ">>> compiling test_dbl_matrices ..." + $(CL)\cl /c test_dbl_matrices.cpp \ -I$(winkitucrt) -I$(includepath) -I$(MPD) -I$(CNV) -O2 \ /I$(CUDASDK)/include \ - /Fo: test_dbl_series_vectors.obj /EHsc + /Fo: test_dbl_matrices.obj /EHsc -test_dbl_series_vectors: random_numbers.obj random_series.obj \ - random_matrices.obj dbl_convolutions_host.obj \ - dbl_matrices_host.obj dbl_matrices_testers.obj \ - test_dbl_series_vectors.obj +test_dbl_matrices: random_numbers.obj random_series.obj \ + random_matrices.obj dbl_convolutions_host.obj \ + dbl_matrices_host.obj dbl_linearization.obj \ + dbl_matrices_testers.obj test_dbl_matrices.obj @-echo ">>> linking ..." - nvcc -ccbin=$(CL) -o test_dbl_series_vectors.exe \ + nvcc -ccbin=$(CL) -o test_dbl_matrices.exe \ random_numbers.obj random_series.obj random_matrices.obj \ dbl_convolutions_host.obj dbl_matrices_host.obj \ - dbl_matrices_testers.obj test_dbl_series_vectors.obj + dbl_linearization.obj dbl_matrices_testers.obj \ + test_dbl_matrices.obj + +test_upper_jobs.obj: + @-echo ">>> compiling test_upper_jobs ..." + $(CL)\cl /c test_upper_jobs.cpp \ + -I$(winkitucrt) -I$(includepath) -O2 \ + /I$(CUDASDK)/include \ + /Fo: test_upper_jobs.obj /EHsc + +test_upper_jobs: test_upper_jobs.obj + @-echo ">>> linking ..." + nvcc -ccbin=$(CL) -o test_upper_jobs.exe test_upper_jobs.obj + +dbl_linearization.obj: + @-echo ">>> compiling dbl_linearization ..." + $(CL)\cl /c dbl_linearization.cpp \ + -I$(winkitucrt) -I$(includepath) -O2 \ + /I$(CUDASDK)/include \ + /Fo: dbl_linearization.obj /EHsc + +test_dbl_linearization.obj: + @-echo ">>> compiling test_dbl_linearization ..." + $(CL)\cl /c test_dbl_linearization.cpp \ + -I$(winkitucrt) -I$(includepath) -O2 \ + /I$(CUDASDK)/include \ + /Fo: test_dbl_linearization.obj /EHsc + +test_dbl_linearization: test_dbl_linearization.obj dbl_linearization.obj \ + random_numbers.obj random_series.obj \ + random_matrices.obj + @-echo ">>> linking ..." + nvcc -ccbin=$(CL) -o test_dbl_linearization.exe \ + test_dbl_linearization.obj dbl_linearization.obj \ + random_numbers.obj random_series.obj random_matrices.obj clean: del *~ - del test_dbl_series_vectors.obj test_series_vectors_lib - del test_dbl_series_vectors.exe test_dbl_series_vectors.exp - del random_matrices.obj dbl_matrices_host.obj - del dbl_matrices_testers.obj + del test_dbl_vectors.obj test_dbl_vectors_lib + del test_dbl_vectors.exe test_dbl_vectors.exp + del test_dbl_matrices.obj test_dbl_matrices_lib + del test_dbl_matrices.exe test_dbl_matrices.exp + del test_upper_jobs.obj test_upper_jobs_lib + del test_upper_jobs.exe test_upper_jobs.exp + del dbl_linearization.obj + del test_dbl_linearization.obj test_dbl_linearization_lib + del test_dbl_linearization.exe test_dbl_linearization.exp + del random_matrices.obj + del dbl_matrices_host.obj dbl_matrices_kernels.obj + del dbl_matrices_testers.obj dbl_vectors_testers.obj cleanall: clean del *exe *obj *exp *lib diff -Nru phcpack-2.4.84/src/GPU/Matrices/random_matrices.cpp phcpack-2.4.85/src/GPU/Matrices/random_matrices.cpp --- phcpack-2.4.84/src/GPU/Matrices/random_matrices.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/random_matrices.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -4,10 +4,25 @@ #include "random_series.h" #include "random_matrices.h" -void random_dbl_series_vector ( int dim, int deg, double *x, double **v ) +void random_dbl_series_vector + ( int dim, int deg, double *x, double **v, bool expform ) { - for(int k=0; k +#include +#include +#include +#include "random_matrices.h" +#include "dbl_linearization.h" + +using namespace std; + +int test_dbl_vector_linearization ( int dim, int deg ); +/* + * Tests the linearization of a random vector of dimension dim, + * with series truncated at degree deg, for real data. */ + +int test_cmplx_vector_linearization ( int dim, int deg ); +/* + * Tests the linearization of a random vector of dimension dim, + * with series truncated at degree deg, for complex data. */ + +int test_dbl_matrix_linearization ( int nrows, int ncols, int deg ); +/* + * Tests the linearization of a random nrows-by-ncols matrix + * with series truncated at degree deg, for real data. */ + +int test_cmplx_matrix_linearization ( int nrows, int ncols, int deg ); +/* + * Tests the linearization of a random nrows-by_ncols matrix, + * with series truncated at degree deg, for complex data. */ + +int main ( void ) +{ + srand(time(NULL)); + + cout << "Give the dimension of the vector : "; + int dim; cin >> dim; + + cout << "Give the truncation degree of the series : "; + int deg; cin >> deg; + + cout << "Testing on real data ..." << endl; + test_dbl_vector_linearization(dim,deg); + + cout << "Testing on complex data ..." << endl; + test_cmplx_vector_linearization(dim,deg); + + cout << "Testing on matrices ..." << endl; + cout << "-> give the number of rows : "; + int nrows; cin >> nrows; + cout << "-> give the number of columns : "; + int ncols; cin >> ncols; + cout << "-> give the truncation degree : "; cin >> deg; + + test_dbl_matrix_linearization(nrows,ncols,deg); + + cout << "Testing on complex data ..." << endl; + test_cmplx_matrix_linearization(nrows,ncols,deg); + + return 0; +} + +int test_dbl_vector_linearization ( int dim, int deg ) +{ + double *x = new double[dim]; + double **v = new double*[dim]; + + for(int i=0; i 0) cout << "+ ( "; + cout << vre[i][j] << " " << vim[i][j]; + if(j == 0) + cout << endl; + else if(j == 1) + cout << " )*t" << endl; + else + cout << " )*t^" << j << endl; + } + } + double **wre = new double*[deg+1]; + double **wim = new double*[deg+1]; + + for(int i=0; i<=deg; i++) + { + wre[i] = new double[dim]; + wim[i] = new double[dim]; + } + cmplx_linear_series_vector(dim,deg,vre,vim,wre,wim); + + cout << "The coefficient vectors of the series :" << endl; + for(int i=0; i<=deg; i++) + { + cout << "w[" << i << "] :" << endl; + for(int j=0; j 0) cout << "+ ( "; + cout << Are[i][j][k] << " " << Aim[i][j][k]; + if(k == 0) + cout << endl; + else if(k == 1) + cout << " )*t" << endl; + else + cout << " )*t^" << k << endl; + } + } + + double ***Bre = new double**[deg+1]; + double ***Bim = new double**[deg+1]; + + for(int k=0; k<=deg; k++) + { + Bre[k] = new double*[nrows]; + Bim[k] = new double*[nrows]; + for(int i=0; i +#include +#include +#include +#include "dbl_matrices_testers.h" + +using namespace std; + +int main ( void ) +{ + srand(time(NULL)); + + cout << "testing the real upper solver ..." << endl; + test_real_upper_solver(); + cout << "testing the complex upper solver ..." << endl; + test_cmplx_upper_solver(); + + cout << "testing the real LU factorization ..." << endl; + test_real_lufac(); + cout << "testing the complex LU factorization ..." << endl; + test_cmplx_lufac(); + + cout << "testing the real LU solver ..." << endl; + test_real_lu_solver(); + cout << "testing the complex LU solver ..." << endl; + test_cmplx_lu_solver(); + + return 0; +} diff -Nru phcpack-2.4.84/src/GPU/Matrices/test_dbl_series_vectors.cpp phcpack-2.4.85/src/GPU/Matrices/test_dbl_series_vectors.cpp --- phcpack-2.4.84/src/GPU/Matrices/test_dbl_series_vectors.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/test_dbl_series_vectors.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* Tests operations on series vectors in double precision */ - -#include -#include -#include -#include -#include "dbl_matrices_testers.h" - -using namespace std; - -int main ( void ) -{ - srand(time(NULL)); - - cout << "testing the complex LU solver ..." << endl; - test_cmplx_lu_solver(); - cout << "testing the complex LU factorization ..." << endl; - test_cmplx_lufac(); - cout << "testing the real LU solver ..." << endl; - test_real_lu_solver(); - cout << "testing the real LU factorization ..." << endl; - test_real_lufac(); - cout << "testing a real inner product ..." << endl; - test_real_inner_product(); - cout << "testing a complex inner product ..." << endl; - test_cmplx_inner_product(); - cout << "testing a real matrix-vector product ..." << endl; - test_real_matrix_vector_product(); - cout << "testing a complex matrix-vector product ..." << endl; - test_cmplx_matrix_vector_product(); - cout << "testing the real upper solver ..." << endl; - test_real_upper_solver(); - cout << "testing the complex upper solver ..." << endl; - test_cmplx_upper_solver(); - - return 0; -} diff -Nru phcpack-2.4.84/src/GPU/Matrices/test_dbl_vectors.cpp phcpack-2.4.85/src/GPU/Matrices/test_dbl_vectors.cpp --- phcpack-2.4.84/src/GPU/Matrices/test_dbl_vectors.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/test_dbl_vectors.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,25 @@ +/* Tests operations on series vectors in double precision */ + +#include +#include +#include +#include +#include "dbl_vectors_testers.h" + +using namespace std; + +int main ( void ) +{ + srand(time(NULL)); + + cout << "testing a real inner product ..." << endl; + test_real_inner_product(); + cout << "testing a complex inner product ..." << endl; + test_cmplx_inner_product(); + cout << "testing a real matrix-vector product ..." << endl; + test_real_matrix_vector_product(); + cout << "testing a complex matrix-vector product ..." << endl; + test_cmplx_matrix_vector_product(); + + return 0; +} diff -Nru phcpack-2.4.84/src/GPU/Matrices/test_upper_jobs.cpp phcpack-2.4.85/src/GPU/Matrices/test_upper_jobs.cpp --- phcpack-2.4.84/src/GPU/Matrices/test_upper_jobs.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/GPU/Matrices/test_upper_jobs.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,62 @@ +/* Tests the jobs to solve an upper triangular system. */ + +#include + +using namespace std; + +void list_upper_jobs ( int dim ); +/* + * Writes all jobs to solve an upper triangular system + * of dimension dim. */ + +int main ( void ) +{ + cout << "Give the dimension : "; + int dim; cin >> dim; + + cout << "Jobs to solve a system of dimension " + << dim << " : " << endl; + + list_upper_jobs(dim); + + return 0; +} + +void list_upper_jobs ( int dim ) +{ + int lvl; + const int maxlvl = 3*dim-2; + int* freqops = new int[maxlvl]; + + for(int i=0; i=0; i--) + { + cout << "prod = b[" << i << "], level 0" << endl; + + lvl = 1; + + for(int j=dim-1; j>i; j--) + { + cout << "work = U[" << i << "][" << j << "]*x[" << j + << "], level " << ++lvl << endl; + freqops[lvl] = freqops[lvl] + 1; + + cout << "prod = prod - work, level = " << ++lvl << endl; + freqops[lvl] = freqops[lvl] + 1; + + lvl = lvl + 1; + } + cout << "work = 1/U[" << i << "][" << i << "], level 0" << endl; + freqops[0] = freqops[0] + 1; + + cout << "x[" << i << "] = prod/U[" + << i << "][" << i << "], level " << lvl << endl; + freqops[lvl] = freqops[lvl] + 1; + } + cout << "The frequency table : " << endl; + for(int i=0; i -#include -#include "adepath_d.h" -#include "adenewton_d.h" -#include "adeonepath_d.h" -#include "ademanypaths_d.h" - -int ade_newton_d ( int verbose ) -{ - int fail = adenewton_d(verbose); - - return fail; -} - -int ade_onepath_d ( int verbose, double regamma, double imgamma ) -{ - int fail = adeonepath_d(verbose,regamma,imgamma); - - return fail; -} - -int ade_manypaths_d ( int verbose, double regamma, double imgamma ) -{ - int fail = ademanypaths_d(verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/adepath_dd.c phcpack-2.4.85/src/Lib/adepath_dd.c --- phcpack-2.4.84/src/Lib/adepath_dd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/adepath_dd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* The file adepath_dd.c contains the definitions of the functions - * with prototypes documented in adepath_dd.h. */ - -#include -#include -#include "adepath_dd.h" -#include "adenewton_dd.h" -#include "adeonepath_dd.h" -#include "ademanypaths_dd.h" - -int ade_newton_dd ( int verbose ) -{ - int fail = adenewton_dd(verbose); - - return fail; -} - -int ade_onepath_dd ( int verbose, double regamma, double imgamma ) -{ - int fail = adeonepath_dd(verbose,regamma,imgamma); - - return fail; -} - -int ade_manypaths_dd ( int verbose, double regamma, double imgamma ) -{ - int fail = ademanypaths_dd(verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/adepath_dd.h phcpack-2.4.85/src/Lib/adepath_dd.h --- phcpack-2.4.84/src/Lib/adepath_dd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/adepath_dd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* The file adepath_dd.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation in double - * double precision which use the Ada code for the data structures in PHCpack. - * By default, compilation with gcc is assumed. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __ADEPATH_DD_H__ -#define __ADEPATH_DD_H__ - -int ade_newton_dd ( int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int ade_onepath_dd ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random constant gamma; - * imgamma imaginary part of the random constant gamma. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int ade_manypaths_dd ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random constant gamma; - * imgamma imaginary part of the random constant gamma. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/adepath_d.h phcpack-2.4.85/src/Lib/adepath_d.h --- phcpack-2.4.84/src/Lib/adepath_d.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/adepath_d.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* The file adepath_d.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation in double - * precision wrapped so it can be used as a C library. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __ADEPATH_D_H__ -#define __ADEPATH_D_H__ - -int ade_newton_d ( int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int ade_onepath_d ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int ade_manypaths_d ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/adepath_qd.c phcpack-2.4.85/src/Lib/adepath_qd.c --- phcpack-2.4.84/src/Lib/adepath_qd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/adepath_qd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* The file adepath_qd.c contains the definitions of the functions - * with prototypes documented in adepath_qd.h. */ - -#include -#include -#include "adepath_qd.h" -#include "adenewton_qd.h" -#include "adeonepath_qd.h" -#include "ademanypaths_qd.h" - -int ade_newton_qd ( int verbose ) -{ - int fail = adenewton_qd(verbose); - - return fail; -} - -int ade_onepath_qd ( int verbose, double regamma, double imgamma ) -{ - int fail = adeonepath_qd(verbose,regamma,imgamma); - - return fail; -} - -int ade_manypaths_qd ( int verbose, double regamma, double imgamma ) -{ - int fail = ademanypaths_qd(verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/adepath_qd.h phcpack-2.4.85/src/Lib/adepath_qd.h --- phcpack-2.4.84/src/Lib/adepath_qd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/adepath_qd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* The file adepath_qd.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation in quad - * double precision which use the Ada code for the data structures in PHCpack. - * By default, compilation with gcc is assumed. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __ADEPATH_DD_H__ -#define __ADEPATH_DD_H__ - -int ade_newton_qd ( int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int ade_onepath_qd ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random complex constant gamma; - * imgamma imaginary part of the random complex constant gamma. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int ade_manypaths_qd ( int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random complex constant gamma; - * imgamma imaginary part of the random complex constant gamma. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/face.gpr phcpack-2.4.85/src/Lib/face.gpr --- phcpack-2.4.84/src/Lib/face.gpr 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Lib/face.gpr 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,210 @@ +project face is + + type OS_type is ("linux", "windows", "macosx"); + os : OS_type := external("os", "linux"); + + case os is + when "linux" | "macosx" => + for Source_Dirs use + ( + ".", "../Ada/System", "../Ada/System/Unix_Timer", + "../Ada/Math_Lib/Numbers", "../Ada/Math_Lib/QD", + "../Ada/Math_Lib/Vectors", "../Ada/Math_Lib/Matrices", + "../Ada/Math_Lib/Reduction", "../Ada/Math_Lib/Divisors", + "../Ada/Math_Lib/Polynomials", "../Ada/Math_Lib/Functions", + "../Ada/Math_Lib/Supports", "../Ada/Math_Lib/Series", + "../Ada/Math_Lib/Circuits", "../Ada/Math_Lib/Laurent", + "../Ada/Deformations/Solutions", + "../Ada/Deformations/Homotopy", + "../Ada/Deformations/Newton", "../Ada/Deformations/Curves", + "../Ada/Deformations/End_Games", + "../Ada/Deformations/Trackers", "../Ada/Deformations/Sweep", + "../Ada/Deformations/Continuation", + "../Ada/Root_Counts/Product", "../Ada/Root_Counts/Binomials", + "../Ada/Root_Counts/Implift", "../Ada/Root_Counts/Stalift", + "../Ada/Root_Counts/Dynlift", "../Ada/Root_Counts/Symmetry", + "../Ada/Root_Counts/MixedVol", "../Ada/Root_Counts/Puiseux", + "../Ada/Root_Counts/DEMiCs", + "../Ada/Schubert/SAGBI", "../Ada/Schubert/Pieri", + "../Ada/Schubert/Induction", "../Ada/Components/Samplers", + "../Ada/Components/Interpolators", + "../Ada/Components/Factorization", + "../Ada/Components/Decomposition", + "../Ada/Components/Solver", "../Ada/Components/Tropical", + "../Ada/CtoPHC/Types", "../Ada/CtoPHC/Structures", + "../Ada/CtoPHC/Funky", "../Ada/CtoPHC/State", + "../Ada/PHCtoC", "../Ada/PHCtoC/Main_noqd", + "../Ada/Tasking", "../Ada/Main" + ); + for Languages use ("Ada", "C", "C++"); + for Excluded_Source_Files use + ( + "ts_use_syscon.c", + "ts_ctimer.adb", + "multithreading.ads", "multithreading.adb", + "ts_threads.adb", "ts_natdiv.adb", + "double_double.c", + "zero_index_tree.c", "index_tree_lp.c", "relation_table.c", + "prepare_for_mv.c", "one_level_lp.c", "mv.c", + "mixed_volume.c", "form_lp.c", "cell_stack.c", + "corecount.c", "corecountwindows.c", + "ts_mv2c.adb", + "phcpack.ads", "phcpack.adb", "use_phc.adb", + "main_output_feedback.ads", + "main_output_feedback.adb", + "option_handlers.ads", "option_handlers.adb", + "ts_opthand.adb", "phctop.ads", "phctop.adb", + "adenewton_d.cpp", + "adenewton_dd.cpp", "adenewton_qd.cpp", + "adeonepath_d.cpp", + "adeonepath_dd.cpp", "adeonepath_qd.cpp", + "ademanypaths_d.cpp", + "ademanypaths_dd.cpp", "ademanypaths_qd.cpp", + "ademanypaths.cpp", + "gpu2norm_d.cpp", "gpu2norm_dd.cpp", "gpu2norm_qd.cpp", + "gpunewton_d.cpp", "gpunewton_dd.cpp", "gpunewton_qd.cpp", + "gpuonepath_d.cpp", "gpuonepath_dd.cpp", "gpuonepath_qd.cpp", + "gpumanypaths_d.cpp", "gpumanypaths_dd.cpp", + "gpumanypaths_qd.cpp", + "main_ade_trackers.ads", "main_ade_trackers.adb", + "mainadep.ads", "mainadep.adb", + "algorithmic_diffeval_trackers.ads", + "algorithmic_diffeval_trackers.adb", + "standard_accelerated_trackers.ads", + "standard_accelerated_trackers.adb", + "standard_algodiffeval_trackers.ads", + "standard_algodiffeval_trackers.adb", + "dobldobl_accelerated_trackers.ads", + "dobldobl_accelerated_trackers.adb", + "dobldobl_algodiffeval_trackers.ads", + "dobldobl_algodiffeval_trackers.adb", + "quaddobl_accelerated_trackers.ads", + "quaddobl_accelerated_trackers.adb", + "quaddobl_algodiffeval_trackers.ads", + "quaddobl_algodiffeval_trackers.adb", + "ts_ademanypaths.adb", + "ts_adepath.adb", "ts_adepath_d.adb", + "ts_adepath_dd.adb", "ts_adepath_qd.adb", + "ts_gpu2norm.adb", "ts_gpu2norm_d.adb", + "ts_gpu2norm_dd.adb", "ts_gpu2norm_qd.adb", + "ts_gpunewton_dd.adb", "ts_gpunewton_qd.adb", + "ts_gpunewton.adb", + "ts_gpuonepath_d.adb", "ts_gpuonepath_dd.adb", + "ts_gpu2norm_d_in_c.c", + "ts_gpuonepath_qd.adb", + "ts_cpu2norm.adb", "ts_cpu2norm_d.adb", + "ts_cpu2norm_dd.adb", "ts_cpu2norm_qd.adb", + "ts_gpupath_d.adb", "ts_gpupath_dd.adb", + "ts_gpumanypaths_d.adb", + "ts_gpumanypaths_dd.adb", + "ts_gpumanypaths_qd.adb", "ts_gpupath_qd.adb", + "ts_pathpars.adb", + "evaluate_schubert_conditions.ads", + "evaluate_schubert_conditions.adb", + "multprec_lattice_facets.ads", + "multprec_lattice_facets.adb", + "multprec_lattice_facets_io.ads", + "multprec_lattice_facets_io.adb", + "testfivehom1.adb", "testnine.adb", + "multihomogeneous_solutions.ads", + "multihomogeneous_solutions.adb", + "p_intrinsic_diagonal_continuation.ads", + "p_intrinsic_diagonal_continuation.adb", + "p_intrinsic_diagonal_homotopies.ads", + "p_intrinsic_diagonal_homotopies.adb", + "p_intrinsic_diagonal_solvers.ads", + "p_intrinsic_diagonal_solvers.adb", + "intrinsic_diagonal_homotopies.ads", + "intrinsic_diagonal_homotopies.adb", + "intrinsic_diagonal_solvers.ads", + "intrinsic_diagonal_solvers.adb", + "drivers_to_intrinsic_solvers.ads", + "drivers_to_intrinsic_solvers.adb", + "ts_diahom.adb", "ts_elim.adb", "ts_reorder.adb", + "ts_ifactor.adb", "ts_itrack.adb", "ts_ilocal.adb", + "ts_inewt.adb", + "rewrite_polynomials.ads", "rewrite_polynomials.adb", + "ts_rwpoly.adb", "ts_rewrite.adb", "phc_factor.adb", + "ts_squeeze.adb", "ts_intcas.adb", "ts_sqem.adb", + "multiplicity_homotopies.ads", + "multiplicity_homotopies.adb", "ts_mulhom.adb", + "ts_mulsam.adb", "ts_sampar.adb", "ts_endgm.adb", + "intrinsic_sampling_machine.ads", + "intrinsic_sampling_machine.adb", + "filter_and_split_solutions.ads", + "filter_and_split_solutions.adb", + "track_paths.ads", "track_paths.adb", "ts_path_tracker.adb", + "phc_solver.ads", "phc_solver.adb", + "pieri_count.ads", "pieri_count.adb", + "pieri_solver_trf.adb", + "face_structures.ads", "face_structures.adb", + "weighted_projective_transfos.ads", + "weighted_projective_transfos.adb" + ); + when "windows" => + for Source_Dirs use + ( + ".", "../../System", "../../System/Basic_Timer", + "../../Math_Lib/Numbers", "../../Math_Lib/QD", + "../../Math_Lib/Vectors", "../../Math_Lib/Matrices", + "../../Math_Lib/Reduction", "../../Math_Lib/Divisors", + "../../Math_Lib/Polynomials", "../../Math_Lib/Functions", + "../../Math_Lib/Supports", "../../Deformations/Solutions", + "../../Deformations/Homotopy", + "../../Deformations/Newton", "../../Deformations/Curves", + "../../Deformations/End_Games", + "../../Deformations/Trackers", + "../../Deformations/Continuation", + "../Product", "../Binomials", "../Implift", "../Stalift" + ); + for Excluded_Source_Files use ("double_double.c"); + for Languages use ("Ada", "C"); + end case; + + for Object_Dir use "../Objects"; + for Exec_Dir use "../bin"; + + for Main use + ( + -- "lib_pieri.c", -- test Pieri homotopies + "ts_list2str.c", -- test lists and string conversions + "lib_syscon.c", -- test systems container + "lib_solcon.c", -- test solutions container + "lib_celcon.c" -- test cells container + ); + + package Compiler is + + for Default_Switches ("Ada") use ("-gnatwa", "-gnatva"); + + for Switches ("use_c2phc.adb") use ("-c"); + + for Switches ("simplex.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("mvc.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc=1" + ); + for Switches ("demicsrun.cpp") use + ( + "-Dcompilewgpp=1", "-Dcompile4phc" + ); + for Switches ("outputData.cpp") use ("-Dcompilewgpp=1"); + + end Compiler; + + package Binder is + + for Switches ("use_c2phc.adb") use ("-n"); + + end Binder; + + package Linker is + + for Switches ("main.cpp") use ("-o demics"); + + end Linker; + +end face; diff -Nru phcpack-2.4.84/src/Lib/gpupath_d.c phcpack-2.4.85/src/Lib/gpupath_d.c --- phcpack-2.4.84/src/Lib/gpupath_d.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_d.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* The file gpupath_d.c contains the definitions of the functions - * with prototypes documented in gpupath_d.h. */ - -#include -#include -#include "gpupath_d.h" -#include "gpunewton_d.h" -#include "gpuonepath_d.h" -#include "gpumanypaths_d.h" - -int gpu_newton_d ( int mode, int verbose ) -{ - int fail = gpunewton_d(mode,verbose); - - return fail; -} - -int gpu_onepath_d ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpuonepath_d(mode,verbose,regamma,imgamma); - - return fail; -} - -int gpu_manypaths_d ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpumanypaths_d(mode,verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/gpupath_dd.c phcpack-2.4.85/src/Lib/gpupath_dd.c --- phcpack-2.4.84/src/Lib/gpupath_dd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_dd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* The file gpupath_dd.c contains the definitions of the functions - * with prototypes documented in gpupath_dd.h. */ - -#include -#include -#include "gpupath_dd.h" -#include "gpunewton_dd.h" -#include "gpuonepath_dd.h" -#include "gpumanypaths_dd.h" - -int gpu_newton_dd ( int mode, int verbose ) -{ - int fail = gpunewton_dd(mode,verbose); - - return fail; -} - -int gpu_onepath_dd ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpuonepath_dd(mode,verbose,regamma,imgamma); - - return fail; -} - -int gpu_manypaths_dd ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpumanypaths_dd(mode,verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/gpupath_dd.h phcpack-2.4.85/src/Lib/gpupath_dd.h --- phcpack-2.4.84/src/Lib/gpupath_dd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_dd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* The file gpupath_dd.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation on the GPU - * in double double precision wrapped so it can be used as a C library. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __GPUPATH_DD_H__ -#define __GPUPATH_DD_H__ - -int gpu_newton_dd ( int mode, int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int gpu_onepath_dd ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int gpu_manypaths_dd ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/gpupath_d.h phcpack-2.4.85/src/Lib/gpupath_d.h --- phcpack-2.4.84/src/Lib/gpupath_d.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_d.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* The file gpupath_d.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation in double - * precision wrapped so it can be used as a C library. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __GPUPATH_D_H__ -#define __GPUPATH_D_H__ - -int gpu_newton_d ( int mode, int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU or GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int gpu_onepath_d ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU or GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int gpu_manypaths_d ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU or GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/gpupath_qd.c phcpack-2.4.85/src/Lib/gpupath_qd.c --- phcpack-2.4.84/src/Lib/gpupath_qd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_qd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* The file gpupath_qd.c contains the definitions of the functions - * with prototypes documented in gpupath_qd.h. */ - -#include -#include -#include "gpupath_qd.h" -#include "gpunewton_qd.h" -#include "gpuonepath_qd.h" -#include "gpumanypaths_qd.h" - -int gpu_newton_qd ( int mode, int verbose ) -{ - int fail = gpunewton_qd(mode,verbose); - - return fail; -} - -int gpu_onepath_qd ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpuonepath_qd(mode,verbose,regamma,imgamma); - - return fail; -} - -int gpu_manypaths_qd ( int mode, int verbose, double regamma, double imgamma ) -{ - int fail = gpumanypaths_qd(mode,verbose,regamma,imgamma); - - return fail; -} diff -Nru phcpack-2.4.84/src/Lib/gpupath_qd.h phcpack-2.4.85/src/Lib/gpupath_qd.h --- phcpack-2.4.84/src/Lib/gpupath_qd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/gpupath_qd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -/* The file gpupath_qd.h contains prototypes to call Newton's method and - * the path tracking methods using algorithmic differentiation on the GPU - * in quad double precision wrapped so it can be used as a C library. - * To compile with a C++ compiler such as g++, the flag compilewgpp must - * be defined as "g++ -Dcompilewgpp=1." */ - -#ifndef __GPUPATH_QD_H__ -#define __GPUPATH_QD_H__ - -int gpu_newton_qd ( int mode, int verbose ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The quaddobl systems container contains a valid polynomial system - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -int gpu_onepath_qd ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -int gpu_manypaths_qd ( int mode, int verbose, double regamma, double imgamma ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * containers. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode equals 0, 1, or 2: - * if mode = 0, then both CPU and GPU will execute, - * if mode = 1, then only CPU runs Newton's method, - * if mode = 2, then only GPU runs Newton's method; - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random gamma constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -#endif diff -Nru phcpack-2.4.84/src/Lib/lib_adepath_d.c phcpack-2.4.85/src/Lib/lib_adepath_d.c --- phcpack-2.4.84/src/Lib/lib_adepath_d.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_adepath_d.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in adepath_d */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "adepath_d.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation : \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_standard_start_system(); - fail = copy_start_system_to_container(); - fail = copy_start_solutions_to_container(); - fail = syscon_number_of_standard_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_newton_d(1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_standard_target_system(); - fail = read_standard_start_system(); - fail = copy_start_solutions_to_container(); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_onepath_d(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_standard_target_system(); - fail = read_standard_start_system(); - fail = copy_start_solutions_to_container(); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_manypaths_d(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/lib_adepath_dd.c phcpack-2.4.85/src/Lib/lib_adepath_dd.c --- phcpack-2.4.84/src/Lib/lib_adepath_dd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_adepath_dd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in adepath_dd */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "adepath_dd.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation : \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_system_to_container(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = syscon_number_of_dobldobl_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_newton_dd(1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_dobldobl_target_system(); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_onepath_dd(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_dobldobl_target_system(); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_manypaths_dd(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/lib_adepath_qd.c phcpack-2.4.85/src/Lib/lib_adepath_qd.c --- phcpack-2.4.84/src/Lib/lib_adepath_qd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_adepath_qd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in adepath_qd */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "adepath_qd.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation : \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_system_to_container(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = syscon_number_of_quaddobl_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_newton_qd(1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_quaddobl_target_system(); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_onepath_qd(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_quaddobl_target_system(); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = ade_manypaths_qd(1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/lib_gpupath_d.c phcpack-2.4.85/src/Lib/lib_gpupath_d.c --- phcpack-2.4.84/src/Lib/lib_gpupath_d.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_gpupath_d.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in gpupath_d */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "gpupath_d.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_standard_start_system(); - fail = copy_start_system_to_container(); - fail = copy_start_solutions_to_container(); - fail = syscon_number_of_standard_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_newton_d(2,1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_standard_target_system(); - fail = read_standard_start_system(); - fail = copy_start_solutions_to_container(); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_onepath_d(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_standard_target_system(); - fail = read_standard_start_system(); - fail = copy_start_solutions_to_container(); - fail = solcon_number_of_standard_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_manypaths_d(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_standard_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/lib_gpupath_dd.c phcpack-2.4.85/src/Lib/lib_gpupath_dd.c --- phcpack-2.4.84/src/Lib/lib_gpupath_dd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_gpupath_dd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in gpupath_dd */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "gpupath_dd.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_system_to_container(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = syscon_number_of_dobldobl_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_newton_dd(2,1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_dobldobl_target_system(); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_onepath_dd(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_dobldobl_target_system(); - fail = read_dobldobl_start_system(); - fail = copy_dobldobl_start_solutions_to_container(); - fail = solcon_number_of_dobldobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_manypaths_dd(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_dobldobl_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/lib_gpupath_qd.c phcpack-2.4.85/src/Lib/lib_gpupath_qd.c --- phcpack-2.4.84/src/Lib/lib_gpupath_qd.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/lib_gpupath_qd.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -/* test on the functions in gpupath_qd */ - -#include -#include -#include -#include "phcpack.h" -#include "syscon.h" -#include "solcon.h" -#include "gpupath_qd.h" - -void test_newton ( void ); -/* - * DESCRIPTION : - * The user is prompted for a start system - * and Newton's method is called. */ - -void test_onepath ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and one solution path is tracked. */ - -void test_manypaths ( void ); -/* - * DESCRIPTION : - * The user is prompted for a target and start system - * and many solution paths are tracked. */ - -int main ( int argc, char *argv[] ) -{ - int choice; - char ch; - - adainit(); - - printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); - printf(" 0. in Newton's method to correct one solution;\n"); - printf(" 1. to track one solution path;\n"); - printf(" 2. to track many solution paths.\n"); - printf("Type 0, 1, or 2 to select : "); - scanf("%d",&choice); - scanf("%c",&ch); /* skip newline symbol */ - - if(choice == 0) - test_newton(); - else if(choice == 1) - test_onepath(); - else if(choice == 2) - test_manypaths(); - else - printf("invalid selection, please try again\n"); - - adafinal(); - - return 0; -} - -void test_newton ( void ) -{ - int fail,dim,len; - - printf("\nRunning Newton's method ...\n"); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_system_to_container(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = syscon_number_of_quaddobl_polynomials(&dim); - printf("The system container has %d polynomials.\n",dim); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_newton_qd(2,1); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} - -void test_onepath ( void ) -{ - int fail,len; - - printf("\nTracking one solution path ...\n"); - fail = read_quaddobl_target_system(); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_onepath_qd(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} - -void test_manypaths ( void ) -{ - int fail,len; - - printf("\nTracking many solution paths ...\n"); - fail = read_quaddobl_target_system(); - fail = read_quaddobl_start_system(); - fail = copy_quaddobl_start_solutions_to_container(); - fail = solcon_number_of_quaddobl_solutions(&len); - printf("The solution container has size %d.\n",len); - fail = gpu_manypaths_qd(2,1,1.0,0.0); - printf("The solutions after Newton's method :\n"); - fail = solcon_write_quaddobl_solutions(); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2c2.c phcpack-2.4.85/src/Lib/phcpy2c2.c --- phcpack-2.4.84/src/Lib/phcpy2c2.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2c2.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,11852 +0,0 @@ -/* This file contains the definitions of the prototypes in phcpy2c.h. */ - -#include -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "tabform.h" -#include "syspool.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "intcelcon.h" -#include "scalers.h" -#include "reducers.h" -#include "numbtrop.h" -#include "sweep.h" -#include "multiplicity.h" -#include "witset.h" -#include "witsols.h" -#include "mapcon.h" -#include "series.h" -#include "padcon.h" -#include "jump_track.h" -#include "next_track.h" -#include "structmember.h" - -#ifdef compilewgpp -extern "C" void adainit( void ); -extern "C" void adafinal( void ); -#else -extern void adainit( void ); -extern void adafinal( void ); -#endif - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -static PyObject *py2c_corecount - ( PyObject *self, PyObject *args ) -{ - if(!PyArg_ParseTuple(args,"")) return NULL; - - int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN); - - return Py_BuildValue("i", number_of_cores); -} - -/* The wrapping of functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed - ( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed - ( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of copying systems from and to containers starts here. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im,&pwt)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_value_of_continuation_parameter - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - double val; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = get_value_of_continuation_parameter(idx,&val); - - return Py_BuildValue("d",val); -} - -static PyObject *py2c_set_value_of_continuation_parameter - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - double val; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&idx,&val)) return NULL; - fail = set_value_of_continuation_parameter(idx,&val); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_standard_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -/* Wrapping of crude path trackers of the jumpstart library starts here. */ - -static PyObject *py2c_standard_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = standard_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = dobldobl_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = quaddobl_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of copying solutions from and to containers starts here. */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,vrb,nbtasks,mvfocus = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) - return NULL; - fail = solve_standard_system(&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_scan_for_symbols - ( PyObject *self, PyObject *args ) -{ - int fail,nbc,dim; - char *polsys; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc,&polsys)) return NULL; - - fail = scan_number_of_variables(nbc,polsys,&dim); - - return Py_BuildValue("i",dim); -} - -static PyObject *py2c_solve_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_dobldobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,vrb,nbtasks = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_quaddobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,vrb,nbtasks,mvfocus = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) - return NULL; - fail = solve_standard_Laurent_system - (&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,vrb,nbtasks = 0; - char rocos[1024]; - - initialize(); - if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_dobldobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_quaddobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ) -{ - int fail,prc,vrb; - double regm,imgm; - - initialize(); - if (!PyArg_ParseTuple(args,"ddii",®m,&imgm,&prc,&vrb)) return NULL; - fail = set_gamma_constant(regm,imgm,prc,vrb); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ) -{ - int fail,prc,vrb; - double regm,imgm; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&prc,&vrb)) return NULL; - fail = get_gamma_constant(®m,&imgm,prc,vrb); - - return Py_BuildValue("(d,d)",regm,imgm); -} - -static PyObject *py2c_mixed_volume - ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_mixed_volume_by_demics - ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume_by_demics(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume_by_demics(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = standard_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = dobldobl_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = quaddobl_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_condition_report - ( PyObject *self, PyObject *args ) -{ - int fail,maxit,verbose; - double tolres,tolerr,tolsing; - char *name; - int cntfail,cntreal,cntcmplx,cntregu,cntsing,cntclus,nbc; - int t_err[16]; - int t_rco[16]; - int t_res[16]; - char st_err[256]; - char st_rco[256]; - char st_res[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"idddsi", - &maxit,&tolres,&tolerr,&tolsing,&name,&verbose)) - return NULL; - - nbc = strlen(name); - - if(verbose == 1) - { - if(nbc == 0) - printf("Writing the output to screen.\n"); - else - printf("Writing the output to file %s.\n", name); - } - fail = standard_condition_report - (maxit,tolres,tolerr,tolsing,nbc,name, - &cntfail,&cntreal,&cntcmplx,&cntregu,&cntsing,&cntclus, - t_err,t_rco,t_res,verbose); - - intlist2str(16, t_err, st_err); - intlist2str(16, t_rco, st_rco); - intlist2str(16, t_res, st_res); - - return Py_BuildValue("(i, i, i, i, i, i, i, s, s, s)", fail, - cntregu, cntsing, cntreal, cntcmplx, cntclus, cntfail, - st_err, st_res, st_rco); -} - -/* The wrapping of the functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec - ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* The wrapping of the functions in giftwrappers.h starts from here. */ - -static PyObject *py2c_giftwrap_planar - ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull - ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int idx,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - nbr = support_size(idx); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions in syscon.h starts from here. */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_dobldobl_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_quaddobl_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_standard_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_standard_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_standard_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_standard_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_standard_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_standard_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_standard_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term - ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_standard_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free(exp); - free(c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_standard_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_standard_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_multprec_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_standard_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_multprec_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_total_degree - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_standard_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_dobldobl_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_quaddobl_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_add_symbol - ( PyObject *self, PyObject *args ) -{ - int fail,nbc; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc,&name)) return NULL; - - fail = syscon_add_symbol(nbc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_standard_one_affinization(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_dobldobl_one_affinization(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_quaddobl_one_affinization(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions in tabform.h starts from here */ - -static PyObject *py2c_tabform_store_standard_tableau - ( PyObject *self, PyObject *args ) -{ - int fail,neq,nvr,nc1,nc2,nc3,verbose; - char *nbt,*cff,*xpc; - - initialize(); - if(!PyArg_ParseTuple(args,"iiisisisi",&neq,&nvr,&nc1,&nbt,&nc2,&cff, - &nc3,&xpc,&verbose)) return NULL; - { - if(verbose > 0) - { - printf("the string of terms : %s\n", nbt); - printf("the string of coefficients : %s\n", cff); - printf("the string of exponents : %s\n", xpc); - } - int ic1 = itemcount(nbt); - int ic2 = itemcount(xpc); - int ic3 = itemcount(cff); - - if(verbose > 0) - { - printf("number of items in nbt : %d\n", ic1); - printf("number of items in xpc : %d\n", ic2); - printf("number of items in cff : %d\n", ic3); - } - int nbterms[ic1]; - int exponents[ic2]; - double coefficients[ic3]; - - str2intlist(ic1,nbt,nbterms); - str2intlist(ic2,xpc,exponents); - str2dbllist(ic3,cff,coefficients); - - if(verbose > 0) - { - int idx; - - printf("the number of terms : "); - for(idx=0; idx 0) - { - printf("the number of equations : %d\n", neq); - printf("the number of variables : %d\n", nvr); - printf("total number of terms : %d\n", nbt); - } - { - int nbterms[neq]; - const int nbexp = nvr*nbt; - const int nbcff = 2*nbt; - int exponents[nbexp]; - double coefficients[nbcff]; - char strnbt[neq*8]; - char strxps[nbexp*8]; - char strcff[nbcff*26]; - - fail = number_of_standard_terms(neq,nbterms,&nbt,verbose); - fail = standard_tableau_form - (neq,nvr,nbterms,coefficients,exponents,verbose); - - intlist2str(neq, nbterms, strnbt); - intlist2str(nbexp, exponents, strxps); - dbllist2str(nbcff, coefficients, strcff); - if(verbose > 0) - { - int idx; - printf("the number of terms : "); - for(idx=0; idx 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions with prototypes in reducers.h starts here. */ - -static PyObject *py2c_linear_reduce_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = standard_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_linear_reduce_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = dobldobl_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_linear_reduce_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = quaddobl_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_nonlinear_reduce_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,eqmax,spmax,rpmax,eqcnt,spcnt,rpcnt; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&eqmax,&spmax,&rpmax)) return NULL; - - fail = standard_nonlinear_reduce_system - (eqmax,spmax,rpmax,&eqcnt,&spcnt,&rpcnt); - - return Py_BuildValue("(i,i,i)",eqcnt,spcnt,rpcnt); -} - -/* The wrapping of the functions with prototypes in sweep.h starts here. */ - -static PyObject *py2c_sweep_define_parameters_numerically - ( PyObject *self, PyObject *args ) -{ - int fail,nq,nv,np,cnt; - char *strpars; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nq,&nv,&np,&strpars)) return NULL; - - cnt = itemcount(strpars); - { - int pars[cnt]; - - str2intlist(cnt,strpars,pars); - fail = sweep_define_parameters_numerically(nq,nv,np,pars); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_define_parameters_symbolically - ( PyObject *self, PyObject *args ) -{ - int fail,nq,nv,np,nc; - char *pars; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nq,&nv,&np,&nc,&pars)) return NULL; - - fail = sweep_define_parameters_symbolically(nq,nv,np,nc,pars); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_get_number_of_equations - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_equations(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_number_of_variables - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_variables(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_number_of_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_indices_numerically - ( PyObject *self, PyObject *args ) -{ - int fail,np,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&np); - { - int idx[np]; - char stridx[np*10]; - - fail = sweep_get_indices_numerically(idx); - - nc = intlist2str(np,idx,stridx); - - return Py_BuildValue("s",stridx); - } -} - -static PyObject *py2c_sweep_get_indices_symbolically - ( PyObject *self, PyObject *args ) -{ - int fail,np,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&np); - { - char buf[np*20]; /* assumes no more than 20 characters per symbol */ - - fail = sweep_get_indices_symbolically(&nc,buf); - - buf[nc] = '\0'; - - return Py_BuildValue("s",buf); - } -} - -static PyObject *py2c_sweep_clear_definitions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_clear_definitions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_standard_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 2*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_standard_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_standard_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 2*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_standard_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_dobldobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 4*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_dobldobl_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_dobldobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 4*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_dobldobl_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_quaddobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 8*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_quaddobl_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_quaddobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 8*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_quaddobl_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_get_standard_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_standard_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_standard_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_standard_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_dobldobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_dobldobl_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_dobldobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_dobldobl_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_quaddobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_quaddobl_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_quaddobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_quaddobl_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_standard_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - - fail = sweep_standard_complex_run(choice,&g_re,&g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_dobldobl_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - { - if(choice < 2) - fail = sweep_dobldobl_complex_run(choice,&g_re,&g_im); - else - { - double regamma[2]; - double imgamma[2]; - regamma[0] = g_re; regamma[1] = 0.0; - imgamma[0] = g_im; imgamma[1] = 0.0; - fail = sweep_dobldobl_complex_run(choice,regamma,imgamma); - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_quaddobl_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - { - if(choice < 2) - fail = sweep_quaddobl_complex_run(choice,&g_re,&g_im); - else - { - double regamma[4]; - double imgamma[4]; - regamma[0] = g_re; regamma[1] = 0.0; - regamma[2] = 0.0; regamma[3] = 0.0; - imgamma[0] = g_im; imgamma[1] = 0.0; - imgamma[2] = 0.0; imgamma[3] = 0.0; - fail = sweep_quaddobl_complex_run(choice,regamma,imgamma); - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_standard_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_standard_real_run(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_dobldobl_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_dobldobl_real_run(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_quaddobl_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_quaddobl_real_run(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping for the multiplicity structure starts here. */ - -static PyObject *py2c_standard_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = standard_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -static PyObject *py2c_dobldobl_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose,mult; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = dobldobl_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -static PyObject *py2c_quaddobl_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose,mult; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = quaddobl_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -/* The wrapping of the numerical tropisms container starts here. */ - -static PyObject *py2c_numbtrop_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail,nbt,dim,k; - char *data; /* all numbers come in one long string */ - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&nbt,&dim,&data)) return NULL; - { - const int lendata = nbt*(dim+2); - double numbers[lendata]; - int wnd[nbt]; - double dir[nbt*dim]; - double err[nbt]; - - str2dbllist(lendata,data,numbers); - - for(k=0; k %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_update_dobldobl_decomposition - ( PyObject *self, PyObject *args ) -{ - int fail,i,d,nc; - char *permutation; - int done = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; - { - int nb,perm[d],nf[2]; - - /* printf("updating with "); - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_update_quaddobl_decomposition - ( PyObject *self, PyObject *args ) -{ - int fail,i,d,nc; - char *permutation; - int done = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; - { - int nb,perm[d],nf[2]; - - /* printf("updating with "); - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_standard_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_standard_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_number_of_dobldobl_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_dobldobl_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_number_of_quaddobl_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_quaddobl_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_standard_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_standard_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,vrf,mrp,sqr,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiisiiiiis", - &n,&k,&nbc,&nc,&cond,&vrb,&vrf,&mrp,&sqr,&szn,&name)) - return NULL; -/* - printf("the value of szn : %d\n", szn); - printf("the value of vrb : %d\n", vrb); - printf("the value of vrf : %d\n", vrf); - printf("the value of mrp : %d\n", mrp); - printf("the value of sqr : %d\n", sqr); - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = standard_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 4*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = dobldobl_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 8*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = quaddobl_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_standard_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_track - ( PyObject *self, PyObject *args ) -{ - int nbc,fail,localfile,verbose,mhom,nvr,*idz; - char *name; - char *stridz; - - initialize(); - if(!PyArg_ParseTuple(args,"isiiiis", - &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; - - if(mhom == 1) - padcon_dobldobl_projective_transformation(); - else if(mhom > 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_dobldobl_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_track - ( PyObject *self, PyObject *args ) -{ - int nbc,fail,localfile,verbose,mhom,nvr,*idz; - char *name; - char *stridz; - - initialize(); - if(!PyArg_ParseTuple(args,"isiiiis", - &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; - - if(mhom == 1) - padcon_quaddobl_projective_transformation(); - else if(mhom > 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_quaddobl_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_standard_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_dobldobl_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_quaddobl_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_standard_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_dobldobl_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_quaddobl_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_standard_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_dobldobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_quaddobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_standard_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_dobldobl_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_dobldobl_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_quaddobl_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_quaddobl_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_get_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_standard_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_get_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_dobldobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_get_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_quaddobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_dobldobl_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_quaddobl_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_standard_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_dobldobl_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_quaddobl_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_standard_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_dobldobl_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_quaddobl_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_standard_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_clear_standard_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_standard_data(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_clear_dobldobl_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_dobldobl_data(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_clear_quaddobl_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_quaddobl_data(); - return Py_BuildValue("i",fail); -} - -/* The wrapping of functions with prototypes in syspool.h starts below. */ - -static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_standard_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_dobldobl_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_quaddobl_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_standard_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_dobldobl_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_quaddobl_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_standard_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_standard_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_dobldobl_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_quaddobl_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_standard_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_standard_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_dobldobl_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_dobldobl_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_quaddobl_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_quaddobl_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_standard_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_standard_clear(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_dobldobl_clear(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_quaddobl_clear(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_standard_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_dobldobl_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_quaddobl_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,deci,fixed; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&fixed,&deci)) return NULL; - fail = initialize_multprec_homotopy(fixed,deci); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_varbprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed,nctgt,ncstr; - char *tgt; - char *str; - - initialize(); - if(!PyArg_ParseTuple(args,"iisis",&fixed,&nctgt,&tgt,&ncstr,&str)) - return NULL; - fail = initialize_varbprec_homotopy(fixed,nctgt,tgt,ncstr,str); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_standard_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_dobldobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_quaddobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_multprec_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,nv,nc; - char *sol; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&nv,&nc,&sol)) return NULL; - fail = initialize_varbprec_solution(nv,nc,sol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_standard_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_dobldobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_quaddobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_multprec_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,want,mxpr,mxit,verb,nc; - char *sol; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&want,&mxpr,&mxit,&verb)) return NULL; - sol = next_varbprec_solution(want,mxpr,mxit,verb,&nc,&fail); - - return Py_BuildValue("(i,s)",fail,sol); -} - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_standard_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_varbprec_tracker(); - return Py_BuildValue("i",fail); -} - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in lib2path.h, starts here. */ - -// For the separate compilation of lib2path, extern declarations are needed. - -extern int standard_ade_newton ( int verbose ); -extern int standard_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int standard_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -extern int dobldobl_ade_newton ( int verbose ); -extern int dobldobl_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int dobldobl_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -extern int quaddobl_ade_newton ( int verbose ); -extern int quaddobl_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int quaddobl_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = standard_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = dobldobl_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = quaddobl_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = standard_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = dobldobl_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = quaddobl_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = standard_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = dobldobl_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = quaddobl_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -/* For the parameter tuning we need the default path parameters, - * provided by the lib2path function below, - * see lib2path.h for its specification. */ - -extern int get_default_path_parameters - ( int precision, int* max_step, int* n_predictor, - double* step_increase, double* step_decrease, - double* max_delta_t, double* max_delta_t_end, double* min_delta_t, - double* err_max_res, double* err_max_delta_x, double* err_max_first_delta_x, - int* max_it, double* err_min_round_off, - int* max_it_refine, double* err_min_round_off_refine ); - -static PyObject *py2c_get_default_path_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,precision,max_step,n_predictor,max_it,max_it_refine; - double step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&precision)) return NULL; - fail = get_default_path_parameters(precision,&max_step,&n_predictor, - &step_increase,&step_decrease,&max_delta_t,&max_delta_t_end,&min_delta_t, - &err_max_res,&err_max_delta_x,&err_max_first_delta_x, - &max_it,&err_min_round_off,&max_it_refine,&err_min_round_off_refine); - - return Py_BuildValue("(i,i,d,d,d,d,d,d,d,d,i,d,i,d)", - max_step,n_predictor,step_increase, - step_decrease,max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); -} - -// for separate compilation, extern declarations are needed, as below - -extern int standard_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -extern int dobldobl_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -extern int quaddobl_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = standard_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = dobldobl_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = quaddobl_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyMethodDef phcpy2c_methods[] = -{ - {"py2c_corecount", py2c_corecount, METH_VARARGS, - "Returns the number of cores available for multithreading."}, - {"py2c_PHCpack_version_string", py2c_PHCpack_version_string, METH_VARARGS, - "Returns the version string of PHCpack.\n The version string is 40 characters long."}, - {"py2c_set_seed", py2c_set_seed, METH_VARARGS, - "Takes the value of the integer given on input\n and sets the seed for the random number generators.\n This fixing of the seed enables reproducible runs." }, - {"py2c_get_seed", py2c_get_seed, METH_VARARGS, - "Returns the current value of the seed.\n Using this value in py2c_set_seed will ensure that the\n results of previous runs can be reproduced."}, - {"py2c_read_standard_target_system", py2c_read_standard_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_target_system_from_file", - py2c_read_standard_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_start_system", py2c_read_standard_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_start_system_from_file", - py2c_read_standard_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_target_system", py2c_read_dobldobl_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_target_system_from_file", - py2c_read_dobldobl_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_start_system", py2c_read_dobldobl_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_start_system_from_file", - py2c_read_dobldobl_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_target_system", py2c_read_quaddobl_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_target_system_from_file", - py2c_read_quaddobl_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_start_system", py2c_read_quaddobl_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_start_system_from_file", - py2c_read_quaddobl_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_define_output_file", py2c_define_output_file, METH_VARARGS, - "Prompts the user to define the output file.\n On return is the failure code, which is zero if all went well."}, - {"py2c_write_standard_target_system", - py2c_write_standard_target_system, METH_VARARGS, - "Writes the target system as stored in standard double precision\n to screen or to the defined output file."}, - {"py2c_write_dobldobl_target_system", - py2c_write_dobldobl_target_system, METH_VARARGS, - "Writes the target system as stored in double double precision\n to screen or to the defined output file."}, - {"py2c_write_quaddobl_target_system", - py2c_write_quaddobl_target_system, METH_VARARGS, - "Writes the target system as stored in quad double precision\n to screen or to the defined output file."}, - {"py2c_write_standard_start_system", - py2c_write_standard_start_system, METH_VARARGS, - "Writes the start system as stored in standard double precision\n to screen or to the defined output file."}, - {"py2c_write_dobldobl_start_system", - py2c_write_dobldobl_start_system, METH_VARARGS, - "Writes the start system as stored in double double precision\n to screen or to the defined output file."}, - {"py2c_write_quaddobl_start_system", - py2c_write_quaddobl_start_system, METH_VARARGS, - "Writes the start system as stored in quad double precision\n to screen or to the defined output file."}, - {"py2c_read_standard_start_Laurent_system", - py2c_read_standard_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_standard_start_Laurent_system", - py2c_write_standard_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in standard double precision."}, - {"py2c_read_standard_target_Laurent_system", - py2c_read_standard_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_standard_target_Laurent_system", - py2c_write_standard_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in standard double precision."}, - {"py2c_read_dobldobl_start_Laurent_system", - py2c_read_dobldobl_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_dobldobl_start_Laurent_system", - py2c_write_dobldobl_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in double double precision."}, - {"py2c_read_dobldobl_target_Laurent_system", - py2c_read_dobldobl_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_dobldobl_target_Laurent_system", - py2c_write_dobldobl_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in double double precision."}, - {"py2c_read_quaddobl_start_Laurent_system", - py2c_read_quaddobl_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_quaddobl_start_Laurent_system", - py2c_write_quaddobl_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in quad double precision."}, - {"py2c_read_quaddobl_target_Laurent_system", - py2c_read_quaddobl_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_quaddobl_target_Laurent_system", - py2c_write_quaddobl_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in quad double precision."}, - {"py2c_write_start_solutions", py2c_write_start_solutions, METH_VARARGS, - "Writes the start solutions in standard double precision either to\n the screen (standard output) or to the defined output file.\n On return is the failure code, which is zero if all is well."}, - {"py2c_copy_standard_target_system_to_container", - py2c_copy_standard_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in standard double precision."}, - {"py2c_copy_dobldobl_target_system_to_container", - py2c_copy_dobldobl_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in double double precision."}, - {"py2c_copy_quaddobl_target_system_to_container", - py2c_copy_quaddobl_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in quad double precision."}, - {"py2c_copy_multprec_target_system_to_container", - py2c_copy_multprec_target_system_to_container, METH_VARARGS, - "copies multiprecision target system to container"}, - {"py2c_copy_standard_container_to_target_system", - py2c_copy_standard_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in standard double precision to the target system."}, - {"py2c_copy_dobldobl_container_to_target_system", - py2c_copy_dobldobl_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in double double precision to the target system."}, - {"py2c_copy_quaddobl_container_to_target_system", - py2c_copy_quaddobl_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in quad double precision to the target system."}, - {"py2c_copy_multprec_container_to_target_system", - py2c_copy_multprec_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the target system."}, - {"py2c_copy_start_system_to_container", - py2c_copy_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in standard double precision."}, - {"py2c_copy_dobldobl_start_system_to_container", - py2c_copy_dobldobl_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in double double precision."}, - {"py2c_copy_quaddobl_start_system_to_container", - py2c_copy_quaddobl_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in quad double precision."}, - {"py2c_copy_multprec_start_system_to_container", - py2c_copy_multprec_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_start_system", - py2c_copy_standard_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in standard double precision to the start system."}, - {"py2c_copy_dobldobl_container_to_start_system", - py2c_copy_dobldobl_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in double double precision to the start system."}, - {"py2c_copy_quaddobl_container_to_start_system", - py2c_copy_quaddobl_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in quad double precision to the start system."}, - {"py2c_copy_multprec_container_to_start_system", - py2c_copy_multprec_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the start system."}, - {"py2c_copy_standard_Laurent_container_to_start_system", - py2c_copy_standard_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in standard double precision\n from the container to the start system."}, - {"py2c_copy_dobldobl_Laurent_container_to_start_system", - py2c_copy_dobldobl_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in double double precision\n from the container to the start system."}, - {"py2c_copy_quaddobl_Laurent_container_to_start_system", - py2c_copy_quaddobl_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in quad double precision\n from the container to the start system."}, - {"py2c_copy_standard_Laurent_container_to_target_system", - py2c_copy_standard_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in standard double precision\n from the container to the target system."}, - {"py2c_copy_dobldobl_Laurent_container_to_target_system", - py2c_copy_dobldobl_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in double double precision\n from the container to the target system."}, - {"py2c_copy_quaddobl_Laurent_container_to_target_system", - py2c_copy_quaddobl_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in quad double precision\n from the container to the target system."}, - {"py2c_copy_standard_Laurent_start_system_to_container", - py2c_copy_standard_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in standard double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_dobldobl_Laurent_start_system_to_container", - py2c_copy_dobldobl_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in double double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_quaddobl_Laurent_start_system_to_container", - py2c_copy_quaddobl_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in quad double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_standard_Laurent_target_system_to_container", - py2c_copy_standard_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in standard double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_dobldobl_Laurent_target_system_to_container", - py2c_copy_dobldobl_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in double double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_quaddobl_Laurent_target_system_to_container", - py2c_copy_quaddobl_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in quad double precision\n to the systems container for Laurent systems."}, - {"py2c_create_standard_homotopy", py2c_create_standard_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in standard double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_standard_homotopy_with_gamma", - py2c_create_standard_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in standard double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_dobldobl_homotopy", py2c_create_dobldobl_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in double double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_dobldobl_homotopy_with_gamma", - py2c_create_dobldobl_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in double double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_quaddobl_homotopy", py2c_create_quaddobl_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in quad double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_quaddobl_homotopy_with_gamma", - py2c_create_quaddobl_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in quad double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_multprec_homotopy", py2c_create_multprec_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in arbitrary multiprecision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_multprec_homotopy_with_gamma", - py2c_create_multprec_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in arbitrary multiprecision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_clear_standard_homotopy", py2c_clear_standard_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in standard double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_dobldobl_homotopy", py2c_clear_dobldobl_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in double double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_quaddobl_homotopy", py2c_clear_quaddobl_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in quad double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_multprec_homotopy", py2c_clear_multprec_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in arbitrary multiprecision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_tune_continuation_parameters", py2c_tune_continuation_parameters, - METH_VARARGS, - "Interactive procedure to tune the continuation parameters."}, - {"py2c_show_continuation_parameters", py2c_show_continuation_parameters, - METH_VARARGS, - "Shows the current values of the continuation parameters."}, - {"py2c_autotune_continuation_parameters", - py2c_autotune_continuation_parameters, METH_VARARGS, - "Tunes the values of the continuation parameters.\n On input are two integers:\n 1) the difficulty level of the solution paths; and\n 2) the number of decimal places in the precision."}, - {"py2c_get_value_of_continuation_parameter", - py2c_get_value_of_continuation_parameter, METH_VARARGS, - "Returns the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34.\n On return is a double with the value of the corresponding parameter."}, - {"py2c_set_value_of_continuation_parameter", - py2c_set_value_of_continuation_parameter, METH_VARARGS, - "Sets the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34;\n and the new value for the continuation parameter.\n On return is a double with the value of the corresponding parameter."}, - {"py2c_determine_output_during_continuation", - py2c_determine_output_during_continuation, METH_VARARGS, - "Interactive procedure to determine the level of output during the path tracking."}, - {"py2c_solve_by_standard_homotopy_continuation", - py2c_solve_by_standard_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in standard double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_dobldobl_homotopy_continuation", - py2c_solve_by_dobldobl_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in double double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_quaddobl_homotopy_continuation", - py2c_solve_by_quaddobl_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in quad double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_multprec_homotopy_continuation", - py2c_solve_by_multprec_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in arbitrary multiprecision.\n On input is one integer: the number of decimal places in the precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_standard_Laurent_homotopy_continuation", - py2c_solve_by_standard_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in standard double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_dobldobl_Laurent_homotopy_continuation", - py2c_solve_by_dobldobl_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in double double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_quaddobl_Laurent_homotopy_continuation", - py2c_solve_by_quaddobl_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in quad double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_clear_standard_operations_data", - py2c_clear_standard_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_standard_homotopy_continuation."}, - {"py2c_clear_dobldobl_operations_data", - py2c_clear_dobldobl_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_dobldobl_homotopy_continuation."}, - {"py2c_clear_quaddobl_operations_data", - py2c_clear_quaddobl_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_quaddobl_homotopy_continuation."}, - {"py2c_clear_standard_Laurent_data", - py2c_clear_standard_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in standard double precision."}, - {"py2c_clear_dobldobl_Laurent_data", - py2c_clear_dobldobl_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in double double precision."}, - {"py2c_clear_quaddobl_Laurent_data", - py2c_clear_quaddobl_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in quad double precision."}, - {"py2c_standard_crude_tracker", py2c_standard_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in standard double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in standard\n double precision have been initialized in the containers."}, - {"py2c_dobldobl_crude_tracker", py2c_dobldobl_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in double double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in double\n double precision have been initialized in the containers."}, - {"py2c_quaddobl_crude_tracker", py2c_quaddobl_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in quad double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in quad\n double precision have been initialized in the containers."}, - {"py2c_copy_standard_target_solutions_to_container", - py2c_copy_standard_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in standard double precision to the\n container for solutions in standard double precision."}, - {"py2c_copy_dobldobl_target_solutions_to_container", - py2c_copy_dobldobl_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in double double precision to the\n container for solutions in double double precision."}, - {"py2c_copy_quaddobl_target_solutions_to_container", - py2c_copy_quaddobl_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in quad double precision to the\n container for solutions in quad double precision."}, - {"py2c_copy_multprec_target_solutions_to_container", - py2c_copy_multprec_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_target_solutions", - py2c_copy_standard_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in standard double precision from the\n container to the target solutions in standard double precision."}, - {"py2c_copy_dobldobl_container_to_target_solutions", - py2c_copy_dobldobl_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in double double precision from the\n container to the target solutions in double double precision."}, - {"py2c_copy_quaddobl_container_to_target_solutions", - py2c_copy_quaddobl_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in quad double precision from the\n container to the target solutions in quad double precision."}, - {"py2c_copy_multprec_container_to_target_solutions", - py2c_copy_multprec_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in arbitrary multiprecision from the\n container to the target solutions in arbitrary multiprecision."}, - {"py2c_copy_start_solutions_to_container", - py2c_copy_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in standard double precision to the\n container for solutions in standard double precision."}, - {"py2c_copy_dobldobl_start_solutions_to_container", - py2c_copy_dobldobl_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in double double precision to the\n container for solutions in double double precision."}, - {"py2c_copy_quaddobl_start_solutions_to_container", - py2c_copy_quaddobl_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in quad double precision to the\n container for solutions in quad double precision."}, - {"py2c_copy_multprec_start_solutions_to_container", - py2c_copy_multprec_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_start_solutions", - py2c_copy_standard_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in standard double precision from the\n container to the start solutions in standard double precision."}, - {"py2c_copy_dobldobl_container_to_start_solutions", - py2c_copy_dobldobl_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in double double precision from the\n container to the start solutions in double double precision."}, - {"py2c_copy_quaddobl_container_to_start_solutions", - py2c_copy_quaddobl_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in quad double precision from the\n container to the start solutions in quad double precision."}, - {"py2c_copy_multprec_container_to_start_solutions", - py2c_copy_multprec_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in arbitrary multiprecision from the\n container to the start solutions in arbitrary multiprecision."}, - {"py2c_solve_standard_system", py2c_solve_standard_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard systems container."}, - {"py2c_scan_for_symbols", py2c_scan_for_symbols, METH_VARARGS, - "Given on input are two arguments: a number and a string.\n The string holds the string representation of a polynomial system,\n where each polynomial is terminated by a semi colon.\n The first argument on input is the number of characters in the string.\n On return is the number of symbols used as variables in the system.\n This function helps to determine whether a system is square or not."}, - {"py2c_solve_dobldobl_system", py2c_solve_dobldobl_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the dobldobl systems container."}, - {"py2c_solve_quaddobl_system", py2c_solve_quaddobl_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in quad double precision.\n Three integers are expected on input: 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level. \n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quaddobl systems container."}, - {"py2c_solve_standard_Laurent_system", - py2c_solve_standard_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in standard double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed, as when\n the system is genuinely Laurent with negative exponents; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard Laurent systems\n container."}, - {"py2c_solve_dobldobl_Laurent_system", - py2c_solve_dobldobl_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in double double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) 4) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the double double Laurent systems\n container."}, - {"py2c_solve_quaddobl_Laurent_system", - py2c_solve_quaddobl_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in quad double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quad double Laurent systems\n container."}, - {"py2c_set_gamma_constant", py2c_set_gamma_constant, METH_VARARGS, - "Stores the gamma constant for later retrieval.\n Four parameters are expected on input, two doubles and two integers.\n The two doubles are the real and imaginary parts of the gamma.\n The two integers are the precision, 1, 2, or 4, respectively for\n double, double double, or quad double; and the verbose level."}, - {"py2c_get_gamma_constant", py2c_get_gamma_constant, METH_VARARGS, - "Returns the gamma constant used by the solve functions.\n Two integer parameters are expected on input:\n (1) for the precision, 1, 2, or 4, respectively for double,\n double double, or quad double precision; and\n (2) the verbose level.\n The function returns a tuple of two doubles,\n for the real and imaginary part of the gamma constant."}, - {"py2c_mixed_volume", py2c_mixed_volume, METH_VARARGS, - "Computes the mixed volume, and the stable mixed volume as well if\n the input parameter equals 1. On return is the mixed volume, or\n a tuple with the mixed volume and the stable mixed volume.\n A regular mixed-cell configuration is in the cells container."}, - {"py2c_mixed_volume_by_demics", py2c_mixed_volume_by_demics, METH_VARARGS, - "Calls DEMiCs to compute the mixed volume of the system in the\n standard systems container. If the standard systems container\n is empty, then the system in the standard Laurent systems\n container is taken as input.\n The integer in mv on return equals the mixed volume.\n The regular mixed-cell configuration is in the cells container.\n The above is for the case if the input parameter equals 0.\n If the input parameter equals 1, then on return is a tuple,\n which contains the mixed volume and the stable mixed volume."}, - {"py2c_standard_deflate", py2c_standard_deflate, METH_VARARGS, - "Applies deflation in standard double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three floats:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_deflate", py2c_dobldobl_deflate, METH_VARARGS, - "Applies deflation in double double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three floats:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_deflate", py2c_quaddobl_deflate, METH_VARARGS, - "Applies deflation in quad double precision to the system and\n the solutions stored in the containers.\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_step", py2c_standard_Newton_step, METH_VARARGS, - "Applies one Newton step in standard double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_step", py2c_dobldobl_Newton_step, METH_VARARGS, - "Applies one Newton step in double double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_step", py2c_quaddobl_Newton_step, METH_VARARGS, - "Applies one Newton step in quad double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_multprec_Newton_step", py2c_multprec_Newton_step, METH_VARARGS, - "Applies one Newton step in arbitrary multiprecision to the system in\n the multprec systems container and to the solutions in the container.\n On input is an integer, the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_Laurent_step", py2c_standard_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in standard double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_Laurent_step", py2c_dobldobl_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in double double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_Laurent_step", py2c_quaddobl_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in quad double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_multprec_Newton_Laurent_step", py2c_multprec_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in arbitrary multiprecision to the Laurent\n system in the multprec Laurent systems container and to the solutions\n in the container.\n On input is an integer: the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_varbprec_Newton_Laurent_steps", py2c_varbprec_Newton_Laurent_steps, - METH_VARARGS, - "Applies Newton's method in variable precision.\n There are six input parameters:\n 1) the dimension: the number of variables and equations;\n 2) the accuracy, expressed as the correct number of decimal places;\n 3) the maximum number of iterations in Newton's method;\n 4) an upper bound on the number of decimal places in the precision;\n 5) a string, with the representation of the polynomials in the system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_condition_report", py2c_standard_condition_report, - METH_VARARGS, - "For the system and solutions in the containers in double precision,\n computes a condition report. On input are the following:\n 1) maximum number of Newton iterations per solution;\n 2) tolerance on the residual;\n 3) tolerance on the forward error;\n 4) tolerance on the inverse condition number for singularities;\n 5) a string with the name of the output file,\n this string may be empty if no output to file is needed;\n 6) a verbose flag, either 1 or 0.\n On return are the counts of number of solutions that are\n regular, singular, real, complex, clustered, or failures;\n along with the frequency tables for the forward errors,\n residuals and estimates for the inverse condition numbers."}, - {"py2c_usolve_standard", py2c_usolve_standard, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with standard double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the standard systems container. After the call of this function,\n the standard solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_dobldobl", py2c_usolve_dobldobl, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with double double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the dobldobl systems container. After the call of this function,\n the dobldobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_quaddobl", py2c_usolve_quaddobl, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with quad double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the quaddobl systems container. After the call of this function,\n the quaddobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_multprec", py2c_usolve_multprec, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with arbitrary multiprecision arithmetic.\n On input are three numbers:\n 1) the number of decimal places in the working precision;\n 2) the maximum number of iterations in the method of Weierstrass; and\n 3) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the multprec systems container. After the call of this function,\n the multprec solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_giftwrap_planar", py2c_giftwrap_planar, METH_VARARGS, - "Applies the giftwrapping algorithm to a planar point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n On return is the string representation of the vertex points,\n sorted so that each two consecutive points define an edge."}, - {"py2c_giftwrap_convex_hull", py2c_giftwrap_convex_hull, METH_VARARGS, - "Applies the giftwrapping algorithm to a point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n When the function returns, the internal data structures\n to store the convex hull are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_giftwrap_number_of_facets", py2c_giftwrap_number_of_facets, - METH_VARARGS, - "Returns the number of facets of the given dimension.\n On input is an integer, the dimension of the facet."}, - {"py2c_giftwrap_retrieve_facet", py2c_giftwrap_retrieve_facet, METH_VARARGS, - "Returns the string representation of a facet.\n On input are two integer numbers:\n 1) the dimension of the facet;\n 2) the index of the facet."}, - {"py2c_giftwrap_clear_3d_facets", py2c_giftwrap_clear_3d_facets, - METH_VARARGS, - "Deallocates list of facets of convex hull stored in 3-space."}, - {"py2c_giftwrap_clear_4d_facets", py2c_giftwrap_clear_4d_facets, - METH_VARARGS, - "Deallocates list of facets of convex hull stored in 4-space."}, - {"py2c_giftwrap_support_size", py2c_giftwrap_support_size, METH_VARARGS, - "Returns the number of characters in the string representation of\n the support of the k-th Laurent polynomial in the container, where k is given on input."}, - {"py2c_giftwrap_support_string", py2c_giftwrap_support_string, - METH_VARARGS, - "Returns the string representation of the support of a Laurent polynomial."}, - {"py2c_giftwrap_clear_support_string", py2c_giftwrap_clear_support_string, - METH_VARARGS, - "Deallocates the string representation of the support set\n that was stored internally by the call py2c_giftwrap_support_size."}, - {"py2c_giftwrap_initial_form", py2c_giftwrap_initial_form, METH_VARARGS, - "Replaces the system in the Laurent systems container by its initial form.\n There are three input parameters:\n 1) the dimension, number of coordinates in the inner normal;\n 2) the number of characters in the string representation for the normal;\n 3) the string representation of the inner normal.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_read_standard_system", - py2c_syscon_read_standard_system, METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in standard double precision.\n The system will be placed in the standard systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_standard_Laurent_system", - py2c_syscon_read_standard_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in standard double precision.\n The system will be placed in the standard Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_dobldobl_system", py2c_syscon_read_dobldobl_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in double double precision.\n The system will be placed in the dobldobl systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_dobldobl_Laurent_system", - py2c_syscon_read_dobldobl_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in double double precision.\n The system will be placed in the dobldobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_quaddobl_system", py2c_syscon_read_quaddobl_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in quad double precision.\n The system will be placed in the quaddobl systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_quaddobl_Laurent_system", - py2c_syscon_read_quaddobl_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in quad double precision.\n The system will be placed in the quaddobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_multprec_system", py2c_syscon_read_multprec_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in arbitrary multiprecision. The one input parameter is an integer,\n the number of decimal places in the working precision.\n The system will be placed in the multprec systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_multprec_Laurent_system", - py2c_syscon_read_multprec_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in arbitrary multiprecision. The one input parameter is\n an integer, the number of decimal places in the working precision.\n The system will be placed in the multprec Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_random_system", py2c_syscon_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in standard double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_dobldobl_random_system", - py2c_syscon_dobldobl_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in double double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_quaddobl_random_system", - py2c_syscon_quaddobl_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in quad double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_write_standard_system", - py2c_syscon_write_standard_system, METH_VARARGS, - "Writes the polynomial system with standard double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_standard_Laurent_system", - py2c_syscon_write_standard_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with standard double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_dobldobl_system", - py2c_syscon_write_dobldobl_system, METH_VARARGS, - "Writes the polynomial system with double double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_dobldobl_Laurent_system", - py2c_syscon_write_dobldobl_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with double double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_quaddobl_system", - py2c_syscon_write_quaddobl_system, METH_VARARGS, - "Writes the polynomial system with quad double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_quaddobl_Laurent_system", - py2c_syscon_write_quaddobl_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with quad double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_multprec_system", - py2c_syscon_write_multprec_system, METH_VARARGS, - "Writes the polynomial system with arbitrary multiprecision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_multprec_Laurent_system", - py2c_syscon_write_multprec_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with arbitrary multiprecision\n coefficients that is stored in the container."}, - {"py2c_syscon_clear_standard_system", - py2c_syscon_clear_standard_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in standard double precision."}, - {"py2c_syscon_clear_standard_Laurent_system", - py2c_syscon_clear_standard_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in standard double precision."}, - {"py2c_syscon_clear_dobldobl_system", - py2c_syscon_clear_dobldobl_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in double double precision."}, - {"py2c_syscon_clear_dobldobl_Laurent_system", - py2c_syscon_clear_dobldobl_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in double double precision."}, - {"py2c_syscon_clear_quaddobl_system", - py2c_syscon_clear_quaddobl_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in quad double precision."}, - {"py2c_syscon_clear_quaddobl_Laurent_system", - py2c_syscon_clear_quaddobl_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in quad double precision."}, - {"py2c_syscon_clear_multprec_system", - py2c_syscon_clear_multprec_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_syscon_clear_multprec_Laurent_system", - py2c_syscon_clear_multprec_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_syscon_number_of_symbols", - py2c_syscon_number_of_symbols, METH_VARARGS, - "Returns the number of symbols in the symbol table."}, - {"py2c_syscon_write_symbols", py2c_syscon_write_symbols, METH_VARARGS, - "Writes the symbols in the symbol table to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_syscon_string_of_symbols", - py2c_syscon_string_of_symbols, METH_VARARGS, - "Returns a string that contains the symbols in the symbol table.\n The symbols are separate from each other by one space."}, - {"py2c_syscon_remove_symbol_name", py2c_syscon_remove_symbol_name, - METH_VARARGS, - "Removes a symbol, given by name, from the symbol table.\n On input are two arguments:\n 1) an integer, as the number of characters in the name;\n 2) a string of characters with the name of the symbol.\n The failure code is returned, which equals zero when all went well."}, - {"py2c_syscon_clear_symbol_table", py2c_syscon_clear_symbol_table, - METH_VARARGS, "Clears the symbol table."}, - {"py2c_solcon_read_standard_solutions", - py2c_solcon_read_standard_solutions, METH_VARARGS, - "Interactive function to read the solutions into the container,\n in standard double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_dobldobl_solutions", py2c_solcon_read_dobldobl_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in double double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_quaddobl_solutions", py2c_solcon_read_quaddobl_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in quad double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_multprec_solutions", py2c_solcon_read_multprec_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in arbitrary multiprecision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_standard_solutions_from_file", - py2c_solcon_read_standard_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in standard double precision.\n Solutions are read from file and stored in the container for\n double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_read_dobldobl_solutions_from_file", - py2c_solcon_read_dobldobl_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in double double precision.\n Solutions are read from file and stored in the container for\n double double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_read_quaddobl_solutions_from_file", - py2c_solcon_read_quaddobl_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in quad double precision.\n Solutions are read from file and stored in the container for\n quad double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_write_standard_solutions", - py2c_solcon_write_standard_solutions, METH_VARARGS, - "Writes the solutions in standard double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_dobldobl_solutions", - py2c_solcon_write_dobldobl_solutions, METH_VARARGS, - "Writes the solutions in double double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_quaddobl_solutions", - py2c_solcon_write_quaddobl_solutions, METH_VARARGS, - "Writes the solutions in quad double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_multprec_solutions", - py2c_solcon_write_multprec_solutions, METH_VARARGS, - "Writes the solutions in arbitrary multiprecision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_standard_solutions", - py2c_solcon_clear_standard_solutions, METH_VARARGS, - "Deallocates the container for solutions in standard double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_dobldobl_solutions", - py2c_solcon_clear_dobldobl_solutions, METH_VARARGS, - "Deallocates the container for solutions in double double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_quaddobl_solutions", - py2c_solcon_clear_quaddobl_solutions, METH_VARARGS, - "Deallocates the container for solutions in quad double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_multprec_solutions", - py2c_solcon_clear_multprec_solutions, METH_VARARGS, - "Deallocates the container for solutions in arbitrary multiprecision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_open_solution_input_file", - py2c_solcon_open_solution_input_file, METH_VARARGS, - "Prompts the user for the name of the input file for the solutions and\n opens the input file. All subsequent reading happens from this input.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_syscon_number_of_standard_polynomials", - py2c_syscon_number_of_standard_polynomials, - METH_VARARGS, - "Returns the number of polynomials with coefficients in standard\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_dobldobl_polynomials", - py2c_syscon_number_of_dobldobl_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in double\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_quaddobl_polynomials", - py2c_syscon_number_of_quaddobl_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in quad\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_multprec_polynomials", - py2c_syscon_number_of_multprec_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in arbitrary\n multiprecision as stored in the systems container."}, - {"py2c_syscon_number_of_standard_Laurentials", - py2c_syscon_number_of_standard_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n standard double precision as stored in the systems container."}, - {"py2c_syscon_number_of_dobldobl_Laurentials", - py2c_syscon_number_of_dobldobl_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n double double precision as stored in the systems container."}, - {"py2c_syscon_number_of_quaddobl_Laurentials", - py2c_syscon_number_of_quaddobl_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n quad double precision as stored in the systems container."}, - {"py2c_syscon_number_of_multprec_Laurentials", - py2c_syscon_number_of_multprec_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n arbitrary multiprecision as stored in the systems container."}, - {"py2c_syscon_initialize_number_of_standard_polynomials", - py2c_syscon_initialize_number_of_standard_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_polynomials", - py2c_syscon_initialize_number_of_dobldobl_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_polynomials", - py2c_syscon_initialize_number_of_quaddobl_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_polynomials", - py2c_syscon_initialize_number_of_multprec_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_standard_Laurentials", - py2c_syscon_initialize_number_of_standard_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_Laurentials", - py2c_syscon_initialize_number_of_dobldobl_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_Laurentials", - py2c_syscon_initialize_number_of_quaddobl_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_Laurentials", - py2c_syscon_initialize_number_of_multprec_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_degree_of_standard_polynomial", - py2c_syscon_degree_of_standard_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in standard double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_dobldobl_polynomial", - py2c_syscon_degree_of_dobldobl_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in double double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_quaddobl_polynomial", - py2c_syscon_degree_of_quaddobl_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in quad double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_multprec_polynomial", - py2c_syscon_degree_of_multprec_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in arbitrary multiprecision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_number_of_terms", - py2c_syscon_number_of_terms, METH_VARARGS, - "Returns the number of terms in the k-th polynomial stored in the\n container for systems with coefficients in standard double precision.\n The input parameter k is the index of the polynomial k."}, - {"py2c_syscon_number_of_Laurent_terms", - py2c_syscon_number_of_Laurent_terms, METH_VARARGS, - "Returns the number of terms in the k-th Laurent polynomial stored\n in the container for Laurent polynomials systems with coefficients\n in standard double precision.\n The input parameter k is the index of the polynomial k."}, - {"py2c_syscon_retrieve_term", - py2c_syscon_retrieve_term, METH_VARARGS, - "Retrieves one term of a polynomial with coefficients in standard\n double precision, that is stored in the systems container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_store_standard_polynomial", - py2c_syscon_store_standard_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_index", - py2c_syscon_standard_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_name", - py2c_syscon_standard_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_index", - py2c_syscon_dobldobl_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_name", - py2c_syscon_dobldobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the double double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_index", - py2c_syscon_quaddobl_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_name", - py2c_syscon_quaddobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_one_homogenization", - py2c_syscon_standard_one_homogenization, METH_VARARGS, - "Replaces the system in the standard double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_dobldobl_one_homogenization", - py2c_syscon_dobldobl_one_homogenization, METH_VARARGS, - "Replaces the system in the double double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_quaddobl_one_homogenization", - py2c_syscon_quaddobl_one_homogenization, METH_VARARGS, - "Replaces the system in the quad double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_add_symbol", - py2c_syscon_add_symbol, METH_VARARGS, - "Adds a symbol to the table, with name given in the string,\n where the number of characters in the name equals the first\n integer argument. The second input parameter is the string.\n This symbol represents the last variable added in the homogeneous\n coordinate transformation."}, - {"py2c_syscon_standard_one_affinization", - py2c_syscon_standard_one_affinization, METH_VARARGS, - "Replaces the system in the standard double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_syscon_dobldobl_one_affinization", - py2c_syscon_dobldobl_one_affinization, METH_VARARGS, - "Replaces the system in the double double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_syscon_quaddobl_one_affinization", - py2c_syscon_quaddobl_one_affinization, METH_VARARGS, - "Replaces the system in the quad double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_tabform_store_standard_tableau", - py2c_tabform_store_standard_tableau, METH_VARARGS, - "On input is the tableau form of a polynomial system, given by\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of characters in the 4-th string input,\n 4) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 5) the number of characters in the 6-th string input,\n 6) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 7) the number of characters in the 7-th string input,\n 8) the exponents of all terms, given as a string,\n the string representation of a list of integers.\n The tableau form is parsed and the container for systems with\n standard double precision coefficients is initialized."}, - {"py2c_tabform_load_standard_tableau", - py2c_tabform_load_standard_tableau, METH_VARARGS, - "Returns a 5-tuple with the tableau form of the system with\n standard double precision coefficients in the container.\n The five items in the returned tuple are\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 4) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 5) the exponents of all terms, given as a string,\n the string representation of a list of integers."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_one_homogenization", - py2c_solcon_standard_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in standard double precision."}, - {"py2c_solcon_dobldobl_one_homogenization", - py2c_solcon_dobldobl_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, - {"py2c_solcon_quaddobl_one_homogenization", - py2c_solcon_quaddobl_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, - {"py2c_solcon_standard_one_affinization", - py2c_solcon_standard_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in standard double precision."}, - {"py2c_solcon_dobldobl_one_affinization", - py2c_solcon_dobldobl_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in double double precision."}, - {"py2c_solcon_quaddobl_one_affinization", - py2c_solcon_quaddobl_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in quad double precision."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_is_stable", py2c_celcon_is_stable, - METH_VARARGS, "returns 1 if stable mixed cells were stored, 0 otherwise"}, - {"py2c_celcon_number_of_original_cells", - py2c_celcon_number_of_original_cells, - METH_VARARGS, "returns the number of original cells in the cell container"}, - {"py2c_celcon_number_of_stable_cells", - py2c_celcon_number_of_stable_cells, - METH_VARARGS, "returns the number of stable cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_stable_standard_start_system", - py2c_celcon_solve_stable_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_solve_stable_dobldobl_start_system", - py2c_celcon_solve_stable_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_solve_stable_quaddobl_start_system", - py2c_celcon_solve_stable_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_intcelcon_read_mixed_cell_configuration", - py2c_intcelcon_read_mixed_cell_configuration, METH_VARARGS, - "Reads a mixed-cell configuration"}, - {"py2c_intcelcon_write_mixed_cell_configuration", - py2c_intcelcon_write_mixed_cell_configuration, METH_VARARGS, - "Writes the mixed-cell configuration to screen."}, - {"py2c_intcelcon_number_of_cells", - py2c_intcelcon_number_of_cells, METH_VARARGS, - "Returns the number of cells in the mixed subdivision by integer lifting."}, - {"py2c_intcelcon_type_of_mixture", - py2c_intcelcon_type_of_mixture, METH_VARARGS, - "Returns the type of mixture for the integer cells container."}, - {"py2c_intcelcon_length_of_supports", - py2c_intcelcon_length_of_supports, METH_VARARGS, - "Returns the string representation of a list of lengths of each support."}, - {"py2c_intcelcon_append_lifted_point", - py2c_intcelcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_intcelcon_get_lifted_point", - py2c_intcelcon_get_lifted_point, METH_VARARGS, - "Returns the string representation of the coordinates of a lifted point."}, - {"py2c_intcelcon_get_inner_normal", - py2c_intcelcon_get_inner_normal, METH_VARARGS, - "Given on input the dimension of the lifted points and the\n index of the mixed cell of interest, returns the string\n representation of the inner normal of the mixed cell."}, - {"py2c_intcelcon_number_of_points_in_cell", - py2c_intcelcon_number_of_points_in_cell, METH_VARARGS, - "Given are two integer numbers: the index to a cell\n (starting the count at one) and the number of different supports.\n On return is the string representation of the number of points\n which span each component of the mixed cell."}, - {"py2c_intcelcon_get_point_in_cell", - py2c_intcelcon_get_point_in_cell, METH_VARARGS, - "Returns the string representation of the n coordinates of\n the k-th point from the j-th list of the i-th cell.\n On input are the four integers: n, i, j, k, respectively\n the length of the lifted vectors in the supports,\n the index to a cell in the container,\n the index to a support of the i-th cell, and\n the index to a point in the j-th support of the i-th cell."}, - {"py2c_intcelcon_mixed_volume", - py2c_intcelcon_mixed_volume, METH_VARARGS, - "Returns the mixed volume of a mixed cell."}, - {"py2c_intcelcon_initialize_supports", - py2c_intcelcon_initialize_supports, METH_VARARGS, - "Initializes the supports with an integer valued lifting."}, - {"py2c_intcelcon_set_type_of_mixture", - py2c_intcelcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the tuple of supports."}, - {"py2c_intcelcon_make_subdivision", - py2c_intcelcon_make_subdivision, METH_VARARGS, - "Computes the cells in the regular subdivision induced by an integer\n valued lifting function."}, - {"py2c_intcelcon_clear_mixed_cell_configuration", - py2c_intcelcon_clear_mixed_cell_configuration, METH_VARARGS, - "Deallocates the data in the integer cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_linear_reduce_standard_system", - py2c_linear_reduce_standard_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for standard double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_linear_reduce_dobldobl_system", - py2c_linear_reduce_dobldobl_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for double double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_linear_reduce_quaddobl_system", - py2c_linear_reduce_quaddobl_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for quad double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_nonlinear_reduce_standard_system", - py2c_nonlinear_reduce_standard_system, METH_VARARGS, - "Applies nonlinear reduction on the system in the container\n for standard double precision.\n Three integer numbers are expected on input:\n (1) the maximum number of equal degree replacements,\n (2) the maximum number of computed S-polynomials,\n (3) the maximum number of computed R-polynomials.\n The system in the standard container is replace by the reduced system.\n Three numbers are returned:\n (1) the number of equal degree replacements,\n (2) the number of computed S-polynomials,\n (3) the number of computed R-polynomials."}, - {"py2c_sweep_define_parameters_numerically", - py2c_sweep_define_parameters_numerically, METH_VARARGS, - "Defines the indices to the variables that serve as parameters\n numerically, that is: via integer indices.\n On entry are three integer numbers and a string.\n The string is a string representation of a Python list of integers,\n The three integers are the number of equations, the number of variables,\n and the number of parameters. The number of variables m includes the\n number of parameters. Then there should be as many as m indices in\n the list of integers to define which of the variables are parameters."}, - {"py2c_sweep_define_parameters_symbolically", - py2c_sweep_define_parameters_symbolically, METH_VARARGS, - "Defines the indices to the variables that serve as parameters\n symbolically, that is, as names of variables.\n For this to work, the symbol table must be initialized.\n On entry are four integer numbers and a string.\n The four integers are the number of equations, the number of variables,\n the number of parameters (the number of variables m includes the\n number of parameters), and the number of characters in the string.\n The string contains the names of the parameters, separated by one comma.\n For this to work, the symbol table must be initialized, e.g.:\n via the reading of a polynomial system."}, - {"py2c_sweep_get_number_of_equations", - py2c_sweep_get_number_of_equations, METH_VARARGS, - "Returns the number of equations in the sweep homotopy."}, - {"py2c_sweep_get_number_of_variables", - py2c_sweep_get_number_of_variables, METH_VARARGS, - "Returns the number of variables in the sweep homotopy."}, - {"py2c_sweep_get_number_of_parameters", - py2c_sweep_get_number_of_parameters, METH_VARARGS, - "Returns the number of parameters in the sweep homotopy."}, - {"py2c_sweep_get_indices_numerically", - py2c_sweep_get_indices_numerically, METH_VARARGS, - "Returns the indices of the variables that are parameters,\n as the string representation of a Python list of integers."}, - {"py2c_sweep_get_indices_symbolically", - py2c_sweep_get_indices_symbolically, METH_VARARGS, - "Returns a string with the names of the parameters,\n each separated by one space."}, - {"py2c_sweep_clear_definitions", - py2c_sweep_clear_definitions, METH_VARARGS, - "Clears the definitions in the sweep homotopy."}, - {"py2c_sweep_set_standard_start", - py2c_sweep_set_standard_start, METH_VARARGS, - "Sets the start values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters.\n The doubles are given in a string representation of a Python\n list of doubles."}, - {"py2c_sweep_set_standard_target", - py2c_sweep_set_standard_target, METH_VARARGS, - "Sets the target values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_set_dobldobl_start", - py2c_sweep_set_dobldobl_start, METH_VARARGS, - "Sets the start values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, - {"py2c_sweep_set_dobldobl_target", - py2c_sweep_set_dobldobl_target, METH_VARARGS, - "Sets the target values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_set_quaddobl_start", - py2c_sweep_set_quaddobl_start, METH_VARARGS, - "Sets the start values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, - {"py2c_sweep_set_quaddobl_target", - py2c_sweep_set_quaddobl_target, METH_VARARGS, - "Sets the target values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_get_standard_start", - py2c_sweep_get_standard_start, METH_VARARGS, - "Gets the start values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_standard_target", - py2c_sweep_get_standard_target, METH_VARARGS, - "Gets the target values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_dobldobl_start", - py2c_sweep_get_dobldobl_start, METH_VARARGS, - "Gets the start values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_dobldobl_target", - py2c_sweep_get_dobldobl_target, METH_VARARGS, - "Gets the target values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_quaddobl_start", - py2c_sweep_get_quaddobl_start, METH_VARARGS, - "Gets the start values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_quaddobl_target", - py2c_sweep_get_quaddobl_target, METH_VARARGS, - "Returns the target values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_standard_complex_run", - py2c_sweep_standard_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in standard double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in standard double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_dobldobl_complex_run", - py2c_sweep_dobldobl_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in double double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in double double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_quaddobl_complex_run", - py2c_sweep_quaddobl_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in quad double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in quad double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_standard_real_run", - py2c_sweep_standard_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in standard double\n precision and the corresponding start solutions in the standard solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_sweep_dobldobl_real_run", - py2c_sweep_dobldobl_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in double double\n precision and the corresponding start solutions in the dobldobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_sweep_quaddobl_real_run", - py2c_sweep_quaddobl_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in quad double\n precision and the corresponding start solutions in the quaddobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_standard_multiplicity_structure", - py2c_standard_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in standard double precision.\n Required is the presence of a polynomial system in the standard\n systems container and a solution in the standard solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_dobldobl_multiplicity_structure", - py2c_dobldobl_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in double double precision.\n Required is the presence of a polynomial system in the dobldobl\n systems container and a solution in the dobldobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_quaddobl_multiplicity_structure", - py2c_quaddobl_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in quad double precision.\n Required is the presence of a polynomial system in the quaddobl\n systems container and a solution in the quaddobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_numbtrop_standard_initialize", - py2c_numbtrop_standard_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in standard double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_dobldobl_initialize", - py2c_numbtrop_dobldobl_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in double double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_quaddobl_initialize", - py2c_numbtrop_quaddobl_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in quad double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_standard_retrieve", - py2c_numbtrop_standard_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in standard double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_dobldobl_retrieve", - py2c_numbtrop_dobldobl_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in double double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_quaddobl_retrieve", - py2c_numbtrop_quaddobl_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in quad double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_standard_size", py2c_numbtrop_standard_size, METH_VARARGS, - "Returns the number of tropisms, stored in standard double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_dobldobl_size", py2c_numbtrop_dobldobl_size, METH_VARARGS, - "Returns the number of tropisms, stored in double double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_quaddobl_size", py2c_numbtrop_quaddobl_size, METH_VARARGS, - "Returns the number of tropisms, stored in quad double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_standard_dimension", - py2c_numbtrop_standard_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in standard double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_dobldobl_dimension", - py2c_numbtrop_dobldobl_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in double double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_quaddobl_dimension", - py2c_numbtrop_quaddobl_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in quad double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_store_standard_tropism", - py2c_numbtrop_store_standard_tropism, METH_VARARGS, - "Stores a tropism given in standard double precision.\n The first three input parmeters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by standard_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are given in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_store_dobldobl_tropism", - py2c_numbtrop_store_dobldobl_tropism, METH_VARARGS, - "Stores a tropism given in double double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by dobldobl_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are given in one string,\n the string representatin of a list of doubles."}, - {"py2c_numbtrop_store_quaddobl_tropism", - py2c_numbtrop_store_quaddobl_tropism, METH_VARARGS, - "Stores a tropism given in quad double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by quaddobl_size;\n The other input parameters are of type double:\n wnd : estimated winding number;\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four double\n All 4*dim+4 doubles are given in one string,\n the string representatin of a list of doubles."}, - {"py2c_numbtrop_standard_retrieve_tropism", - py2c_numbtrop_standard_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in standard double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_standard_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_dobldobl_retrieve_tropism", - py2c_numbtrop_dobldobl_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in double double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_dobldobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_quaddobl_retrieve_tropism", - py2c_numbtrop_quaddobl_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in quad double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_quaddobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four doubles.\n All 4*dim+4 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_standard_clear", py2c_numbtrop_standard_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in standard double precision."}, - {"py2c_numbtrop_dobldobl_clear", py2c_numbtrop_dobldobl_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in double double precision."}, - {"py2c_numbtrop_quaddobl_clear", py2c_numbtrop_quaddobl_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in quad double precision."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system in the container with its embedding of dimension d.\n The dimension d is given as the first integer parameter on input.\n The second integer parameter indicates the precision, either 0, 1, or 2,\n respectively for double, double double, or quad double precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_standard_system", py2c_embed_standard_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_dobldobl_system", py2c_embed_dobldobl_system, METH_VARARGS, - "Replaces the system with coefficients in double double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_quaddobl_system", py2c_embed_quaddobl_system, METH_VARARGS, - "Replaces the system with coefficients in quad double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_standard_Laurent_system", - py2c_embed_standard_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in standard double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_dobldobl_Laurent_system", - py2c_embed_dobldobl_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in double double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_quaddobl_Laurent_system", - py2c_embed_quaddobl_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in quad double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_swap_symbols_for_standard_witness_set", - py2c_swap_symbols_for_standard_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_dobldobl_witness_set", - py2c_swap_symbols_for_dobldobl_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_quaddobl_witness_set", - py2c_swap_symbols_for_quaddobl_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_standard_Laurent_witness_set", - py2c_swap_symbols_for_standard_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_dobldobl_Laurent_witness_set", - py2c_swap_symbols_for_dobldobl_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_quaddobl_Laurent_witness_set", - py2c_swap_symbols_for_quaddobl_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Laurent_cascade_homotopy", - py2c_standard_Laurent_cascade_homotopy, METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Laurent_cascade_homotopy", - py2c_dobldobl_Laurent_cascade_homotopy, METH_VARARGS, - " Creates a homotopy in double double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Laurent_cascade_homotopy", - py2c_quaddobl_Laurent_cascade_homotopy, METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_standard_to_mute", - py2c_factor_set_standard_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in standard double\n precision to silent."}, - {"py2c_factor_set_dobldobl_to_mute", - py2c_factor_set_dobldobl_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in double double\n precision to silent."}, - {"py2c_factor_set_quaddobl_to_mute", - py2c_factor_set_quaddobl_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in quad double\n precision to silent."}, - {"py2c_factor_set_standard_to_verbose", - py2c_factor_set_standard_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in standard double\n precision to verbose."}, - {"py2c_factor_set_dobldobl_to_verbose", - py2c_factor_set_dobldobl_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in double double\n precision to verbose."}, - {"py2c_factor_set_quaddobl_to_verbose", - py2c_factor_set_quaddobl_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in quad double\n precision to verbose."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_standard_assign_labels", - py2c_factor_standard_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_dobldobl_assign_labels", - py2c_factor_dobldobl_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in double double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_quaddobl_assign_labels", - py2c_factor_quaddobl_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in quad double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_standard_sampler", - py2c_factor_initialize_standard_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in standard double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_dobldobl_sampler", - py2c_factor_initialize_dobldobl_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in double double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_quaddobl_sampler", - py2c_factor_initialize_quaddobl_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in quad double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_standard_Laurent_sampler", - py2c_factor_initialize_standard_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in standard double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_dobldobl_Laurent_sampler", - py2c_factor_initialize_dobldobl_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in double double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_quaddobl_Laurent_sampler", - py2c_factor_initialize_quaddobl_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in quad double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_standard_monodromy", - py2c_factor_initialize_standard_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in standard double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_initialize_dobldobl_monodromy", - py2c_factor_initialize_dobldobl_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in double double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_initialize_quaddobl_monodromy", - py2c_factor_initialize_quaddobl_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in quad double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_standard_trace_grid_diagnostics", - py2c_factor_standard_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in standard double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_dobldobl_trace_grid_diagnostics", - py2c_factor_dobldobl_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in double double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_quaddobl_trace_grid_diagnostics", - py2c_factor_quaddobl_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in quad double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_store_standard_solutions", - py2c_factor_store_standard_solutions, METH_VARARGS, - "Stores the solutions in the container, in standard double precision,\n to the data for monodromy loops."}, - {"py2c_factor_store_dobldobl_solutions", - py2c_factor_store_dobldobl_solutions, METH_VARARGS, - "Stores the solutions in the container, in double double precision,\n to the data for monodromy loops."}, - {"py2c_factor_store_quaddobl_solutions", - py2c_factor_store_quaddobl_solutions, METH_VARARGS, - "Stores the solutions in the container, in quad double precision,\n to the data for monodromy loops."}, - {"py2c_factor_restore_standard_solutions", - py2c_factor_restore_standard_solutions, METH_VARARGS, - "Restores the first initialized solutions, in standard double precision,\n from sampler to the container."}, - {"py2c_factor_restore_dobldobl_solutions", - py2c_factor_restore_dobldobl_solutions, METH_VARARGS, - "Restores the first initialized solutions, in double double precision,\n from sampler to the container."}, - {"py2c_factor_restore_quaddobl_solutions", - py2c_factor_restore_quaddobl_solutions, METH_VARARGS, - "Restores the first initialized solutions, in quad double precision,\n from sampler to the container."}, - {"py2c_factor_standard_track_paths", - py2c_factor_standard_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in standard double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_dobldobl_track_paths", - py2c_factor_dobldobl_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in double double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_quaddobl_track_paths", - py2c_factor_quaddobl_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in quad double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_standard_slices", - py2c_factor_swap_standard_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in standard double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_dobldobl_slices", - py2c_factor_swap_dobldobl_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in double double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_quaddobl_slices", - py2c_factor_swap_quaddobl_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in quad double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_standard_slices", - py2c_factor_new_standard_slices, METH_VARARGS, - "Generates k random slides in n-space, in standard double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_dobldobl_slices", - py2c_factor_new_dobldobl_slices, METH_VARARGS, - "Generates k random slides in n-space, in double double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_quaddobl_slices", - py2c_factor_new_quaddobl_slices, METH_VARARGS, - "Generates k random slides in n-space, in quad double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_standard_trace_slice", - py2c_factor_set_standard_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in standard double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_set_dobldobl_trace_slice", - py2c_factor_set_dobldobl_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in double double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_set_quaddobl_trace_slice", - py2c_factor_set_quaddobl_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in quad double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_standard_gammas", - py2c_factor_store_standard_gammas, METH_VARARGS, - "Stores the gamma constants in standard double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_dobldobl_gammas", - py2c_factor_store_dobldobl_gammas, METH_VARARGS, - "Stores the gamma constants in double double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_quaddobl_gammas", - py2c_factor_store_quaddobl_gammas, METH_VARARGS, - "Stores the gamma constants in quad double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_standard_loop", - py2c_factor_permutation_after_standard_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in standard double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_permutation_after_dobldobl_loop", - py2c_factor_permutation_after_dobldobl_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in double double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_permutation_after_quaddobl_loop", - py2c_factor_permutation_after_quaddobl_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in quad double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_standard_decomposition", - py2c_factor_update_standard_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in standard double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_update_dobldobl_decomposition", - py2c_factor_update_dobldobl_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in double double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_update_quaddobl_decomposition", - py2c_factor_update_quaddobl_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in quad double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_standard_components", - py2c_factor_number_of_standard_components, METH_VARARGS, - "Returns the number of irreducible factors in the current standard double\n precision decomposition of the witness set."}, - {"py2c_factor_number_of_dobldobl_components", - py2c_factor_number_of_dobldobl_components, METH_VARARGS, - "Returns the number of irreducible factors in the current double double\n precision decomposition of the witness set."}, - {"py2c_factor_number_of_quaddobl_components", - py2c_factor_number_of_quaddobl_components, METH_VARARGS, - "Returns the number of irreducible factors in the current quad double\n precision decomposition of the witness set."}, - {"py2c_factor_witness_points_of_standard_component", - py2c_factor_witness_points_of_standard_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in standard double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_witness_points_of_dobldobl_component", - py2c_factor_witness_points_of_dobldobl_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in double double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_witness_points_of_quaddobl_component", - py2c_factor_witness_points_of_quaddobl_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in quad double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_standard_trace_sum_difference", - py2c_factor_standard_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in standard double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_factor_dobldobl_trace_sum_difference", - py2c_factor_dobldobl_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in double double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_factor_quaddobl_trace_sum_difference", - py2c_factor_quaddobl_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in quad double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witset_standard_membertest", - py2c_witset_standard_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_membertest", - py2c_witset_dobldobl_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_membertest", - py2c_witset_quaddobl_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_Laurent_membertest", - py2c_witset_standard_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_Laurent_membertest", - py2c_witset_dobldobl_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_Laurent_membertest", - py2c_witset_quaddobl_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_ismember", - py2c_witset_standard_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_ismember", - py2c_witset_dobldobl_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_ismember", - py2c_witset_quaddobl_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_Laurent_ismember", - py2c_witset_standard_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_Laurent_ismember", - py2c_witset_dobldobl_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_Laurent_ismember", - py2c_witset_quaddobl_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_standard_witset_of_hypersurface", - py2c_standard_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_witset_of_hypersurface", - py2c_dobldobl_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_witset_of_hypersurface", - py2c_quaddobl_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_witset_of_Laurent_hypersurface", - py2c_standard_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_witset_of_Laurent_hypersurface", - py2c_dobldobl_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_witset_of_Laurent_hypersurface", - py2c_quaddobl_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_diagonal_homotopy", py2c_standard_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in standard double precision, define the witness sets for\n these two solution sets."}, - {"py2c_dobldobl_diagonal_homotopy", py2c_dobldobl_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in double double precision, define the witness sets for\n these two solution sets."}, - {"py2c_quaddobl_diagonal_homotopy", py2c_quaddobl_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in quad double precision, define the witness sets for\n these two solution sets."}, - {"py2c_standard_diagonal_cascade_solutions", - py2c_standard_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in standard double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_dobldobl_diagonal_cascade_solutions", - py2c_dobldobl_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in double double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_quaddobl_diagonal_cascade_solutions", - py2c_quaddobl_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in quad double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_diagonal_symbols_doubler", - py2c_diagonal_symbols_doubler, METH_VARARGS, - "Doubles the number of symbols in the symbol table to enable the\n writing of the target system to string properly when starting the\n cascade of a diagonal homotopy in extrinsic coordinates.\n On input are three integers, n, d, nc, and one string s.\n On input are n, the ambient dimension = #variables before the embedding,\n d is the number of slack variables, or the dimension of the first set,\n and in s (nc characters) are the symbols for the first witness set.\n This function takes the symbols in s and combines those symbols with\n those in the current symbol table for the second witness set stored\n in the standard systems container. On return, the symbol table\n contains then all symbols to write the top system in the cascade\n to start the diagonal homotopy."}, - {"py2c_standard_collapse_diagonal", - py2c_standard_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for standard doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_collapse_diagonal", - py2c_dobldobl_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for double doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_collapse_diagonal", - py2c_quaddobl_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for quad doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_polysys_solve", - py2c_standard_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_standard_laursys_solve", - py2c_standard_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_dobldobl_polysys_solve", - py2c_dobldobl_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_dobldobl_laursys_solve", - py2c_dobldobl_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_quaddobl_polysys_solve", - py2c_quaddobl_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_quaddobl_laursys_solve", - py2c_quaddobl_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_copy_standard_polysys_witset", - py2c_copy_standard_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_standard_laursys_witset", - py2c_copy_standard_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_dobldobl_polysys_witset", - py2c_copy_dobldobl_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_dobldobl_laursys_witset", - py2c_copy_dobldobl_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_quaddobl_polysys_witset", - py2c_copy_quaddobl_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_quaddobl_laursys_witset", - py2c_copy_quaddobl_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_clear_standard_witsols", - py2c_clear_standard_witsols, METH_VARARGS, - "Clears the witness solutions in standard double precision."}, - {"py2c_clear_dobldobl_witsols", - py2c_clear_dobldobl_witsols, METH_VARARGS, - "Clears the witness solutions in double double precision."}, - {"py2c_clear_quaddobl_witsols", - py2c_clear_quaddobl_witsols, METH_VARARGS, - "Clears the witness solutions in quad double precision."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_standard_littlewood_richardson_homotopies", - py2c_schubert_standard_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in standard double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_dobldobl_littlewood_richardson_homotopies", - py2c_schubert_dobldobl_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in double double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in double double precision and the\n corresponding solutions are in the dobldobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_quaddobl_littlewood_richardson_homotopies", - py2c_schubert_quaddobl_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in quad double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in quad double precision and the\n corresponding solutions are in the quaddobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_standard_Newton_series", py2c_standard_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the standard systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_series", py2c_dobldobl_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the dobldobl systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_series", py2c_quaddobl_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the quaddobl systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_power_series", - py2c_standard_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the standard systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the standard systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_power_series", - py2c_dobldobl_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the dobldobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the dobldobl systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_power_series", - py2c_quaddobl_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the quaddobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are store in the quaddobl systems pool.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Pade_approximant", - py2c_standard_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the standard systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Pade_approximant", - py2c_dobldobl_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in double double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the dobldobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Pade_approximant", - py2c_quaddobl_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in quad double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the quaddobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_padcon_set_default_parameters", - py2c_padcon_set_default_parameters, METH_VARARGS, - "Sets the default values of the homotopy continuation parameters."}, - {"py2c_padcon_clear_parameters", - py2c_padcon_clear_parameters, METH_VARARGS, - "Deallocates the allocated space for the parameters."}, - {"py2c_padcon_get_homotopy_continuation_parameter", - py2c_padcon_get_homotopy_continuation_parameter, METH_VARARGS, - "Returns the value of the k-th continuation parameter,\n if k ranges between 1 and 13. The integer k is given on entry."}, - {"py2c_padcon_set_homotopy_continuation_gamma", - py2c_padcon_set_homotopy_continuation_gamma, METH_VARARGS, - "The gamma constant is the first homotopy continuation parameter.\n The gamma is a complex number and it should be given as two\n doubles, as its real and imaginary part respectively."}, - {"py2c_padcon_set_homotopy_continuation_parameter", - py2c_padcon_set_homotopy_continuation_parameter, METH_VARARGS, - "Sets the value of the k-th continuation parameter to the given value.\n The first parameter k is an integer number between 2 and 13.\n The second parameter is the value of the k-th parameter,\n parsed as a floating point number."}, - {"py2c_padcon_standard_track", - py2c_padcon_standard_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in standard double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_dobldobl_track", - py2c_padcon_dobldobl_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in double double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_quaddobl_track", - py2c_padcon_quaddobl_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in quad double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_standard_initialize_homotopy", - py2c_padcon_standard_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in standard double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_initialize_homotopy", - py2c_padcon_dobldobl_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in double double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_initialize_homotopy", - py2c_padcon_quaddobl_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in quad double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_initialize_parameter_homotopy", - py2c_padcon_standard_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n standard double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_initialize_parameter_homotopy", - py2c_padcon_dobldobl_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n double double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_initialize_parameter_homotopy", - py2c_padcon_quaddobl_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n quad double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_standard_solution", - py2c_padcon_initialize_standard_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n standard double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_dobldobl_solution", - py2c_padcon_initialize_dobldobl_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n double double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_quaddobl_solution", - py2c_padcon_initialize_quaddobl_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n quad double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_predict_correct", - py2c_padcon_standard_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in standard double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_predict_correct", - py2c_padcon_dobldobl_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in double double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_predict_correct", - py2c_padcon_quaddobl_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in quad double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_standard_solution", - py2c_padcon_get_standard_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in standard double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_dobldobl_solution", - py2c_padcon_get_dobldobl_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in double double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_quaddobl_solution", - py2c_padcon_get_quaddobl_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in quad double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_pole_radius", - py2c_padcon_standard_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in standard double precision."}, - {"py2c_padcon_dobldobl_pole_radius", - py2c_padcon_dobldobl_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in double double precision.\n The returned number is the high part of the double double number."}, - {"py2c_padcon_quaddobl_pole_radius", - py2c_padcon_quaddobl_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in quad double precision.\n The returned number is the highest part of the quad double number."}, - {"py2c_padcon_standard_closest_pole", - py2c_padcon_standard_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in standard double precision.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_dobldobl_closest_pole", - py2c_padcon_dobldobl_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in double double precision.\n The returned numbers are the high parts of the double doubles.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_quaddobl_closest_pole", - py2c_padcon_quaddobl_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in quad double precision.\n The returned numbers are the highest parts of the quad doubles.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_standard_t_value", - py2c_padcon_standard_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in standard double precision."}, - {"py2c_padcon_dobldobl_t_value", - py2c_padcon_dobldobl_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in double double precision."}, - {"py2c_padcon_quaddobl_t_value", - py2c_padcon_quaddobl_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in quad double precision."}, - {"py2c_padcon_standard_step_size", - py2c_padcon_standard_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in standard double precision."}, - {"py2c_padcon_dobldobl_step_size", - py2c_padcon_dobldobl_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in double double precision."}, - {"py2c_padcon_quaddobl_step_size", - py2c_padcon_quaddobl_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in quad double precision."}, - {"py2c_padcon_standard_series_step", - py2c_padcon_standard_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_series_step", - py2c_padcon_dobldobl_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_series_step", - py2c_padcon_quaddobl_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_pole_step", - py2c_padcon_standard_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_pole_step", - py2c_padcon_dobldobl_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_pole_step", - py2c_padcon_quaddobl_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_estimated_distance", - py2c_padcon_standard_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_estimated_distance", - py2c_padcon_dobldobl_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_estimated_distance", - py2c_padcon_quaddobl_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_hessian_step", - py2c_padcon_standard_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_hessian_step", - py2c_padcon_dobldobl_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_hessian_step", - py2c_padcon_quaddobl_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_series_coefficient", - py2c_padcon_standard_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx,\n of the series computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_series_coefficient", - py2c_padcon_dobldobl_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_series_coefficient", - py2c_padcon_quaddobl_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_numerator_coefficient", - py2c_padcon_standard_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_numerator_coefficient", - py2c_padcon_dobldobl_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_numerator_coefficient", - py2c_padcon_quaddobl_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_denominator_coefficient", - py2c_padcon_standard_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_denominator_coefficient", - py2c_padcon_dobldobl_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_denominator_coefficient", - py2c_padcon_quaddobl_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_pole", py2c_padcon_standard_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_pole", py2c_padcon_dobldobl_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the double doubles."}, - {"py2c_padcon_quaddobl_pole", py2c_padcon_quaddobl_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in quad double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the quad doubles."}, - {"py2c_padcon_clear_standard_data", - py2c_padcon_clear_standard_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in double precision."}, - {"py2c_padcon_clear_dobldobl_data", - py2c_padcon_clear_dobldobl_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in double double precision."}, - {"py2c_padcon_clear_quaddobl_data", - py2c_padcon_clear_quaddobl_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in quad double precision."}, - {"py2c_syspool_standard_init", py2c_syspool_standard_init, METH_VARARGS, - "Initializes the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_init", py2c_syspool_dobldobl_init, METH_VARARGS, - "Initializes the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_init", py2c_syspool_quaddobl_init, METH_VARARGS, - "Initializes the pool for systems in quad double precision."}, - {"py2c_syspool_standard_size", py2c_syspool_standard_size, METH_VARARGS, - "Returns the size of the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_size", py2c_syspool_dobldobl_size, METH_VARARGS, - "Returns the size of the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_size", py2c_syspool_quaddobl_size, METH_VARARGS, - "Returns the size of the pool for systems in quad double precision."}, - {"py2c_syspool_standard_create", - py2c_syspool_standard_create, METH_VARARGS, - "Defines the k-th system in the standard system pool,\n using the system in the standard container."}, - {"py2c_syspool_dobldobl_create", - py2c_syspool_dobldobl_create, METH_VARARGS, - "Defines the k-th system in the dobldobl system pool,\n using the system in the dobldobl container."}, - {"py2c_syspool_quaddobl_create", - py2c_syspool_quaddobl_create, METH_VARARGS, - "Defines the k-th system in the quaddobl system pool,\n using the system in the quaddobl container."}, - {"py2c_syspool_copy_to_standard_container", - py2c_syspool_copy_to_standard_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in standard double\n precision to the standard systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_copy_to_dobldobl_container", - py2c_syspool_copy_to_dobldobl_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in double double\n precision to the dobldobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_copy_to_quaddobl_container", - py2c_syspool_copy_to_quaddobl_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in quad double\n precision to the quaddobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_standard_clear", py2c_syspool_standard_clear, METH_VARARGS, - "Clears the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_clear", py2c_syspool_dobldobl_clear, METH_VARARGS, - "Clears the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_clear", py2c_syspool_quaddobl_clear, METH_VARARGS, - "Clears the pool for systems in quad double precision."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_get_default_path_parameters", - py2c_get_default_path_parameters, METH_VARARGS, - "Given the working precision (16, 32, or 64), returns the default values\n of the path parameters, for the path trackers with algorithmic differentiation."}, - {"py2c_ade_manypaths_d_pars", - py2c_ade_manypaths_d_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_dd_pars", - py2c_ade_manypaths_dd_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_qd_pars", - py2c_ade_manypaths_qd_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -PyMODINIT_FUNC initphcpy2c2(void) -{ - Py_InitModule("phcpy2c2", phcpy2c_methods); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2c3.c phcpack-2.4.85/src/Lib/phcpy2c3.c --- phcpack-2.4.84/src/Lib/phcpy2c3.c 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2c3.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,11880 +0,0 @@ -/* This file contains the definitions of the prototypes in phcpy2c.h, - for use in version 3.5 (and higher) of Python. */ - -#include -#include -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "tabform.h" -#include "syspool.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "intcelcon.h" -#include "scalers.h" -#include "reducers.h" -#include "sweep.h" -#include "multiplicity.h" -#include "numbtrop.h" -#include "witset.h" -#include "witsols.h" -#include "mapcon.h" -#include "series.h" -#include "padcon.h" -#include "jump_track.h" -#include "next_track.h" -// #include "lib2path.h" -#include "structmember.h" - -#ifdef compilewgpp -extern "C" void adainit( void ); -extern "C" void adafinal( void ); -#else -extern void adainit( void ); -extern void adafinal( void ); -#endif - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -static PyObject *py2c_corecount - ( PyObject *self, PyObject *args ) -{ - if(!PyArg_ParseTuple(args,"")) return NULL; - - int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN); - - return Py_BuildValue("i", number_of_cores); -} - -/* The wrapping of functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed - ( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed - ( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_dobldobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_start_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_quaddobl_target_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of copying systems from and to containers starts here. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_standard_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_Laurent_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail,pwt; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im,pwt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_value_of_continuation_parameter - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - double val; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = get_value_of_continuation_parameter(idx,&val); - - return Py_BuildValue("d",val); -} - -static PyObject *py2c_set_value_of_continuation_parameter - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - double val; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&idx,&val)) return NULL; - fail = set_value_of_continuation_parameter(idx,&val); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_Laurent_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_operations_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_standard_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_Laurent_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_Laurent_data(); - - return Py_BuildValue("i",fail); -} - -/* Wrapping of crude path trackers of the jumpstart library starts here. */ - -static PyObject *py2c_standard_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = standard_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = dobldobl_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_crude_tracker - ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = quaddobl_crude_tracker(verbose); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of copying solutions from and to containers starts here. */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,vrb,nbtasks,mvfocus = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) - return NULL; - fail = solve_standard_system(&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_scan_for_symbols - ( PyObject *self, PyObject *args ) -{ - int fail,nbc,dim; - char *polsys; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc,&polsys)) return NULL; - - fail = scan_number_of_variables(nbc,polsys,&dim); - - return Py_BuildValue("i",dim); -} - -static PyObject *py2c_solve_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_dobldobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,rc,nrc,silent,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_quaddobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,nbtasks,mvfocus,vrb = 0; - char rocos[1024]; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) - return NULL; - fail = solve_standard_Laurent_system - (&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_dobldobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_solve_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nrc,nbtasks,vrb = 0; - char rocos[1024]; - - initialize(); - if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; - fail = solve_quaddobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); - if(silent == 1) - return Py_BuildValue("i",rc); - else - return Py_BuildValue("(i,s)",rc,rocos); -} - -static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ) -{ - int fail,prc,vrb; - double regm,imgm; - - initialize(); - if (!PyArg_ParseTuple(args,"ddii",®m,&imgm,&prc,&vrb)) return NULL; - fail = set_gamma_constant(regm,imgm,prc,vrb); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ) -{ - int fail,prc,vrb; - double regm,imgm; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&prc,&vrb)) return NULL; - fail = get_gamma_constant(®m,&imgm,prc,vrb); - - return Py_BuildValue("(d,d)",regm,imgm); -} - -static PyObject *py2c_mixed_volume - ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_mixed_volume_by_demics - ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume_by_demics(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume_by_demics(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = standard_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = dobldobl_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate - ( PyObject *self, PyObject *args ) -{ - int mxit,mxdf; - double terr,tres,trnk; - - initialize(); - if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) - return NULL; - { - int fail = quaddobl_deflate(mxit,mxdf,terr,tres,trnk); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_condition_report - ( PyObject *self, PyObject *args ) -{ - int fail,maxit,verbose; - double tolres,tolerr,tolsing; - char *name; - int cntfail,cntreal,cntcmplx,cntregu,cntsing,cntclus,nbc; - int t_err[16]; - int t_rco[16]; - int t_res[16]; - char st_err[256]; - char st_rco[256]; - char st_res[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"idddsi", - &maxit,&tolres,&tolerr,&tolsing,&name,&verbose)) - return NULL; - - nbc = strlen(name); - - if(verbose == 1) - { - if(nbc == 0) - printf("Writing the output to screen.\n"); - else - printf("Writing the output to file %s.\n", name); - } - fail = standard_condition_report - (maxit,tolres,tolerr,tolsing,nbc,name, - &cntfail,&cntreal,&cntcmplx,&cntregu,&cntsing,&cntclus, - t_err,t_rco,t_res,verbose); - - intlist2str(16, t_err, st_err); - intlist2str(16, t_rco, st_rco); - intlist2str(16, t_res, st_res); - - return Py_BuildValue("(i, i, i, i, i, i, i, s, s, s)", fail, - cntregu, cntsing, cntreal, cntcmplx, cntclus, cntfail, - st_err, st_res, st_rco); -} - -/* The wrapping of the functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl - ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec - ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* The wrapping of the functions in giftwrappers.h starts from here. */ - -static PyObject *py2c_giftwrap_planar - ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull - ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int idx,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - nbr = support_size(idx); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions in syscon.h starts from here. */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_dobldobl_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_random_system - ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c,neq; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; - fail = syscon_quaddobl_random_system(n,m,d,c,neq); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_standard_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_standard_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_standard_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_standard_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_standard_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_standard_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_standard_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_standard_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_standard_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term - ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_standard_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free(exp); - free(c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_standard_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_standard_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_multprec_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_standard_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k,szl; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_multprec_Laurent_size_limit(k,&szl); - { - char p[szl]; - - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); - } -} - -static PyObject *py2c_syscon_total_degree - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_Laurent_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_Laurent_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_standard_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_dobldobl_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_one_homogenization - ( PyObject *self, PyObject *args ) -{ - int fail,lintype; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; - - fail = syscon_quaddobl_one_homogenization(lintype); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_add_symbol - ( PyObject *self, PyObject *args ) -{ - int fail,nbc; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc,&name)) return NULL; - - fail = syscon_add_symbol(nbc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_standard_one_affinization(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_dobldobl_one_affinization(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_one_affinization - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - - fail = syscon_quaddobl_one_affinization(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions in tabform.h starts from here */ - -static PyObject *py2c_tabform_store_standard_tableau - ( PyObject *self, PyObject *args ) -{ - int fail,neq,nvr,nc1,nc2,nc3,verbose; - char *nbt,*cff,*xpc; - - initialize(); - if(!PyArg_ParseTuple(args,"iiisisisi",&neq,&nvr,&nc1,&nbt,&nc2,&cff, - &nc3,&xpc,&verbose)) return NULL; - { - if(verbose > 0) - { - printf("the string of terms : %s\n", nbt); - printf("the string of coefficients : %s\n", cff); - printf("the string of exponents : %s\n", xpc); - } - int ic1 = itemcount(nbt); - int ic2 = itemcount(xpc); - int ic3 = itemcount(cff); - - if(verbose > 0) - { - printf("number of items in nbt : %d\n", ic1); - printf("number of items in xpc : %d\n", ic2); - printf("number of items in cff : %d\n", ic3); - } - int nbterms[ic1]; - int exponents[ic2]; - double coefficients[ic3]; - - str2intlist(ic1,nbt,nbterms); - str2intlist(ic2,xpc,exponents); - str2dbllist(ic3,cff,coefficients); - - if(verbose > 0) - { - int idx; - - printf("the number of terms : "); - for(idx=0; idx 0) - { - printf("the number of equations : %d\n", neq); - printf("the number of variables : %d\n", nvr); - printf("total number of terms : %d\n", nbt); - } - { - int nbterms[neq]; - const int nbexp = nvr*nbt; - const int nbcff = 2*nbt; - int exponents[nbexp]; - double coefficients[nbcff]; - char strnbt[neq*8]; - char strxps[nbexp*8]; - char strcff[nbcff*26]; - - fail = number_of_standard_terms(neq,nbterms,&nbt,verbose); - fail = standard_tableau_form - (neq,nvr,nbterms,coefficients,exponents,verbose); - - intlist2str(neq, nbterms, strnbt); - intlist2str(nbexp, exponents, strxps); - dbllist2str(nbcff, coefficients, strcff); - if(verbose > 0) - { - int idx; - printf("the number of terms : "); - for(idx=0; idx 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* The wrapping of the functions with prototypes in reducers.h starts here. */ - -static PyObject *py2c_linear_reduce_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = standard_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_linear_reduce_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = dobldobl_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_linear_reduce_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,diag; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; - - fail = quaddobl_row_reduce_system(diag); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_nonlinear_reduce_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,eqmax,spmax,rpmax,eqcnt,spcnt,rpcnt; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&eqmax,&spmax,&rpmax)) return NULL; - - fail = standard_nonlinear_reduce_system - (eqmax,spmax,rpmax,&eqcnt,&spcnt,&rpcnt); - - return Py_BuildValue("(i,i,i)",eqcnt,spcnt,rpcnt); -} - -/* The wrapping of the functions with prototypes in sweep.h starts here. */ - -static PyObject *py2c_sweep_define_parameters_numerically - ( PyObject *self, PyObject *args ) -{ - int fail,nq,nv,np,cnt; - char *strpars; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nq,&nv,&np,&strpars)) return NULL; - - cnt = itemcount(strpars); - { - int pars[cnt]; - - str2intlist(cnt,strpars,pars); - fail = sweep_define_parameters_numerically(nq,nv,np,pars); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_define_parameters_symbolically - ( PyObject *self, PyObject *args ) -{ - int fail,nq,nv,np,nc; - char *pars; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nq,&nv,&np,&nc,&pars)) return NULL; - - fail = sweep_define_parameters_symbolically(nq,nv,np,nc,pars); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_get_number_of_equations - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_equations(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_number_of_variables - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_variables(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_number_of_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_sweep_get_indices_numerically - ( PyObject *self, PyObject *args ) -{ - int fail,np,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&np); - { - int idx[np]; - char stridx[np*10]; - - fail = sweep_get_indices_numerically(idx); - - nc = intlist2str(np,idx,stridx); - - return Py_BuildValue("s",stridx); - } -} - -static PyObject *py2c_sweep_get_indices_symbolically - ( PyObject *self, PyObject *args ) -{ - int fail,np,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = sweep_get_number_of_parameters(&np); - { - char buf[np*20]; /* assumes no more than 20 characters per symbol */ - - fail = sweep_get_indices_symbolically(&nc,buf); - - buf[nc] = '\0'; - - return Py_BuildValue("s",buf); - } -} - -static PyObject *py2c_sweep_clear_definitions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_clear_definitions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_standard_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 2*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_standard_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_standard_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 2*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_standard_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_dobldobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 4*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_dobldobl_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_dobldobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 4*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_dobldobl_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_quaddobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 8*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_quaddobl_start(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_set_quaddobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,m; - char *strvals; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; - { - const int n = 8*m; - double vals[n]; - - str2dbllist(n,strvals,vals); - - fail = sweep_set_quaddobl_target(n,vals); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_get_standard_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_standard_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_standard_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_standard_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_dobldobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_dobldobl_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_dobldobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_dobldobl_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_quaddobl_start - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_quaddobl_start(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_get_quaddobl_target - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - { - double cff[n]; - char strcff[n*25]; - - fail = sweep_get_quaddobl_target(n,cff); - - nc = dbllist2str(n,cff,strcff); - - return Py_BuildValue("s",strcff); - } -} - -static PyObject *py2c_sweep_standard_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - - fail = sweep_standard_complex_run(choice,&g_re,&g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_dobldobl_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - { - if(choice < 2) - fail = sweep_dobldobl_complex_run(choice,&g_re,&g_im); - else - { - double regamma[2]; - double imgamma[2]; - regamma[0] = g_re; regamma[1] = 0.0; - imgamma[0] = g_im; imgamma[1] = 0.0; - fail = sweep_dobldobl_complex_run(choice,regamma,imgamma); - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_quaddobl_complex_run - ( PyObject *self, PyObject *args ) -{ - int fail,choice; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; - { - if(choice < 2) - fail = sweep_quaddobl_complex_run(choice,&g_re,&g_im); - else - { - double regamma[4]; - double imgamma[4]; - regamma[0] = g_re; regamma[1] = 0.0; - regamma[2] = 0.0; regamma[3] = 0.0; - imgamma[0] = g_im; imgamma[1] = 0.0; - imgamma[2] = 0.0; imgamma[3] = 0.0; - fail = sweep_quaddobl_complex_run(choice,regamma,imgamma); - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_standard_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_standard_real_run(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_dobldobl_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_dobldobl_real_run(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_sweep_quaddobl_real_run - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = sweep_quaddobl_real_run(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping for the multiplicity structure starts here. */ - -static PyObject *py2c_standard_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose,mult; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = standard_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -static PyObject *py2c_dobldobl_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose,mult; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = dobldobl_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -static PyObject *py2c_quaddobl_multiplicity_structure - ( PyObject *self, PyObject *args ) -{ - int fail,order,verbose,mult; - double tol; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; - { - int nbc,mult; - int hilb[order+1]; - char strhilb[4*(order+1)]; - - fail = quaddobl_multiplicity_structure(order,verbose,tol,&mult,hilb); - nbc = intlist2str(order+1,hilb,strhilb); - - return Py_BuildValue("(i,s)",mult,strhilb); - } -} - -/* The wrapping of the numerical tropisms container starts here. */ - -static PyObject *py2c_numbtrop_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail,nbt,dim,k; - char *data; /* all numbers come in one long string */ - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&nbt,&dim,&data)) return NULL; - { - const int lendata = nbt*(dim+2); - double numbers[lendata]; - int wnd[nbt]; - double dir[nbt*dim]; - double err[nbt]; - - str2dbllist(lendata,data,numbers); - - for(k=0; k %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_update_dobldobl_decomposition - ( PyObject *self, PyObject *args ) -{ - int fail,i,d,nc; - char *permutation; - int done = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; - { - int nb,perm[d],nf[2]; - - /* printf("updating with "); - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_update_quaddobl_decomposition - ( PyObject *self, PyObject *args ) -{ - int fail,i,d,nc; - char *permutation; - int done = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; - { - int nb,perm[d],nf[2]; - - /* printf("updating with "); - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_standard_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_standard_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_number_of_dobldobl_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_dobldobl_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_number_of_quaddobl_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_quaddobl_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_standard_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_standard_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,vrf,mrp,sqr,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiisiiiiis", - &n,&k,&nbc,&nc,&cond,&vrb,&vrf,&mrp,&sqr,&szn,&name)) - return NULL; -/* - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = standard_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 4*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = dobldobl_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 8*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = quaddobl_Littlewood_Richardson_homotopies - (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_standard_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_track - ( PyObject *self, PyObject *args ) -{ - int nbc,fail,localfile,verbose,mhom,nvr,*idz; - char *name; - char *stridz; - - initialize(); - if(!PyArg_ParseTuple(args,"isiiiis", - &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; - - if(mhom == 1) - padcon_dobldobl_projective_transformation(); - else if(mhom > 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_dobldobl_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_track - ( PyObject *self, PyObject *args ) -{ - int nbc,fail,localfile,verbose,mhom,nvr,*idz; - char *name; - char *stridz; - - initialize(); - if(!PyArg_ParseTuple(args,"isiiiis", - &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; - - if(mhom == 1) - padcon_quaddobl_projective_transformation(); - else if(mhom > 1) - { - int ic = itemcount(stridz); - idz = (int*)calloc(ic,sizeof(int)); - str2intlist(ic,stridz,idz); - if(verbose > 0) - { - printf("mhom : %d", mhom); - printf(" partition :"); - for(int k=0; k 1) - fail = solcon_quaddobl_multi_affinization(nvr,mhom,idz); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_standard_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_dobldobl_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_initialize_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,verbose,homogeneous; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; - fail = padcon_quaddobl_initialize_homotopy(verbose,homogeneous); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_standard_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_dobldobl_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_quaddobl_initialize_parameter_homotopy(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_standard_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_dobldobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_initialize_quaddobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_standard_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_dobldobl_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_dobldobl_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_quaddobl_predict_correct - ( PyObject *self, PyObject *args ) -{ - int fail,precorfail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = padcon_quaddobl_predict_correct(&precorfail,verbose); - return Py_BuildValue("i",precorfail); -} - -static PyObject *py2c_padcon_get_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_standard_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_get_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_dobldobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_get_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,index,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; - fail = padcon_get_quaddobl_solution(index,verbose); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_standard_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_dobldobl_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_quaddobl_pole_radius - ( PyObject *self, PyObject *args ) -{ - int fail; - double frp; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_pole_radius(&frp); - - return Py_BuildValue("d",frp); -} - -static PyObject *py2c_padcon_standard_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_dobldobl_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_quaddobl_closest_pole - ( PyObject *self, PyObject *args ) -{ - int fail; - double repole,impole; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_closest_pole(&repole,&impole); - - return Py_BuildValue("(d,d)",repole,impole); -} - -static PyObject *py2c_padcon_standard_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_dobldobl_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_quaddobl_t_value - ( PyObject *self, PyObject *args ) -{ - int fail; - double tval; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_t_value(&tval); - - return Py_BuildValue("d",tval); -} - -static PyObject *py2c_padcon_standard_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_step_size - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_step_size(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_series_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_series_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_pole_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_pole_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_estimated_distance - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_estimated_distance(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_standard_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_dobldobl_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_dobldobl_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_quaddobl_hessian_step - ( PyObject *self, PyObject *args ) -{ - int fail; - double step; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_get_quaddobl_hessian_step(&step); - - return Py_BuildValue("d",step); -} - -static PyObject *py2c_padcon_standard_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_series_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_series_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_numerator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_denominator_coefficient - ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_standard_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_dobldobl_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ) -{ - int fail,lead,idx,vrb; - double cre,cim; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; - fail = padcon_get_quaddobl_pole(lead,idx,vrb,&cre,&cim); - - return Py_BuildValue("(d,d)",cre,cim); -} - -static PyObject *py2c_padcon_clear_standard_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_standard_data(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_clear_dobldobl_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_dobldobl_data(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_padcon_clear_quaddobl_data - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = padcon_clear_quaddobl_data(); - return Py_BuildValue("i",fail); -} - -/* The wrapping of functions with prototypes in syspool.h starts below. */ - -static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_standard_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_dobldobl_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = syspool_quaddobl_initialize(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_standard_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_dobldobl_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_quaddobl_size(&nbr); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_syspool_standard_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_standard_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_dobldobl_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_create - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_quaddobl_create(idx); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_standard_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_standard_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_dobldobl_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_dobldobl_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_copy_to_quaddobl_container - ( PyObject *self, PyObject *args ) -{ - int fail,idx; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; - fail = syspool_copy_to_quaddobl_container(idx); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_standard_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_standard_clear(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_dobldobl_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_dobldobl_clear(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syspool_quaddobl_clear ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syspool_quaddobl_clear(); - - return Py_BuildValue("i",fail); -} - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_standard_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_dobldobl_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed; - double regamma,imgamma; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; - fail = initialize_quaddobl_homotopy(fixed,regamma,imgamma); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,deci,fixed; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&fixed,&deci)) return NULL; - fail = initialize_multprec_homotopy(fixed,deci); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_varbprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail,fixed,nctgt,ncstr; - char *tgt; - char *str; - - initialize(); - if(!PyArg_ParseTuple(args,"iisis",&fixed,&nctgt,&tgt,&ncstr,&str)) - return NULL; - fail = initialize_varbprec_homotopy(fixed,nctgt,tgt,ncstr,str); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_standard_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_dobldobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_quaddobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = initialize_multprec_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,nv,nc; - char *sol; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&nv,&nc,&sol)) return NULL; - fail = initialize_varbprec_solution(nv,nc,sol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_standard_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_dobldobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_quaddobl_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,indsol; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; - fail = next_multprec_solution(indsol); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ) -{ - int fail,want,mxpr,mxit,verb,nc; - char *sol; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&want,&mxpr,&mxit,&verb)) return NULL; - sol = next_varbprec_solution(want,mxpr,mxit,verb,&nc,&fail); - - return Py_BuildValue("(i,s)",fail,sol); -} - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_standard_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_tracker(); - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_varbprec_tracker(); - return Py_BuildValue("i",fail); -} - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in lib2path.h, starts here. */ - -// For the separate compilation of lib2path, extern declarations are needed. - -extern int standard_ade_newton ( int verbose ); -extern int standard_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int standard_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -extern int dobldobl_ade_newton ( int verbose ); -extern int dobldobl_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int dobldobl_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -extern int quaddobl_ade_newton ( int verbose ); -extern int quaddobl_ade_onepath - ( int verbose, double regamma, double imgamma ); -extern int quaddobl_ade_manypaths - ( int verbose, double regamma, double imgamma ); - -static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = standard_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = dobldobl_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; - fail = quaddobl_ade_newton(verbose); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = standard_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = dobldobl_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = quaddobl_ade_onepath(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = standard_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = dobldobl_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ) -{ - int fail,verbose; - double reg,img; - - initialize(); - if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; - fail = quaddobl_ade_manypaths(verbose,reg,img); - - return Py_BuildValue("i",fail); -} - -/* For the parameter tuning we need the default path parameters, - * provided by the lib2path function below, - * see lib2path.h for its specification. */ - -extern int get_default_path_parameters - ( int precision, int* max_step, int* n_predictor, - double* step_increase, double* step_decrease, - double* max_delta_t, double* max_delta_t_end, double* min_delta_t, - double* err_max_res, double* err_max_delta_x, double* err_max_first_delta_x, - int* max_it, double* err_min_round_off, - int* max_it_refine, double* err_min_round_off_refine ); - -static PyObject *py2c_get_default_path_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,precision,max_step,n_predictor,max_it,max_it_refine; - double step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&precision)) return NULL; - fail = get_default_path_parameters(precision,&max_step,&n_predictor, - &step_increase,&step_decrease,&max_delta_t,&max_delta_t_end,&min_delta_t, - &err_max_res,&err_max_delta_x,&err_max_first_delta_x, - &max_it,&err_min_round_off,&max_it_refine,&err_min_round_off_refine); - - return Py_BuildValue("(i,i,d,d,d,d,d,d,d,d,i,d,i,d)", - max_step,n_predictor,step_increase, - step_decrease,max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); -} - -// for separate compilation, extern declarations are needed, as below - -extern int standard_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -extern int dobldobl_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -extern int quaddobl_ademanypaths_with_parameters - ( int verbose, double regamma, double imgamma, - int max_step, int n_predictor, - double step_increase, double step_decrease, - double max_delta_t, double max_delta_t_end, double min_delta_t, - double err_max_res, double err_max_delta_x, double err_max_first_delta_x, - int max_it, double err_min_round_off, - int max_it_refine, double err_min_round_off_refine ); - -static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = standard_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = dobldobl_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ) -{ - int fail,verbose,max_step,n_predictor,max_it,max_it_refine; - double reg,img,step_increase,step_decrease; - double max_delta_t,max_delta_t_end,min_delta_t; - double err_max_res,err_max_delta_x,err_max_first_delta_x; - double err_min_round_off,err_min_round_off_refine; - - initialize(); - if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, - &max_step,&n_predictor,&step_increase,&step_decrease, - &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, - &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, - &max_it_refine,&err_min_round_off_refine)) return NULL; - - fail = quaddobl_ademanypaths_with_parameters(verbose,reg,img, - max_step,n_predictor,step_increase,step_decrease, - max_delta_t,max_delta_t_end,min_delta_t,err_max_res, - err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, - max_it_refine,err_min_round_off_refine); - - return Py_BuildValue("i",fail); -} - -static PyMethodDef phcpy2c3_methods[] = -{ - {"py2c_corecount", py2c_corecount, METH_VARARGS, - "Returns the number of cores available for multithreading."}, - {"py2c_PHCpack_version_string", py2c_PHCpack_version_string, METH_VARARGS, - "Returns the version string of PHCpack.\n The version string is 40 characters long."}, - {"py2c_set_seed", py2c_set_seed, METH_VARARGS, - "Takes the value of the integer given on input\n and sets the seed for the random number generators.\n This fixing of the seed enables reproducible runs." }, - {"py2c_get_seed", py2c_get_seed, METH_VARARGS, - "Returns the current value of the seed.\n Using this value in py2c_set_seed will ensure that the\n results of previous runs can be reproduced."}, - {"py2c_read_standard_target_system", py2c_read_standard_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_target_system_from_file", - py2c_read_standard_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_start_system", py2c_read_standard_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_standard_start_system_from_file", - py2c_read_standard_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_target_system", py2c_read_dobldobl_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_target_system_from_file", - py2c_read_dobldobl_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_start_system", py2c_read_dobldobl_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_dobldobl_start_system_from_file", - py2c_read_dobldobl_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_target_system", py2c_read_quaddobl_target_system, - METH_VARARGS, - "Prompts the user to enter a target system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_target_system_from_file", - py2c_read_quaddobl_target_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_start_system", py2c_read_quaddobl_start_system, - METH_VARARGS, - "Prompts the user to enter a start system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_read_quaddobl_start_system_from_file", - py2c_read_quaddobl_start_system_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, - {"py2c_define_output_file", py2c_define_output_file, METH_VARARGS, - "Prompts the user to define the output file.\n On return is the failure code, which is zero if all went well."}, - {"py2c_write_standard_target_system", - py2c_write_standard_target_system, METH_VARARGS, - "Writes the target system as stored in standard double precision\n to screen or to the defined output file."}, - {"py2c_write_dobldobl_target_system", - py2c_write_dobldobl_target_system, METH_VARARGS, - "Writes the target system as stored in double double precision\n to screen or to the defined output file."}, - {"py2c_write_quaddobl_target_system", - py2c_write_quaddobl_target_system, METH_VARARGS, - "Writes the target system as stored in quad double precision\n to screen or to the defined output file."}, - {"py2c_write_standard_start_system", - py2c_write_standard_start_system, METH_VARARGS, - "Writes the start system as stored in standard double precision\n to screen or to the defined output file."}, - {"py2c_write_dobldobl_start_system", - py2c_write_dobldobl_start_system, METH_VARARGS, - "Writes the start system as stored in double double precision\n to screen or to the defined output file."}, - {"py2c_write_quaddobl_start_system", - py2c_write_quaddobl_start_system, METH_VARARGS, - "Writes the start system as stored in quad double precision\n to screen or to the defined output file."}, - {"py2c_read_standard_start_Laurent_system", - py2c_read_standard_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_standard_start_Laurent_system", - py2c_write_standard_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in standard double precision."}, - {"py2c_read_standard_target_Laurent_system", - py2c_read_standard_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_standard_target_Laurent_system", - py2c_write_standard_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in standard double precision."}, - {"py2c_read_dobldobl_start_Laurent_system", - py2c_read_dobldobl_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_dobldobl_start_Laurent_system", - py2c_write_dobldobl_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in double double precision."}, - {"py2c_read_dobldobl_target_Laurent_system", - py2c_read_dobldobl_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_dobldobl_target_Laurent_system", - py2c_write_dobldobl_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in double double precision."}, - {"py2c_read_quaddobl_start_Laurent_system", - py2c_read_quaddobl_start_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the start system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_quaddobl_start_Laurent_system", - py2c_write_quaddobl_start_Laurent_system, METH_VARARGS, - "Writes the start Laurent system in quad double precision."}, - {"py2c_read_quaddobl_target_Laurent_system", - py2c_read_quaddobl_target_Laurent_system, METH_VARARGS, - "Prompts the user for a file name and reads the target system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, - {"py2c_write_quaddobl_target_Laurent_system", - py2c_write_quaddobl_target_Laurent_system, METH_VARARGS, - "Writes the target Laurent system in quad double precision."}, - {"py2c_write_start_solutions", py2c_write_start_solutions, METH_VARARGS, - "Writes the start solutions in standard double precision either to\n the screen (standard output) or to the defined output file.\n On return is the failure code, which is zero if all is well."}, - {"py2c_copy_standard_target_system_to_container", - py2c_copy_standard_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in standard double precision."}, - {"py2c_copy_dobldobl_target_system_to_container", - py2c_copy_dobldobl_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in double double precision."}, - {"py2c_copy_quaddobl_target_system_to_container", - py2c_copy_quaddobl_target_system_to_container, METH_VARARGS, - "Copies the target system to the container for systems\n with coefficients in quad double precision."}, - {"py2c_copy_multprec_target_system_to_container", - py2c_copy_multprec_target_system_to_container, METH_VARARGS, - "copies multiprecision target system to container"}, - {"py2c_copy_standard_container_to_target_system", - py2c_copy_standard_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in standard double precision to the target system."}, - {"py2c_copy_dobldobl_container_to_target_system", - py2c_copy_dobldobl_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in double double precision to the target system."}, - {"py2c_copy_quaddobl_container_to_target_system", - py2c_copy_quaddobl_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in quad double precision to the target system."}, - {"py2c_copy_multprec_container_to_target_system", - py2c_copy_multprec_container_to_target_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the target system."}, - {"py2c_copy_start_system_to_container", - py2c_copy_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in standard double precision."}, - {"py2c_copy_dobldobl_start_system_to_container", - py2c_copy_dobldobl_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in double double precision."}, - {"py2c_copy_quaddobl_start_system_to_container", - py2c_copy_quaddobl_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in quad double precision."}, - {"py2c_copy_multprec_start_system_to_container", - py2c_copy_multprec_start_system_to_container, METH_VARARGS, - "Copies the start system to the container for systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_start_system", - py2c_copy_standard_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in standard double precision to the start system."}, - {"py2c_copy_dobldobl_container_to_start_system", - py2c_copy_dobldobl_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in double double precision to the start system."}, - {"py2c_copy_quaddobl_container_to_start_system", - py2c_copy_quaddobl_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in quad double precision to the start system."}, - {"py2c_copy_multprec_container_to_start_system", - py2c_copy_multprec_container_to_start_system, METH_VARARGS, - "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the start system."}, - {"py2c_copy_standard_Laurent_container_to_start_system", - py2c_copy_standard_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in standard double precision\n from the container to the start system."}, - {"py2c_copy_dobldobl_Laurent_container_to_start_system", - py2c_copy_dobldobl_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in double double precision\n from the container to the start system."}, - {"py2c_copy_quaddobl_Laurent_container_to_start_system", - py2c_copy_quaddobl_Laurent_container_to_start_system, METH_VARARGS, - "Copies the Laurent system in quad double precision\n from the container to the start system."}, - {"py2c_copy_standard_Laurent_container_to_target_system", - py2c_copy_standard_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in standard double precision\n from the container to the target system."}, - {"py2c_copy_dobldobl_Laurent_container_to_target_system", - py2c_copy_dobldobl_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in double double precision\n from the container to the target system."}, - {"py2c_copy_quaddobl_Laurent_container_to_target_system", - py2c_copy_quaddobl_Laurent_container_to_target_system, METH_VARARGS, - "Copies the Laurent system in quad double precision\n from the container to the target system."}, - {"py2c_copy_standard_Laurent_start_system_to_container", - py2c_copy_standard_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in standard double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_dobldobl_Laurent_start_system_to_container", - py2c_copy_dobldobl_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in double double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_quaddobl_Laurent_start_system_to_container", - py2c_copy_quaddobl_Laurent_start_system_to_container, METH_VARARGS, - "Copies the start Laurent system in quad double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_standard_Laurent_target_system_to_container", - py2c_copy_standard_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in standard double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_dobldobl_Laurent_target_system_to_container", - py2c_copy_dobldobl_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in double double precision\n to the systems container for Laurent systems."}, - {"py2c_copy_quaddobl_Laurent_target_system_to_container", - py2c_copy_quaddobl_Laurent_target_system_to_container, METH_VARARGS, - "Copies the target Laurent system in quad double precision\n to the systems container for Laurent systems."}, - {"py2c_create_standard_homotopy", py2c_create_standard_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in standard double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_standard_homotopy_with_gamma", - py2c_create_standard_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in standard double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_dobldobl_homotopy", py2c_create_dobldobl_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in double double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_dobldobl_homotopy_with_gamma", - py2c_create_dobldobl_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in double double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_quaddobl_homotopy", py2c_create_quaddobl_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in quad double precision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_quaddobl_homotopy_with_gamma", - py2c_create_quaddobl_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in quad double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_multprec_homotopy", py2c_create_multprec_homotopy, - METH_VARARGS, - "Initializes the data for a homotopy in arbitrary multiprecision.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_create_multprec_homotopy_with_gamma", - py2c_create_multprec_homotopy_with_gamma, METH_VARARGS, - "Initializes the data for a homotopy in arbitrary multiprecision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, - {"py2c_clear_standard_homotopy", py2c_clear_standard_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in standard double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_dobldobl_homotopy", py2c_clear_dobldobl_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in double double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_quaddobl_homotopy", py2c_clear_quaddobl_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in quad double precision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_clear_multprec_homotopy", py2c_clear_multprec_homotopy, METH_VARARGS, - "Deallocation of the homotopy stored in arbitrary multiprecision.\n On return is the failure code, which equals zero if all is well."}, - {"py2c_tune_continuation_parameters", py2c_tune_continuation_parameters, - METH_VARARGS, - "Interactive procedure to tune the continuation parameters."}, - {"py2c_show_continuation_parameters", py2c_show_continuation_parameters, - METH_VARARGS, - "Shows the current values of the continuation parameters."}, - {"py2c_autotune_continuation_parameters", - py2c_autotune_continuation_parameters, METH_VARARGS, - "Tunes the values of the continuation parameters.\n On input are two integers:\n 1) the difficulty level of the solution paths; and\n 2) the number of decimal places in the precision."}, - {"py2c_get_value_of_continuation_parameter", - py2c_get_value_of_continuation_parameter, METH_VARARGS, - "Returns the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34.\n On return is a double with the value of the corresponding parameter."}, - {"py2c_set_value_of_continuation_parameter", - py2c_set_value_of_continuation_parameter, METH_VARARGS, - "Sets the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34;\n and the new value for the continuation parameter.\n On return is a double with the value of the corresponding parameter."}, - {"py2c_determine_output_during_continuation", - py2c_determine_output_during_continuation, METH_VARARGS, - "Interactive procedure to determine the level of output during the path tracking."}, - {"py2c_solve_by_standard_homotopy_continuation", - py2c_solve_by_standard_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in standard double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_dobldobl_homotopy_continuation", - py2c_solve_by_dobldobl_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in double double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_quaddobl_homotopy_continuation", - py2c_solve_by_quaddobl_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in quad double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_multprec_homotopy_continuation", - py2c_solve_by_multprec_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in arbitrary multiprecision.\n On input is one integer: the number of decimal places in the precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_standard_Laurent_homotopy_continuation", - py2c_solve_by_standard_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in standard double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_dobldobl_Laurent_homotopy_continuation", - py2c_solve_by_dobldobl_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in double double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_solve_by_quaddobl_Laurent_homotopy_continuation", - py2c_solve_by_quaddobl_Laurent_homotopy_continuation, METH_VARARGS, - "Tracks the paths defined by the homotopy in quad double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, - {"py2c_clear_standard_operations_data", - py2c_clear_standard_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_standard_homotopy_continuation."}, - {"py2c_clear_dobldobl_operations_data", - py2c_clear_dobldobl_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_dobldobl_homotopy_continuation."}, - {"py2c_clear_quaddobl_operations_data", - py2c_clear_quaddobl_operations_data, METH_VARARGS, - "Deallocates the data used by solve_by_quaddobl_homotopy_continuation."}, - {"py2c_clear_standard_Laurent_data", - py2c_clear_standard_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in standard double precision."}, - {"py2c_clear_dobldobl_Laurent_data", - py2c_clear_dobldobl_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in double double precision."}, - {"py2c_clear_quaddobl_Laurent_data", - py2c_clear_quaddobl_Laurent_data, METH_VARARGS, - "Deallocates data used to solve Laurent systems by homotopy continuation\n in quad double precision."}, - {"py2c_standard_crude_tracker", py2c_standard_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in standard double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in standard\n double precision have been initialized in the containers."}, - {"py2c_dobldobl_crude_tracker", py2c_dobldobl_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in double double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in double\n double precision have been initialized in the containers."}, - {"py2c_quaddobl_crude_tracker", py2c_quaddobl_crude_tracker, METH_VARARGS, - "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in quad double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in quad\n double precision have been initialized in the containers."}, - {"py2c_copy_standard_target_solutions_to_container", - py2c_copy_standard_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in standard double precision to the\n container for solutions in standard double precision."}, - {"py2c_copy_dobldobl_target_solutions_to_container", - py2c_copy_dobldobl_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in double double precision to the\n container for solutions in double double precision."}, - {"py2c_copy_quaddobl_target_solutions_to_container", - py2c_copy_quaddobl_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in quad double precision to the\n container for solutions in quad double precision."}, - {"py2c_copy_multprec_target_solutions_to_container", - py2c_copy_multprec_target_solutions_to_container, METH_VARARGS, - "Copies the target solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_target_solutions", - py2c_copy_standard_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in standard double precision from the\n container to the target solutions in standard double precision."}, - {"py2c_copy_dobldobl_container_to_target_solutions", - py2c_copy_dobldobl_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in double double precision from the\n container to the target solutions in double double precision."}, - {"py2c_copy_quaddobl_container_to_target_solutions", - py2c_copy_quaddobl_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in quad double precision from the\n container to the target solutions in quad double precision."}, - {"py2c_copy_multprec_container_to_target_solutions", - py2c_copy_multprec_container_to_target_solutions, METH_VARARGS, - "Copies the solutions in arbitrary multiprecision from the\n container to the target solutions in arbitrary multiprecision."}, - {"py2c_copy_start_solutions_to_container", - py2c_copy_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in standard double precision to the\n container for solutions in standard double precision."}, - {"py2c_copy_dobldobl_start_solutions_to_container", - py2c_copy_dobldobl_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in double double precision to the\n container for solutions in double double precision."}, - {"py2c_copy_quaddobl_start_solutions_to_container", - py2c_copy_quaddobl_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in quad double precision to the\n container for solutions in quad double precision."}, - {"py2c_copy_multprec_start_solutions_to_container", - py2c_copy_multprec_start_solutions_to_container, METH_VARARGS, - "Copies the start solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, - {"py2c_copy_standard_container_to_start_solutions", - py2c_copy_standard_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in standard double precision from the\n container to the start solutions in standard double precision."}, - {"py2c_copy_dobldobl_container_to_start_solutions", - py2c_copy_dobldobl_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in double double precision from the\n container to the start solutions in double double precision."}, - {"py2c_copy_quaddobl_container_to_start_solutions", - py2c_copy_quaddobl_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in quad double precision from the\n container to the start solutions in quad double precision."}, - {"py2c_copy_multprec_container_to_start_solutions", - py2c_copy_multprec_container_to_start_solutions, METH_VARARGS, - "Copies the solutions in arbitrary multiprecision from the\n container to the start solutions in arbitrary multiprecision."}, - {"py2c_solve_standard_system", py2c_solve_standard_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard systems container."}, - {"py2c_scan_for_symbols", py2c_scan_for_symbols, METH_VARARGS, - "Given on input are two arguments: a number and a string.\n The string holds the string representation of a polynomial system,\n where each polynomial is terminated by a semi colon.\n The first argument on input is the number of characters in the string.\n On return is the number of symbols used as variables in the system.\n This function helps to determine whether a system is square or not."}, - {"py2c_solve_dobldobl_system", py2c_solve_dobldobl_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level. \n On return, the container for solutions in double double precision\n contains the solutions to the system in the dobldobl systems container."}, - {"py2c_solve_quaddobl_system", py2c_solve_quaddobl_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in quad double precision.\n Threee integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quaddobl systems container."}, - {"py2c_solve_standard_Laurent_system", - py2c_solve_standard_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, the no degree bounds will be computed, as when\n the system is genuinely Laurent with negative exponents; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard Laurent systems\n container."}, - {"py2c_solve_dobldobl_Laurent_system", - py2c_solve_dobldobl_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the double double Laurent systems\n container."}, - {"py2c_solve_quaddobl_Laurent_system", - py2c_solve_quaddobl_Laurent_system, METH_VARARGS, - "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in quad double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quad double Laurent systems\n container."}, - {"py2c_set_gamma_constant", py2c_set_gamma_constant, METH_VARARGS, - "Stores the gamma constant for later retrieval.\n Four parameters are expected on input, two doubles and two integers.\n The two doubles are the real and imaginary parts of the gamma.\n The two integers are the precision, 1, 2, or 4, respectively for\n double, double double, or quad double; and the verbose level."}, - {"py2c_get_gamma_constant", py2c_get_gamma_constant, METH_VARARGS, - "Returns the gamma constant used by the solve functions.\n Two integer parameters are expected on input:\n (1) for the precision, 1, 2, or 4, respectively for double,\n double double, or quad double precision; and\n (2) the verbose level.\n The function returns a tuple of two doubles,\n for the real and imaginary part of the gamma constant."}, - {"py2c_mixed_volume", py2c_mixed_volume, METH_VARARGS, - "Computes the mixed volume, and the stable mixed volume as well if\n the input parameter equals 1. On return is the mixed volume, or\n a tuple with the mixed volume and the stable mixed volume."}, - {"py2c_mixed_volume_by_demics", py2c_mixed_volume_by_demics, METH_VARARGS, - "Calls DEMiCs to compute the mixed volume of the system in the\n standard systems container. If the standard systems container\n is empty, then the system in the standard Laurent systems\n container is taken as input.\n The integer in mv on return equals the mixed volume.\n The regular mixed-cell configuration is in the cells container.\n The above is for the case if the input parameter equals 0.\n If the input parameter equals 1, then on return is a tuple,\n which contains the mixed volume and the stable mixed volume."}, - {"py2c_standard_deflate", py2c_standard_deflate, METH_VARARGS, - "Applies deflation in standard double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_deflate", py2c_dobldobl_deflate, METH_VARARGS, - "Applies deflation in double double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_deflate", py2c_quaddobl_deflate, METH_VARARGS, - "Applies deflation in quad double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_step", py2c_standard_Newton_step, METH_VARARGS, - "Applies one Newton step in standard double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_step", py2c_dobldobl_Newton_step, METH_VARARGS, - "Applies one Newton step in double double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_step", py2c_quaddobl_Newton_step, METH_VARARGS, - "Applies one Newton step in quad double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_multprec_Newton_step", py2c_multprec_Newton_step, METH_VARARGS, - "Applies one Newton step in arbitrary multiprecision to the system in\n the multprec systems container and to the solutions in the container.\n On input is an integer, the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_Laurent_step", py2c_standard_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in standard double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_Laurent_step", py2c_dobldobl_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in double double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_Laurent_step", py2c_quaddobl_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in quad double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_multprec_Newton_Laurent_step", py2c_multprec_Newton_Laurent_step, - METH_VARARGS, - "Applies one Newton step in arbitrary multiprecision to the Laurent\n system in the multprec Laurent systems container and to the solutions\n in the container.\n On input is an integer: the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_varbprec_Newton_Laurent_steps", py2c_varbprec_Newton_Laurent_steps, - METH_VARARGS, - "Applies Newton's method in variable precision.\n There are six input parameters:\n 1) the dimension: the number of variables and equations;\n 2) the accuracy, expressed as the correct number of decimal places;\n 3) the maximum number of iterations in Newton's method;\n 4) an upper bound on the number of decimal places in the precision;\n 5) a string, with the representation of the polynomials in the system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_condition_report", py2c_standard_condition_report, - METH_VARARGS, - "For the system and solutions in the containers in double precision,\n computes a condition report. On input are the following:\n 1) maximum number of Newton iterations per solution;\n 2) tolerance on the residual;\n 3) tolerance on the forward error;\n 4) tolerance on the inverse condition number for singularities;\n 5) a string with the name of the output file,\n this string may be empty if no output to file is needed;\n 6) a verbose flag, either 1 or 0.\n On return are the counts of number of solutions that are\n regular, singular, real, complex, clustered, or failures;\n along with the frequency tables for the forward errors,\n residuals and estimates for the inverse condition numbers."}, - {"py2c_usolve_standard", py2c_usolve_standard, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with standard double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the standard systems container. After the call of this function,\n the standard solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_dobldobl", py2c_usolve_dobldobl, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with double double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the dobldobl systems container. After the call of this function,\n the dobldobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_quaddobl", py2c_usolve_quaddobl, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with quad double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the quaddobl systems container. After the call of this function,\n the quaddobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_usolve_multprec", py2c_usolve_multprec, METH_VARARGS, - "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with arbitrary multiprecision arithmetic.\n On input are three numbers:\n 1) the number of decimal places in the working precision;\n 2) the maximum number of iterations in the method of Weierstrass; and\n 3) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the multprec systems container. After the call of this function,\n the multprec solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, - {"py2c_giftwrap_planar", py2c_giftwrap_planar, METH_VARARGS, - "Applies the giftwrapping algorithm to a planar point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n On return is the string representation of the vertex points,\n sorted so that each two consecutive points define an edge."}, - {"py2c_giftwrap_convex_hull", py2c_giftwrap_convex_hull, METH_VARARGS, - "Applies the giftwrapping algorithm to a point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n When the function returns, the internal data structures\n to store the convex hull are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_giftwrap_number_of_facets", py2c_giftwrap_number_of_facets, - METH_VARARGS, - "Returns the number of facets of the given dimension.\n On input is an integer, the dimension of the facet."}, - {"py2c_giftwrap_retrieve_facet", py2c_giftwrap_retrieve_facet, METH_VARARGS, - "Returns the string representation of a facet.\n On input are two integer numbers:\n 1) the dimension of the facet;\n 2) the index of the facet."}, - {"py2c_giftwrap_clear_3d_facets", py2c_giftwrap_clear_3d_facets, - METH_VARARGS, - "Deallocates list of facets of convex hull stored in 3-space."}, - {"py2c_giftwrap_clear_4d_facets", py2c_giftwrap_clear_4d_facets, - METH_VARARGS, - "Deallocates list of facets of convex hull stored in 4-space."}, - {"py2c_giftwrap_support_size", py2c_giftwrap_support_size, METH_VARARGS, - "Returns the number of characters in the string representation of\n the support of the k-th Laurent polynomial in the container, k is given on input."}, - {"py2c_giftwrap_support_string", py2c_giftwrap_support_string, - METH_VARARGS, - "Returns the string representation of the support of a Laurent polynomial."}, - {"py2c_giftwrap_clear_support_string", py2c_giftwrap_clear_support_string, - METH_VARARGS, - "Deallocates the string representation of the support set\n that was stored internally by the call py2c_giftwrap_support_size."}, - {"py2c_giftwrap_initial_form", py2c_giftwrap_initial_form, METH_VARARGS, - "Replaces the system in the Laurent systems container by its initial form.\n There are three input parameters:\n 1) the dimension, number of coordinates in the inner normal;\n 2) the number of characters in the string representation for the normal;\n 3) the string representation of the inner normal.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_read_standard_system", - py2c_syscon_read_standard_system, METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in standard double precision.\n The system will be placed in the standard systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_standard_Laurent_system", - py2c_syscon_read_standard_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in standard double precision.\n The system will be placed in the standard Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_dobldobl_system", py2c_syscon_read_dobldobl_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in double double precision.\n The system will be placed in the dobldobl systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_dobldobl_Laurent_system", - py2c_syscon_read_dobldobl_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in double double precision.\n The system will be placed in the dobldobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_quaddobl_system", py2c_syscon_read_quaddobl_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in quad double precision.\n The system will be placed in the quaddobl systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_quaddobl_Laurent_system", - py2c_syscon_read_quaddobl_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in quad double precision.\n The system will be placed in the quaddobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_multprec_system", py2c_syscon_read_multprec_system, - METH_VARARGS, - "Interactive procedure to read a polynomial system with coefficients\n in arbitrary multiprecision. The one input parameter is an integer,\n the number of decimal places in the working precision.\n The system will be placed in the multprec systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_read_multprec_Laurent_system", - py2c_syscon_read_multprec_Laurent_system, METH_VARARGS, - "Interactive procedure to read a Laurent polynomial system with\n coefficients in arbitrary multiprecision. The one input parameter is\n an integer, the number of decimal places in the working precision.\n The system will be placed in the multprec Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_random_system", py2c_syscon_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in standard double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_dobldobl_random_system", - py2c_syscon_dobldobl_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in double double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_quaddobl_random_system", - py2c_syscon_quaddobl_random_system, METH_VARARGS, - "Places in the systems container a random polynomial system\n with coefficients in quad double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, - {"py2c_syscon_write_standard_system", - py2c_syscon_write_standard_system, METH_VARARGS, - "Writes the polynomial system with standard double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_standard_Laurent_system", - py2c_syscon_write_standard_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with standard double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_dobldobl_system", - py2c_syscon_write_dobldobl_system, METH_VARARGS, - "Writes the polynomial system with double double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_dobldobl_Laurent_system", - py2c_syscon_write_dobldobl_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with double double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_quaddobl_system", - py2c_syscon_write_quaddobl_system, METH_VARARGS, - "Writes the polynomial system with quad double precision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_quaddobl_Laurent_system", - py2c_syscon_write_quaddobl_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with quad double precision\n coefficients that is stored in the container."}, - {"py2c_syscon_write_multprec_system", - py2c_syscon_write_multprec_system, METH_VARARGS, - "Writes the polynomial system with arbitrary multiprecision coefficients\n that is stored in the container."}, - {"py2c_syscon_write_multprec_Laurent_system", - py2c_syscon_write_multprec_Laurent_system, METH_VARARGS, - "Writes the Laurent polynomial system with arbitrary multiprecision\n coefficients that is stored in the container."}, - {"py2c_syscon_clear_standard_system", - py2c_syscon_clear_standard_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in standard double precision."}, - {"py2c_syscon_clear_standard_Laurent_system", - py2c_syscon_clear_standard_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in standard double precision."}, - {"py2c_syscon_clear_dobldobl_system", - py2c_syscon_clear_dobldobl_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in double double precision."}, - {"py2c_syscon_clear_dobldobl_Laurent_system", - py2c_syscon_clear_dobldobl_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in double double precision."}, - {"py2c_syscon_clear_quaddobl_system", - py2c_syscon_clear_quaddobl_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in quad double precision."}, - {"py2c_syscon_clear_quaddobl_Laurent_system", - py2c_syscon_clear_quaddobl_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in quad double precision."}, - {"py2c_syscon_clear_multprec_system", - py2c_syscon_clear_multprec_system, METH_VARARGS, - "Deallocates the container for polynomial systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_syscon_clear_multprec_Laurent_system", - py2c_syscon_clear_multprec_Laurent_system, METH_VARARGS, - "Deallocates the container for Laurent polynomial systems\n with coefficients in arbitrary multiprecision."}, - {"py2c_syscon_number_of_symbols", - py2c_syscon_number_of_symbols, METH_VARARGS, - "Returns the number of symbols in the symbol table."}, - {"py2c_syscon_write_symbols", py2c_syscon_write_symbols, METH_VARARGS, - "Writes the symbols in the symbol table to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_syscon_string_of_symbols", - py2c_syscon_string_of_symbols, METH_VARARGS, - "Returns a string that contains the symbols in the symbol table.\n The symbols are separate from each other by one space."}, - {"py2c_syscon_remove_symbol_name", py2c_syscon_remove_symbol_name, - METH_VARARGS, - "Removes a symbol, given by name, from the symbol table.\n On input are two arguments:\n 1) an integer, as the number of characters in the name;\n 2) a string of characters with the name of the symbol.\n The failure code is returned, which equals zero when all went well."}, - {"py2c_syscon_clear_symbol_table", py2c_syscon_clear_symbol_table, - METH_VARARGS, "Clears the symbol table."}, - {"py2c_solcon_read_standard_solutions", - py2c_solcon_read_standard_solutions, METH_VARARGS, - "Interactive function to read the solutions into the container,\n in standard double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_dobldobl_solutions", py2c_solcon_read_dobldobl_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in double double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_quaddobl_solutions", py2c_solcon_read_quaddobl_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in quad double precision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_multprec_solutions", py2c_solcon_read_multprec_solutions, - METH_VARARGS, - "Interactive function to read the solutions into the container,\n in arbitrary multiprecision.\n Returns the failure code, which is zero when all went well."}, - {"py2c_solcon_read_standard_solutions_from_file", - py2c_solcon_read_standard_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in standard double precision.\n Solutions are read from file and stored in the container for\n double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_read_dobldobl_solutions_from_file", - py2c_solcon_read_dobldobl_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in double double precision.\n Solutions are read from file and stored in the container for\n double double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_read_quaddobl_solutions_from_file", - py2c_solcon_read_quaddobl_solutions_from_file, METH_VARARGS, - "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in quad double precision.\n Solutions are read from file and stored in the container for\n quad double precision solutions.\n The failure code is returned, which is zero if all went well."}, - {"py2c_solcon_write_standard_solutions", - py2c_solcon_write_standard_solutions, METH_VARARGS, - "Writes the solutions in standard double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_dobldobl_solutions", - py2c_solcon_write_dobldobl_solutions, METH_VARARGS, - "Writes the solutions in double double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_quaddobl_solutions", - py2c_solcon_write_quaddobl_solutions, METH_VARARGS, - "Writes the solutions in quad double precision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_write_multprec_solutions", - py2c_solcon_write_multprec_solutions, METH_VARARGS, - "Writes the solutions in arbitrary multiprecision to screen.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_standard_solutions", - py2c_solcon_clear_standard_solutions, METH_VARARGS, - "Deallocates the container for solutions in standard double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_dobldobl_solutions", - py2c_solcon_clear_dobldobl_solutions, METH_VARARGS, - "Deallocates the container for solutions in double double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_quaddobl_solutions", - py2c_solcon_clear_quaddobl_solutions, METH_VARARGS, - "Deallocates the container for solutions in quad double precision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_clear_multprec_solutions", - py2c_solcon_clear_multprec_solutions, METH_VARARGS, - "Deallocates the container for solutions in arbitrary multiprecision.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_solcon_open_solution_input_file", - py2c_solcon_open_solution_input_file, METH_VARARGS, - "Prompts the user for the name of the input file for the solutions and\n opens the input file. All subsequent reading happens from this input.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_syscon_number_of_standard_polynomials", - py2c_syscon_number_of_standard_polynomials, - METH_VARARGS, - "Returns the number of polynomials with coefficients in standard\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_dobldobl_polynomials", - py2c_syscon_number_of_dobldobl_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in double\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_quaddobl_polynomials", - py2c_syscon_number_of_quaddobl_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in quad\n double precision as stored in the systems container."}, - {"py2c_syscon_number_of_multprec_polynomials", - py2c_syscon_number_of_multprec_polynomials, METH_VARARGS, - "Returns the number of polynomials with coefficients in arbitrary\n multiprecision as stored in the systems container."}, - {"py2c_syscon_number_of_standard_Laurentials", - py2c_syscon_number_of_standard_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n standard double precision as stored in the systems container."}, - {"py2c_syscon_number_of_dobldobl_Laurentials", - py2c_syscon_number_of_dobldobl_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n double double precision as stored in the systems container."}, - {"py2c_syscon_number_of_quaddobl_Laurentials", - py2c_syscon_number_of_quaddobl_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n quad double precision as stored in the systems container."}, - {"py2c_syscon_number_of_multprec_Laurentials", - py2c_syscon_number_of_multprec_Laurentials, METH_VARARGS, - "Returns the number of Laurent polynomials with coefficients in\n arbitrary multiprecision as stored in the systems container."}, - {"py2c_syscon_initialize_number_of_standard_polynomials", - py2c_syscon_initialize_number_of_standard_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_polynomials", - py2c_syscon_initialize_number_of_dobldobl_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_polynomials", - py2c_syscon_initialize_number_of_quaddobl_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_polynomials", - py2c_syscon_initialize_number_of_multprec_polynomials, METH_VARARGS, - "Initialzes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_standard_Laurentials", - py2c_syscon_initialize_number_of_standard_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_dobldobl_Laurentials", - py2c_syscon_initialize_number_of_dobldobl_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_quaddobl_Laurentials", - py2c_syscon_initialize_number_of_quaddobl_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_initialize_number_of_multprec_Laurentials", - py2c_syscon_initialize_number_of_multprec_Laurentials, METH_VARARGS, - "Initialzes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, - {"py2c_syscon_degree_of_standard_polynomial", - py2c_syscon_degree_of_standard_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in standard double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_dobldobl_polynomial", - py2c_syscon_degree_of_dobldobl_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in double double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_quaddobl_polynomial", - py2c_syscon_degree_of_quaddobl_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in quad double precision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_degree_of_multprec_polynomial", - py2c_syscon_degree_of_multprec_polynomial, METH_VARARGS, - "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in arbitrary multiprecision.\n The index k of the polynomial is the one input argument."}, - {"py2c_syscon_number_of_terms", - py2c_syscon_number_of_terms, METH_VARARGS, - "Returns the number of terms in the k-th polynomial stored in the\n container for systems with coefficients in standard double precision.\n The input parameter k is the index of the polynomial k."}, - {"py2c_syscon_number_of_Laurent_terms", - py2c_syscon_number_of_Laurent_terms, METH_VARARGS, - "Returns the number of terms in the k-th Laurent polynomial stored\n in the container for Laurent polynomials systems with coefficients\n in standard double precision.\n The input parameter k is the index of the polynomial k."}, - {"py2c_syscon_retrieve_term", - py2c_syscon_retrieve_term, METH_VARARGS, - "Retrieves one term of a polynomial with coefficients in standard\n double precision, that is stored in the systems container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_store_standard_polynomial", - py2c_syscon_store_standard_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_index", - py2c_syscon_standard_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_Laurent_drop_variable_by_name", - py2c_syscon_standard_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_index", - py2c_syscon_dobldobl_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_Laurent_drop_variable_by_name", - py2c_syscon_dobldobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the double double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_index", - py2c_syscon_quaddobl_Laurent_drop_variable_by_index, METH_VARARGS, - "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_Laurent_drop_variable_by_name", - py2c_syscon_quaddobl_Laurent_drop_variable_by_name, METH_VARARGS, - "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_one_homogenization", - py2c_syscon_standard_one_homogenization, METH_VARARGS, - "Replaces the system in the standard double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_dobldobl_one_homogenization", - py2c_syscon_dobldobl_one_homogenization, METH_VARARGS, - "Replaces the system in the double double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_quaddobl_one_homogenization", - py2c_syscon_quaddobl_one_homogenization, METH_VARARGS, - "Replaces the system in the quad double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, - {"py2c_syscon_add_symbol", - py2c_syscon_add_symbol, METH_VARARGS, - "Adds a symbol to the table, with name given in the string,\n where the number of characters in the name equals the first\n integer argument. The second input parameter is the string.\n This symbol represents the last variable added in the homogeneous\n coordinate transformation."}, - {"py2c_syscon_standard_one_affinization", - py2c_syscon_standard_one_affinization, METH_VARARGS, - "Replaces the system in the standard double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_syscon_dobldobl_one_affinization", - py2c_syscon_dobldobl_one_affinization, METH_VARARGS, - "Replaces the system in the double double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_syscon_quaddobl_one_affinization", - py2c_syscon_quaddobl_one_affinization, METH_VARARGS, - "Replaces the system in the quad double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, - {"py2c_tabform_store_standard_tableau", - py2c_tabform_store_standard_tableau, METH_VARARGS, - "On input is the tableau form of a polynomial system, given by\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of characters in the 4-th string input,\n 4) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 5) the number of characters in the 6-th string input,\n 6) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 7) the number of characters in the 7-th string input,\n 8) the exponents of all terms, given as a string,\n the string representation of a list of integers.\n The tableau form is parsed and the container for systems with\n standard double precision coefficients is initialized."}, - {"py2c_tabform_load_standard_tableau", - py2c_tabform_load_standard_tableau, METH_VARARGS, - "Returns a 5-tuple with the tableau form of the system with\n standard double precision coefficients in the container.\n On input is the verbose flag, as an integer.\n The five items in the returned tuple are\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 4) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 5) the exponents of all terms, given as a string,\n the string representation of a list of integers."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_one_homogenization", - py2c_solcon_standard_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in standard double precision."}, - {"py2c_solcon_dobldobl_one_homogenization", - py2c_solcon_dobldobl_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, - {"py2c_solcon_quaddobl_one_homogenization", - py2c_solcon_quaddobl_one_homogenization, METH_VARARGS, - "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, - {"py2c_solcon_standard_one_affinization", - py2c_solcon_standard_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in standard double precision."}, - {"py2c_solcon_dobldobl_one_affinization", - py2c_solcon_dobldobl_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in double double precision."}, - {"py2c_solcon_quaddobl_one_affinization", - py2c_solcon_quaddobl_one_affinization, METH_VARARGS, - "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in quad double precision."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_is_stable", py2c_celcon_is_stable, - METH_VARARGS, "returns 1 if stable mixed cells were stored, 0 otherwise"}, - {"py2c_celcon_number_of_original_cells", - py2c_celcon_number_of_original_cells, - METH_VARARGS, "returns the number of original cells in the cell container"}, - {"py2c_celcon_number_of_stable_cells", - py2c_celcon_number_of_stable_cells, - METH_VARARGS, "returns the number of stable cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_stable_standard_start_system", - py2c_celcon_solve_stable_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_solve_stable_dobldobl_start_system", - py2c_celcon_solve_stable_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_solve_stable_quaddobl_start_system", - py2c_celcon_solve_stable_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th stable mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_intcelcon_read_mixed_cell_configuration", - py2c_intcelcon_read_mixed_cell_configuration, METH_VARARGS, - "Reads a mixed-cell configuration"}, - {"py2c_intcelcon_write_mixed_cell_configuration", - py2c_intcelcon_write_mixed_cell_configuration, METH_VARARGS, - "Writes the mixed-cell configuration to screen."}, - {"py2c_intcelcon_number_of_cells", - py2c_intcelcon_number_of_cells, METH_VARARGS, - "Returns the number of cells in the mixed subdivision by integer lifting."}, - {"py2c_intcelcon_type_of_mixture", - py2c_intcelcon_type_of_mixture, METH_VARARGS, - "Returns the type of mixture for the integer cells container."}, - {"py2c_intcelcon_length_of_supports", - py2c_intcelcon_length_of_supports, METH_VARARGS, - "Returns a list of lengths of each support."}, - {"py2c_intcelcon_append_lifted_point", - py2c_intcelcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_intcelcon_get_lifted_point", - py2c_intcelcon_get_lifted_point, METH_VARARGS, - "Returns the string representation of the coordinates of a lifted point."}, - {"py2c_intcelcon_get_inner_normal", - py2c_intcelcon_get_inner_normal, METH_VARARGS, - "Given on input the dimension of the lifted points and the\n index of the mixed cell of interest, returns the string\n representation of the inner normal of the mixed cell."}, - {"py2c_intcelcon_number_of_points_in_cell", - py2c_intcelcon_number_of_points_in_cell, METH_VARARGS, - "Given are two integer numbers: the index to a cell\n (starting the count at one) and the number of different supports.\n On return is the string representation of the number of points\n which span each component of the mixed cell."}, - {"py2c_intcelcon_get_point_in_cell", - py2c_intcelcon_get_point_in_cell, METH_VARARGS, - "Returns the string representation of the n coordinates of\n the k-th point from the j-th list of the i-th cell.\n On input are the four integers: n, i, j, k, respectively\n the length of the lifted vectors in the supports,\n the index to a cell in the container,\n the index to a support of the i-th cell, and\n the index to a point in the j-th support of the i-th cell."}, - {"py2c_intcelcon_mixed_volume", - py2c_intcelcon_mixed_volume, METH_VARARGS, - "Returns the mixed volume of a mixed cell."}, - {"py2c_intcelcon_initialize_supports", - py2c_intcelcon_initialize_supports, METH_VARARGS, - "Initializes the supports with an integer valued lifting."}, - {"py2c_intcelcon_set_type_of_mixture", - py2c_intcelcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the tuple of supports."}, - {"py2c_intcelcon_make_subdivision", - py2c_intcelcon_make_subdivision, METH_VARARGS, - "Computes the cells in the regular subdivision induced by an integer\n valued lifting function."}, - {"py2c_intcelcon_clear_mixed_cell_configuration", - py2c_intcelcon_clear_mixed_cell_configuration, METH_VARARGS, - "Deallocates the data in the integer cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_linear_reduce_standard_system", - py2c_linear_reduce_standard_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for standard double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_linear_reduce_dobldobl_system", - py2c_linear_reduce_dobldobl_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for double double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_linear_reduce_quaddobl_system", - py2c_linear_reduce_quaddobl_system, METH_VARARGS, - "Applies linear reduction on the coefficient matrix of the system\n in the container for quad double precision.\n There is one integer parameter: whether to diagonalize or not."}, - {"py2c_nonlinear_reduce_standard_system", - py2c_nonlinear_reduce_standard_system, METH_VARARGS, - "Applies nonlinear reduction on the system in the container\n for standard double precision.\n Three integer numbers are expected on input:\n (1) the maximum number of equal degree replacements,\n (2) the maximum number of computed S-polynomials,\n (3) the maximum number of computed R-polynomials.\n The system in the standard container is replace by the reduced system.\n Three numbers are returned:\n (1) the number of equal degree replacements,\n (2) the number of computed S-polynomials,\n (3) the number of computed R-polynomials."}, - {"py2c_sweep_define_parameters_numerically", - py2c_sweep_define_parameters_numerically, METH_VARARGS, - "Defines the indices to the variables that serve as parameters\n numerically, that is: via integer indices.\n On entry are three integer numbers and a string.\n The string is a string representation of a Python list of integers,\n The three integers are the number of equations, the number of variables,\n and the number of parameters. The number of variables m includes the\n number of parameters. Then there should be as many as m indices in\n the list of integers to define which of the variables are parameters."}, - {"py2c_sweep_define_parameters_symbolically", - py2c_sweep_define_parameters_symbolically, METH_VARARGS, - "Defines the indices to the variables that serve as parameters\n symbolically, that is, as names of variables.\n For this to work, the symbol table must be initialized.\n On entry are four integer numbers and a string.\n The four integers are the number of equations, the number of variables,\n the number of parameters (the number of variables m includes the\n number of parameters), and the number of characters in the string.\n The string contains the names of the parameters, separated by one comma.\n For this to work, the symbol table must be initialized, e.g.:\n via the reading of a polynomial system."}, - {"py2c_sweep_get_number_of_equations", - py2c_sweep_get_number_of_equations, METH_VARARGS, - "Returns the number of equations in the sweep homotopy."}, - {"py2c_sweep_get_number_of_variables", - py2c_sweep_get_number_of_variables, METH_VARARGS, - "Returns the number of variables in the sweep homotopy."}, - {"py2c_sweep_get_number_of_parameters", - py2c_sweep_get_number_of_parameters, METH_VARARGS, - "Returns the number of parameters in the sweep homotopy."}, - {"py2c_sweep_get_indices_numerically", - py2c_sweep_get_indices_numerically, METH_VARARGS, - "Returns the indices of the variables that are parameters,\n as the string representation of a Python list of integers."}, - {"py2c_sweep_get_indices_symbolically", - py2c_sweep_get_indices_symbolically, METH_VARARGS, - "Returns a string with the names of the parameters,\n each separated by one space."}, - {"py2c_sweep_clear_definitions", - py2c_sweep_clear_definitions, METH_VARARGS, - "Clears the definitions in the sweep homotopy."}, - {"py2c_sweep_set_standard_start", - py2c_sweep_set_standard_start, METH_VARARGS, - "Sets the start values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters.\n The doubles are given in a string representation of a Python\n list of doubles."}, - {"py2c_sweep_set_standard_target", - py2c_sweep_set_standard_target, METH_VARARGS, - "Sets the target values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_set_dobldobl_start", - py2c_sweep_set_dobldobl_start, METH_VARARGS, - "Sets the start values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, - {"py2c_sweep_set_dobldobl_target", - py2c_sweep_set_dobldobl_target, METH_VARARGS, - "Sets the target values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_set_quaddobl_start", - py2c_sweep_set_quaddobl_start, METH_VARARGS, - "Sets the start values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, - {"py2c_sweep_set_quaddobl_target", - py2c_sweep_set_quaddobl_target, METH_VARARGS, - "Sets the target values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, - {"py2c_sweep_get_standard_start", - py2c_sweep_get_standard_start, METH_VARARGS, - "Gets the start values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_standard_target", - py2c_sweep_get_standard_target, METH_VARARGS, - "Gets the target values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_dobldobl_start", - py2c_sweep_get_dobldobl_start, METH_VARARGS, - "Gets the start values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_dobldobl_target", - py2c_sweep_get_dobldobl_target, METH_VARARGS, - "Gets the target values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_quaddobl_start", - py2c_sweep_get_quaddobl_start, METH_VARARGS, - "Gets the start values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_get_quaddobl_target", - py2c_sweep_get_quaddobl_target, METH_VARARGS, - "Returns the target values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, - {"py2c_sweep_standard_complex_run", - py2c_sweep_standard_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in standard double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in standard double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_dobldobl_complex_run", - py2c_sweep_dobldobl_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in double double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in double double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_quaddobl_complex_run", - py2c_sweep_quaddobl_complex_run, METH_VARARGS, - "Starts the trackers in a complex convex parameter homotopy,\n in quad double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in quad double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, - {"py2c_sweep_standard_real_run", - py2c_sweep_standard_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in standard double\n precision and the corresponding start solutions in the standard solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_sweep_dobldobl_real_run", - py2c_sweep_dobldobl_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in double double\n precision and the corresponding start solutions in the dobldobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_sweep_quaddobl_real_run", - py2c_sweep_quaddobl_real_run, METH_VARARGS, - "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in quad double\n precision and the corresponding start solutions in the quaddobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, - {"py2c_standard_multiplicity_structure", - py2c_standard_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in standard double precision.\n Required is the presence of a polynomial system in the standard\n systems container and a solution in the standard solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_dobldobl_multiplicity_structure", - py2c_dobldobl_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in double double precision.\n Required is the presence of a polynomial system in the dobldobl\n systems container and a solution in the dobldobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_quaddobl_multiplicity_structure", - py2c_quaddobl_multiplicity_structure, METH_VARARGS, - "Computes the multiplicity structure in quad double precision.\n Required is the presence of a polynomial system in the quaddobl\n systems container and a solution in the quaddobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, - {"py2c_numbtrop_standard_initialize", - py2c_numbtrop_standard_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in standard double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_dobldobl_initialize", - py2c_numbtrop_dobldobl_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in double double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_quaddobl_initialize", - py2c_numbtrop_quaddobl_initialize, METH_VARARGS, - "Initializes the numerical tropisms container,\n in quad double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, - {"py2c_numbtrop_standard_retrieve", - py2c_numbtrop_standard_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in standard double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_dobldobl_retrieve", - py2c_numbtrop_dobldobl_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in double double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_quaddobl_retrieve", - py2c_numbtrop_quaddobl_retrieve, METH_VARARGS, - "Retrieves all tropisms stored in quad double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, - {"py2c_numbtrop_standard_size", py2c_numbtrop_standard_size, METH_VARARGS, - "Returns the number of tropisms, stored in standard double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_dobldobl_size", py2c_numbtrop_dobldobl_size, METH_VARARGS, - "Returns the number of tropisms, stored in double double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_quaddobl_size", py2c_numbtrop_quaddobl_size, METH_VARARGS, - "Returns the number of tropisms, stored in quad double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_standard_dimension", - py2c_numbtrop_standard_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in standard double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_dobldobl_dimension", - py2c_numbtrop_dobldobl_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in double double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_quaddobl_dimension", - py2c_numbtrop_quaddobl_dimension, METH_VARARGS, - "Returns the dimension of the tropisms, stored in quad double\n precision, in the numerical tropisms container."}, - {"py2c_numbtrop_store_standard_tropism", - py2c_numbtrop_store_standard_tropism, METH_VARARGS, - "Stores a tropism given in standard double precision.\n The first three input parmeters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by standard_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are given in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_store_dobldobl_tropism", - py2c_numbtrop_store_dobldobl_tropism, METH_VARARGS, - "Stores a tropism given in double double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by dobldobl_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are given in one string,\n the string representatin of a list of doubles."}, - {"py2c_numbtrop_store_quaddobl_tropism", - py2c_numbtrop_store_quaddobl_tropism, METH_VARARGS, - "Stores a tropism given in quad double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by quaddobl_size;\n The other input parameters are of type double:\n wnd : estimated winding number;\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four double\n All 4*dim+4 doubles are given in one string,\n the string representatin of a list of doubles."}, - {"py2c_numbtrop_standard_retrieve_tropism", - py2c_numbtrop_standard_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in standard double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_standard_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_dobldobl_retrieve_tropism", - py2c_numbtrop_dobldobl_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in double double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_dobldobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_quaddobl_retrieve_tropism", - py2c_numbtrop_quaddobl_retrieve_tropism, METH_VARARGS, - "Returns one tropism, stored in quad double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_quaddobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four doubles.\n All 4*dim+4 doubles are returned in one string,\n the string representation of a list of doubles."}, - {"py2c_numbtrop_standard_clear", py2c_numbtrop_standard_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in standard double precision."}, - {"py2c_numbtrop_dobldobl_clear", py2c_numbtrop_dobldobl_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in double double precision."}, - {"py2c_numbtrop_quaddobl_clear", py2c_numbtrop_quaddobl_clear, METH_VARARGS, - "Deallocates the stored numerically computed tropisms,\n computed in quad double precision."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system in the container with its embedding of dimension d.\n The dimension d is given as the first integer parameter on input.\n The second integer parameter indicates the precision, either 0, 1, or 2,\n respectively for double, double double, or quad double precision.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_standard_system", py2c_embed_standard_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_dobldobl_system", py2c_embed_dobldobl_system, METH_VARARGS, - "Replaces the system with coefficients in double double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_quaddobl_system", py2c_embed_quaddobl_system, METH_VARARGS, - "Replaces the system with coefficients in quad double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_standard_Laurent_system", - py2c_embed_standard_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in standard double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_dobldobl_Laurent_system", - py2c_embed_dobldobl_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in double double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_embed_quaddobl_Laurent_system", - py2c_embed_quaddobl_Laurent_system, METH_VARARGS, - "Replaces the Laurent system with coefficients in quad double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_swap_symbols_for_standard_witness_set", - py2c_swap_symbols_for_standard_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_dobldobl_witness_set", - py2c_swap_symbols_for_dobldobl_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_quaddobl_witness_set", - py2c_swap_symbols_for_quaddobl_witness_set, METH_VARARGS, - "Permutes the slack variables in the polynomial system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_standard_Laurent_witness_set", - py2c_swap_symbols_for_standard_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_dobldobl_Laurent_witness_set", - py2c_swap_symbols_for_dobldobl_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_swap_symbols_for_quaddobl_Laurent_witness_set", - py2c_swap_symbols_for_quaddobl_Laurent_witness_set, METH_VARARGS, - "Permutes the slack variables in the Laurent system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Laurent_cascade_homotopy", - py2c_standard_Laurent_cascade_homotopy, METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Laurent_cascade_homotopy", - py2c_dobldobl_Laurent_cascade_homotopy, METH_VARARGS, - " Creates a homotopy in double double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Laurent_cascade_homotopy", - py2c_quaddobl_Laurent_cascade_homotopy, METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_standard_to_mute", - py2c_factor_set_standard_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in standard double\n precision to silent."}, - {"py2c_factor_set_dobldobl_to_mute", - py2c_factor_set_dobldobl_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in double double\n precision to silent."}, - {"py2c_factor_set_quaddobl_to_mute", - py2c_factor_set_quaddobl_to_mute, METH_VARARGS, - "Sets the state of monodromy permutations in quad double\n precision to silent."}, - {"py2c_factor_set_standard_to_verbose", - py2c_factor_set_standard_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in standard double\n precision to verbose."}, - {"py2c_factor_set_dobldobl_to_verbose", - py2c_factor_set_dobldobl_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in double double\n precision to verbose."}, - {"py2c_factor_set_quaddobl_to_verbose", - py2c_factor_set_quaddobl_to_verbose, METH_VARARGS, - "Sets the state of monodromy permutations in quad double\n precision to verbose."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_standard_assign_labels", - py2c_factor_standard_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_dobldobl_assign_labels", - py2c_factor_dobldobl_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in double double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_quaddobl_assign_labels", - py2c_factor_quaddobl_assign_labels, METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in quad double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_standard_sampler", - py2c_factor_initialize_standard_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in standard double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_dobldobl_sampler", - py2c_factor_initialize_dobldobl_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in double double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_quaddobl_sampler", - py2c_factor_initialize_quaddobl_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in quad double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_standard_Laurent_sampler", - py2c_factor_initialize_standard_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in standard double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_dobldobl_Laurent_sampler", - py2c_factor_initialize_dobldobl_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in double double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_quaddobl_Laurent_sampler", - py2c_factor_initialize_quaddobl_Laurent_sampler, METH_VARARGS, - "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in quad double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_standard_monodromy", - py2c_factor_initialize_standard_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in standard double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_initialize_dobldobl_monodromy", - py2c_factor_initialize_dobldobl_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in double double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_initialize_quaddobl_monodromy", - py2c_factor_initialize_quaddobl_monodromy, METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in quad double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_standard_trace_grid_diagnostics", - py2c_factor_standard_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in standard double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_dobldobl_trace_grid_diagnostics", - py2c_factor_dobldobl_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in double double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_quaddobl_trace_grid_diagnostics", - py2c_factor_quaddobl_trace_grid_diagnostics, METH_VARARGS, - "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in quad double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, - {"py2c_factor_store_standard_solutions", - py2c_factor_store_standard_solutions, METH_VARARGS, - "Stores the solutions in the container, in standard double precision,\n to the data for monodromy loops."}, - {"py2c_factor_store_dobldobl_solutions", - py2c_factor_store_dobldobl_solutions, METH_VARARGS, - "Stores the solutions in the container, in double double precision,\n to the data for monodromy loops."}, - {"py2c_factor_store_quaddobl_solutions", - py2c_factor_store_quaddobl_solutions, METH_VARARGS, - "Stores the solutions in the container, in quad double precision,\n to the data for monodromy loops."}, - {"py2c_factor_restore_standard_solutions", - py2c_factor_restore_standard_solutions, METH_VARARGS, - "Restores the first initialized solutions, in standard double precision,\n from sampler to the container."}, - {"py2c_factor_restore_dobldobl_solutions", - py2c_factor_restore_dobldobl_solutions, METH_VARARGS, - "Restores the first initialized solutions, in double double precision,\n from sampler to the container."}, - {"py2c_factor_restore_quaddobl_solutions", - py2c_factor_restore_quaddobl_solutions, METH_VARARGS, - "Restores the first initialized solutions, in quad double precision,\n from sampler to the container."}, - {"py2c_factor_standard_track_paths", - py2c_factor_standard_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in standard double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_dobldobl_track_paths", - py2c_factor_dobldobl_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in double double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_quaddobl_track_paths", - py2c_factor_quaddobl_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set,\n in quad double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_standard_slices", - py2c_factor_swap_standard_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in standard double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_dobldobl_slices", - py2c_factor_swap_dobldobl_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in double double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_quaddobl_slices", - py2c_factor_swap_quaddobl_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in quad double precision.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_standard_slices", - py2c_factor_new_standard_slices, METH_VARARGS, - "Generates k random slides in n-space, in standard double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_dobldobl_slices", - py2c_factor_new_dobldobl_slices, METH_VARARGS, - "Generates k random slides in n-space, in double double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_quaddobl_slices", - py2c_factor_new_quaddobl_slices, METH_VARARGS, - "Generates k random slides in n-space, in quad double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_standard_trace_slice", - py2c_factor_set_standard_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in standard double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_set_dobldobl_trace_slice", - py2c_factor_set_dobldobl_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in double double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_set_quaddobl_trace_slice", - py2c_factor_set_quaddobl_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice,\n in quad double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_standard_gammas", - py2c_factor_store_standard_gammas, METH_VARARGS, - "Stores the gamma constants in standard double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_dobldobl_gammas", - py2c_factor_store_dobldobl_gammas, METH_VARARGS, - "Stores the gamma constants in double double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_quaddobl_gammas", - py2c_factor_store_quaddobl_gammas, METH_VARARGS, - "Stores the gamma constants in quad double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_standard_loop", - py2c_factor_permutation_after_standard_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in standard double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_permutation_after_dobldobl_loop", - py2c_factor_permutation_after_dobldobl_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in double double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_permutation_after_quaddobl_loop", - py2c_factor_permutation_after_quaddobl_loop, METH_VARARGS, - "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in quad double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_standard_decomposition", - py2c_factor_update_standard_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in standard double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_update_dobldobl_decomposition", - py2c_factor_update_dobldobl_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in double double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_update_quaddobl_decomposition", - py2c_factor_update_quaddobl_decomposition, METH_VARARGS, - "Updates the decomposition with the given permutation of d elements,\n computed in quad double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_standard_components", - py2c_factor_number_of_standard_components, METH_VARARGS, - "Returns the number of irreducible factors in the current standard double\n precision decomposition of the witness set."}, - {"py2c_factor_number_of_dobldobl_components", - py2c_factor_number_of_dobldobl_components, METH_VARARGS, - "Returns the number of irreducible factors in the current double double\n precision decomposition of the witness set."}, - {"py2c_factor_number_of_quaddobl_components", - py2c_factor_number_of_quaddobl_components, METH_VARARGS, - "Returns the number of irreducible factors in the current quad double\n precision decomposition of the witness set."}, - {"py2c_factor_witness_points_of_standard_component", - py2c_factor_witness_points_of_standard_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in standard double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_witness_points_of_dobldobl_component", - py2c_factor_witness_points_of_dobldobl_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in double double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_witness_points_of_quaddobl_component", - py2c_factor_witness_points_of_quaddobl_component, METH_VARARGS, - "Returns a string which represents an irreducible component,\n computed in quad double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_standard_trace_sum_difference", - py2c_factor_standard_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in standard double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_factor_dobldobl_trace_sum_difference", - py2c_factor_dobldobl_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in double double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_factor_quaddobl_trace_sum_difference", - py2c_factor_quaddobl_trace_sum_difference, METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in quad double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witset_standard_membertest", - py2c_witset_standard_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_membertest", - py2c_witset_dobldobl_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\nin double double precision.\n The containers in double double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_membertest", - py2c_witset_quaddobl_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_Laurent_membertest", - py2c_witset_standard_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_Laurent_membertest", - py2c_witset_dobldobl_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_Laurent_membertest", - py2c_witset_quaddobl_Laurent_membertest, METH_VARARGS, - "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_ismember", - py2c_witset_standard_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_ismember", - py2c_witset_dobldobl_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_ismember", - py2c_witset_quaddobl_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_standard_Laurent_ismember", - py2c_witset_standard_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_dobldobl_Laurent_ismember", - py2c_witset_dobldobl_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_witset_quaddobl_Laurent_ismember", - py2c_witset_quaddobl_Laurent_ismember, METH_VARARGS, - "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, - {"py2c_standard_witset_of_hypersurface", - py2c_standard_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_witset_of_hypersurface", - py2c_dobldobl_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_witset_of_hypersurface", - py2c_quaddobl_witset_of_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_witset_of_Laurent_hypersurface", - py2c_standard_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_witset_of_Laurent_hypersurface", - py2c_dobldobl_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_witset_of_Laurent_hypersurface", - py2c_quaddobl_witset_of_Laurent_hypersurface, METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_diagonal_homotopy", py2c_standard_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in standard double precision, define the witness sets for\n these two solution sets."}, - {"py2c_dobldobl_diagonal_homotopy", py2c_dobldobl_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in double double precision, define the witness sets for\n these two solution sets."}, - {"py2c_quaddobl_diagonal_homotopy", py2c_quaddobl_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in quad double precision, define the witness sets for\n these two solution sets."}, - {"py2c_standard_diagonal_cascade_solutions", - py2c_standard_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in standard double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_dobldobl_diagonal_cascade_solutions", - py2c_dobldobl_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in double double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_quaddobl_diagonal_cascade_solutions", - py2c_quaddobl_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in quad double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_diagonal_symbols_doubler", - py2c_diagonal_symbols_doubler, METH_VARARGS, - "Doubles the number of symbols in the symbol table to enable the\n writing of the target system to string properly when starting the\n cascade of a diagonal homotopy in extrinsic coordinates.\n On input are three integers, n, d, nc, and one string s.\n On input are n, the ambient dimension = #variables before the embedding,\n d is the number of slack variables, or the dimension of the first set,\n and in s (nc characters) are the symbols for the first witness set.\n This function takes the symbols in s and combines those symbols with\n those in the current symbol table for the second witness set stored\n in the standard systems container. On return, the symbol table\n contains then all symbols to write the top system in the cascade\n to start the diagonal homotopy."}, - {"py2c_standard_collapse_diagonal", - py2c_standard_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for standard doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_collapse_diagonal", - py2c_dobldobl_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for double doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_collapse_diagonal", - py2c_quaddobl_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for quad doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_polysys_solve", - py2c_standard_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_standard_laursys_solve", - py2c_standard_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_dobldobl_polysys_solve", - py2c_dobldobl_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_dobldobl_laursys_solve", - py2c_dobldobl_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_quaddobl_polysys_solve", - py2c_quaddobl_polysys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_quaddobl_laursys_solve", - py2c_quaddobl_laursys_solve, METH_VARARGS, - "Runs the cascades of homotopies on the Laurent polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, - {"py2c_copy_standard_polysys_witset", - py2c_copy_standard_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_standard_laursys_witset", - py2c_copy_standard_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_dobldobl_polysys_witset", - py2c_copy_dobldobl_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_dobldobl_laursys_witset", - py2c_copy_dobldobl_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_quaddobl_polysys_witset", - py2c_copy_quaddobl_polysys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_copy_quaddobl_laursys_witset", - py2c_copy_quaddobl_laursys_witset, METH_VARARGS, - "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, - {"py2c_clear_standard_witsols", - py2c_clear_standard_witsols, METH_VARARGS, - "Clears the witness solutions in standard double precision."}, - {"py2c_clear_dobldobl_witsols", - py2c_clear_dobldobl_witsols, METH_VARARGS, - "Clears the witness solutions in double double precision."}, - {"py2c_clear_quaddobl_witsols", - py2c_clear_quaddobl_witsols, METH_VARARGS, - "Clears the witness solutions in quad double precision."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_standard_littlewood_richardson_homotopies", - py2c_schubert_standard_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in standard double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_dobldobl_littlewood_richardson_homotopies", - py2c_schubert_dobldobl_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in double double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in double double precision and the\n corresponding solutions are in the dobldobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_quaddobl_littlewood_richardson_homotopies", - py2c_schubert_quaddobl_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in quad double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in quad double precision and the\n corresponding solutions are in the quaddobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_standard_Newton_series", py2c_standard_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_series", py2c_dobldobl_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_series", py2c_quaddobl_Newton_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Newton_power_series", - py2c_standard_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the standard systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Newton_power_series", - py2c_dobldobl_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the dobldobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Newton_power_series", - py2c_quaddobl_Newton_power_series, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the quaddobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_Pade_approximant", - py2c_standard_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the standard systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_Pade_approximant", - py2c_dobldobl_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in double double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the dobldobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_Pade_approximant", - py2c_quaddobl_Pade_approximant, METH_VARARGS, - "Given in the systems container a polynomial system with coefficients\n in quad double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the quaddobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_padcon_set_default_parameters", - py2c_padcon_set_default_parameters, METH_VARARGS, - "Sets the default values of the homotopy continuation parameters."}, - {"py2c_padcon_clear_parameters", - py2c_padcon_clear_parameters, METH_VARARGS, - "Deallocates the allocated space for the parameters."}, - {"py2c_padcon_get_homotopy_continuation_parameter", - py2c_padcon_get_homotopy_continuation_parameter, METH_VARARGS, - "Returns the value of the k-th continuation parameter,\n if k ranges between 1 and 13. The integer k is given on entry."}, - {"py2c_padcon_set_homotopy_continuation_gamma", - py2c_padcon_set_homotopy_continuation_gamma, METH_VARARGS, - "The gamma constant is the first homotopy continuation parameter.\n The gamma is a complex number and it should be given as two\n doubles, as its real and imaginary part respectively."}, - {"py2c_padcon_set_homotopy_continuation_parameter", - py2c_padcon_set_homotopy_continuation_parameter, METH_VARARGS, - "Sets the value of the k-th continuation parameter to the given value.\n The first parameter k is an integer number between 2 and 13.\n The second parameter is the value of the k-th parameter,\n parsed as a floating point number."}, - {"py2c_padcon_standard_track", - py2c_padcon_standard_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in standard double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_dobldobl_track", - py2c_padcon_dobldobl_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in double double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_quaddobl_track", - py2c_padcon_quaddobl_track, METH_VARARGS, - "For the defined target, start system, and start solutions,\n launches the Pade continuation in quad double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, - {"py2c_padcon_standard_initialize_homotopy", - py2c_padcon_standard_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in standard double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_initialize_homotopy", - py2c_padcon_dobldobl_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in double double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_initialize_homotopy", - py2c_padcon_quaddobl_initialize_homotopy, METH_VARARGS, - "For the defined target and start system,\n initializes the homotopy in quad double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_initialize_parameter_homotopy", - py2c_padcon_standard_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n standard double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_initialize_parameter_homotopy", - py2c_padcon_dobldobl_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n double double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_initialize_parameter_homotopy", - py2c_padcon_quaddobl_initialize_parameter_homotopy, METH_VARARGS, - "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n quad double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_standard_solution", - py2c_padcon_initialize_standard_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n standard double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_dobldobl_solution", - py2c_padcon_initialize_dobldobl_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n double double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_initialize_quaddobl_solution", - py2c_padcon_initialize_quaddobl_solution, METH_VARARGS, - "Takes the solution with a given index in the solutions container in\n quad double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_predict_correct", - py2c_padcon_standard_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in standard double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_dobldobl_predict_correct", - py2c_padcon_dobldobl_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in double double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_quaddobl_predict_correct", - py2c_padcon_quaddobl_predict_correct, METH_VARARGS, - "Executes one predict-correct step on the current solution and\n the defined homotopy in quad double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_standard_solution", - py2c_padcon_get_standard_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in standard double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_dobldobl_solution", - py2c_padcon_get_dobldobl_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in double double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_get_quaddobl_solution", - py2c_padcon_get_quaddobl_solution, METH_VARARGS, - "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in quad double precision.\n If the verbose flag is 1, then extra output will be written."}, - {"py2c_padcon_standard_pole_radius", - py2c_padcon_standard_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in standard double precision."}, - {"py2c_padcon_dobldobl_pole_radius", - py2c_padcon_dobldobl_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in double double precision.\n The returned number is the high part of the double double number."}, - {"py2c_padcon_quaddobl_pole_radius", - py2c_padcon_quaddobl_pole_radius, METH_VARARGS, - "Returns the smallest pole radius computed\n by the predictor in quad double precision.\n The returned number is the highest part of the quad double number."}, - {"py2c_padcon_standard_closest_pole", - py2c_padcon_standard_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in standard double precision.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_dobldobl_closest_pole", - py2c_padcon_dobldobl_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in double double precision.\n The returned numbers are the high parts of the double doubles.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_quaddobl_closest_pole", - py2c_padcon_quaddobl_closest_pole, METH_VARARGS, - "Returns the complex number representation of the closest pole,\n computed by the predictor in quad double precision.\n The returned numbers are the highest parts of the quad doubles.\n Results are meaningful only if the real part >= 0.0."}, - {"py2c_padcon_standard_t_value", - py2c_padcon_standard_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in standard double precision."}, - {"py2c_padcon_dobldobl_t_value", - py2c_padcon_dobldobl_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in double double precision."}, - {"py2c_padcon_quaddobl_t_value", - py2c_padcon_quaddobl_t_value, METH_VARARGS, - "Returns the current t value of the path tracker\n which runs in quad double precision."}, - {"py2c_padcon_standard_step_size", - py2c_padcon_standard_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in standard double precision."}, - {"py2c_padcon_dobldobl_step_size", - py2c_padcon_dobldobl_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in double double precision."}, - {"py2c_padcon_quaddobl_step_size", - py2c_padcon_quaddobl_step_size, METH_VARARGS, - "Returns the current step size of the path tracker\n which runs in quad double precision."}, - {"py2c_padcon_standard_series_step", - py2c_padcon_standard_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_series_step", - py2c_padcon_dobldobl_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_series_step", - py2c_padcon_quaddobl_series_step, METH_VARARGS, - "Returns the current series step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_pole_step", - py2c_padcon_standard_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_pole_step", - py2c_padcon_dobldobl_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_pole_step", - py2c_padcon_quaddobl_pole_step, METH_VARARGS, - "Returns the current pole step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_estimated_distance", - py2c_padcon_standard_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_estimated_distance", - py2c_padcon_dobldobl_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_estimated_distance", - py2c_padcon_quaddobl_estimated_distance, METH_VARARGS, - "Returns the estimated distance to the closest solution by the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_hessian_step", - py2c_padcon_standard_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in standard double precision."}, - {"py2c_padcon_dobldobl_hessian_step", - py2c_padcon_dobldobl_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in double double precision."}, - {"py2c_padcon_quaddobl_hessian_step", - py2c_padcon_quaddobl_hessian_step, METH_VARARGS, - "Returns the current Hessian step size of the path tracker which runs in quad double precision."}, - {"py2c_padcon_standard_series_coefficient", - py2c_padcon_standard_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx,\n of the series computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_series_coefficient", - py2c_padcon_dobldobl_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_series_coefficient", - py2c_padcon_quaddobl_series_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_numerator_coefficient", - py2c_padcon_standard_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_numerator_coefficient", - py2c_padcon_dobldobl_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_numerator_coefficient", - py2c_padcon_quaddobl_numerator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_denominator_coefficient", - py2c_padcon_standard_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_denominator_coefficient", - py2c_padcon_dobldobl_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_quaddobl_denominator_coefficient", - py2c_padcon_quaddobl_denominator_coefficient, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the series\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_standard_pole", py2c_padcon_standard_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag."}, - {"py2c_padcon_dobldobl_pole", py2c_padcon_dobldobl_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the double doubles."}, - {"py2c_padcon_quaddobl_pole", py2c_padcon_quaddobl_pole, METH_VARARGS, - "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in quad double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the quad doubles."}, - {"py2c_padcon_clear_standard_data", - py2c_padcon_clear_standard_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in double precision."}, - {"py2c_padcon_clear_dobldobl_data", - py2c_padcon_clear_dobldobl_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in double double precision."}, - {"py2c_padcon_clear_quaddobl_data", - py2c_padcon_clear_quaddobl_data, METH_VARARGS, - "Deallocates data for the series-Pade tracker in quad double precision."}, - {"py2c_syspool_standard_init", py2c_syspool_standard_init, METH_VARARGS, - "Initializes the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_init", py2c_syspool_dobldobl_init, METH_VARARGS, - "Initializes the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_init", py2c_syspool_quaddobl_init, METH_VARARGS, - "Initializes the pool for systems in quad double precision."}, - {"py2c_syspool_standard_size", py2c_syspool_standard_size, METH_VARARGS, - "Returns the size of the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_size", py2c_syspool_dobldobl_size, METH_VARARGS, - "Returns the size of the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_size", py2c_syspool_quaddobl_size, METH_VARARGS, - "Returns the size of the pool for systems in quad double precision."}, - {"py2c_syspool_standard_create", - py2c_syspool_standard_create, METH_VARARGS, - "Defines the k-th system in the standard system pool,\n using the system in the standard container."}, - {"py2c_syspool_dobldobl_create", - py2c_syspool_dobldobl_create, METH_VARARGS, - "Defines the k-th system in the dobldobl system pool,\n using the system in the dobldobl container."}, - {"py2c_syspool_quaddobl_create", - py2c_syspool_quaddobl_create, METH_VARARGS, - "Defines the k-th system in the quaddobl system pool,\n using the system in the quaddobl container."}, - {"py2c_syspool_copy_to_standard_container", - py2c_syspool_copy_to_standard_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in standard double\n precision to the standard systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_copy_to_dobldobl_container", - py2c_syspool_copy_to_dobldobl_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in double double\n precision to the dobldobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_copy_to_quaddobl_container", - py2c_syspool_copy_to_quaddobl_container, METH_VARARGS, - "Copies the k-th system in the pool for systems in quad double\n precision to the quaddobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syspool_standard_clear", py2c_syspool_standard_clear, METH_VARARGS, - "Clears the pool for systems in standard double precision."}, - {"py2c_syspool_dobldobl_clear", py2c_syspool_dobldobl_clear, METH_VARARGS, - "Clears the pool for systems in double double precision."}, - {"py2c_syspool_quaddobl_clear", py2c_syspool_quaddobl_clear, METH_VARARGS, - "Clears the pool for systems in quad double precision."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_get_default_path_parameters", - py2c_get_default_path_parameters, METH_VARARGS, - "Given the working precision (16, 32, or 64), returns the default values\n of the path parameters, for the path trackers with algorithmic differentiation."}, - {"py2c_ade_manypaths_d_pars", - py2c_ade_manypaths_d_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_dd_pars", - py2c_ade_manypaths_dd_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_qd_pars", - py2c_ade_manypaths_qd_pars, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -static struct PyModuleDef phcpy2c3module = { - PyModuleDef_HEAD_INIT, - "phcpy2c3", - NULL, /* no module documentation */ - -1, - phcpy2c3_methods -}; - -PyMODINIT_FUNC -PyInit_phcpy2c3(void) -{ - return PyModule_Create(&phcpy2c3module); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2cadepath_d.cpp phcpack-2.4.85/src/Lib/phcpy2cadepath_d.cpp --- phcpack-2.4.84/src/Lib/phcpy2cadepath_d.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cadepath_d.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,5536 +0,0 @@ -/* This file phcpy2cpath_d.cpp contains the definitions of the prototypes - * in phcpy2cadepath_d.h, for compilation with the g++ compiler. */ - -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "scalers.h" -#include "witset.h" -#include "mapcon.h" -#include "next_track.h" -#include "structmember.h" -#include "adepath_d.h" - -extern void adainit ( void ); -extern void adafinal ( void ); - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -/* The wrapping functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -/* moving systems from and to containers */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) -{ - int fail,rc,nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_system(&rc,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nbtasks = 0; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; - fail = solve_Laurent_system(&rc,silent,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* wrapping functions in giftwrappers.h starts from here */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - nbr = support_size(); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; - fail = syscon_random_system(n,m,d,c); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free (exp); - free (c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in solcon.h starts from here */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_open_solution_input_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_dobldobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_quaddobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_multprec_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_dobldobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_quaddobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_multprec_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_standard_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_dobldobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_quaddobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_multprec_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_standard_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_dobldobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_quaddobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_multprec_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_standard_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_multprec_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_standard_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_dobldobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_quaddobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_multprec_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - - /* printf("Calling solcon_append_solution_string ...\n"); */ - - fail = solcon_append_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_dobldobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_quaddobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_multprec_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_dobldobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_quaddobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_multprec_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_standard_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_standard_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in product.h starts here */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = supporting_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 1024; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_structure_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = parse_set_structure(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ) -{ - int fail,result; - - initialize(); - if (!PyArg_ParseTuple(args,"i",&result)) return NULL; - fail = is_set_structure_supporting(&result); - - return Py_BuildValue("i",result); -} - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ) -{ - int fail,r; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = linear_product_root_count(&r); - - return Py_BuildValue("i",r); -} - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = random_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solve_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char partition[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); - - return Py_BuildValue("(i,s)",mbz,partition); -} - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_partition_Bezout_number(&mbz,ncp,partition); - - return Py_BuildValue("i",mbz); -} - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_homogeneous_start_system(ncp,partition); - - return Py_BuildValue("i",mbz); -} - -/* wrapping functions in celcon.h starts here */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = celcon_initialize_supports(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ) -{ - int fail,r,cnt; - char *strmix; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; - - cnt = itemcount(strmix); - { - int mix[cnt]; - - str2intlist(cnt,strmix,mix); - fail = celcon_set_type_of_mixture(r,mix); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) -{ - int fail,r,nbc; - int mix[64]; - char strmix[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = celcon_type_of_mixture(&r,mix); - nbc = intlist2str(r,mix,strmix); - - return Py_BuildValue("s",strmix); -} - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,cnt; - char *strpoint; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; - - cnt = itemcount(strpoint); - { - double point[cnt]; - - str2dbllist(cnt,strpoint,point); - fail = celcon_append_lifted_point(dim,ind,point); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,sup,ind,nbc; - char strpoint[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; - { - double liftedpoint[dim]; - - fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); - nbc = dbllist2str(dim,liftedpoint,strpoint); - } - - return Py_BuildValue("s",strpoint); -} - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ) -{ - int fail,mv; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_mixed_volume_of_supports(&mv); - - return Py_BuildValue("i",mv); -} - -static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) -{ - int fail,length; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_number_of_cells(&length); - - return Py_BuildValue("i",length); -} - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_dobldobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_quaddobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_dobldobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_quaddobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_dobldobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_quaddobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_dobldobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_quaddobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_clear_mixed_cell_configuration(); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) -{ - int d,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&d)) return NULL; - fail = embed_system(d); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_state_to_silent(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ) -{ - int n,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; - fail = define_output_file_with_string(n,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) -{ - int n,nbsols,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; - { - double x[2*n+5]; - int i,j,m; - - for(i=1; i<=nbsols; i++) - { - /* printf("... retrieving solution %d ...\n", i); */ - fail = solcon_retrieve_solution(n,i,&m,x); - /* printf("fail = %d, m = %d\n", fail, m); - printf("printing the coordinates : \n"); - for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ - m = i; - /* printf("... replacing solution %d ...\n", i); */ - fail = solcon_replace_solution(n,i,m,x); - /* printf("... done replacing solution solution %d ...\n", i); */ - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = initialize_sampler(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ) -{ - int n,d,k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; - fail = initialize_monodromy(n,d,k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = store_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = restore_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = track_paths(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = swap_slices(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) -{ - int k,n,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; - fail = new_slices(k,n); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ) -{ - int first,fail; - double r[2]; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&first)) return NULL; - - if(first == 1) /* determine constant coefficient */ - { - r[0] = -1.0; r[1] = 0.0; - } - else - { - r[0] = +1.0; r[1] = 0.0; - } - fail = assign_coefficient_of_slice(0,0,r); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) -{ - int n,i,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - - { - double re_gamma[n]; - double im_gamma[n]; - - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_irreducible_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_irreducible_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple - (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; -/* - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, - "Sets the state to monodromy permutations to silent."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_assign_labels", py2c_factor_assign_labels, - METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, - METH_VARARGS, - "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, - METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, - "Stores the solutions in the container to the data for monodromy loops."}, - {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, - METH_VARARGS, - "Restores the first initialized solutions from sampler to the container."}, - {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, - "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, - "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, - METH_VARARGS, - "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, - METH_VARARGS, - "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_components", py2c_factor_number_of_components, - METH_VARARGS, - "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, - {"py2c_factor_witness_points_of_component", - py2c_factor_witness_points_of_component, - METH_VARARGS, - "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, - METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, - METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, - {"py2c_start_diagonal_cascade_solutions", - py2c_start_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_littlewood_richardson_homotopies", - py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -PyMODINIT_FUNC initphcpy2c(void) -{ - Py_InitModule("phcpy2c", phcpy2c_methods); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2cadepath_d.h phcpack-2.4.85/src/Lib/phcpy2cadepath_d.h --- phcpack-2.4.84/src/Lib/phcpy2cadepath_d.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cadepath_d.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3129 +0,0 @@ -/* This file contains the prototypes for the py2c interface functions, - * linked with the double version of the Path library, for the host only. */ - -void initialize ( void ); -/* - * DESCRIPTION : - * Calls adainit(), initializing the interface to the Ada code, - * setting the initialized flag to one and the finalized flag to zero, - * if the initialized flag was zero. - * Nothing happens if the initialized flag equals one. */ - -void finalize ( void ); -/* - * DESCRIPTION : - * Calls adafinal(), finalizing the interface to the Ada code, - * setting the finalized flag to one and the initialized flag to zero, - * if the finalized flag was zero. - * Nothing happens if the finalized flag equals one. */ - -/* The wrapping of functions with prototypes in phcpack.h starts here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the version string of PHCpack. - * The version string is 40 characters long. */ - -static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the value of the integer given on input - * and sets the seed for the random number generators. - * This fixing of the seed enables reproducible runs. */ - -static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of the seed. - * Using this value in py2c_set_seed will ensure that the - * results of previous runs can be reproduced. */ - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to define the output file. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in standard double precision - * to screen or to the defined output file. */ - -/* Copying systems from and to containers. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the target system. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the target system. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the target system. */ - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the target system. */ - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the start system. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the start system. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the start system. */ - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the start system. */ - -/* Creation of homotopy and the tracking of all paths. */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in standard double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in double double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in quad double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in arbitrary multiprecision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start solutions in standard double precision either to - * the screen (standard output) or to the defined output file. - * On return is the failure code, which is zero if all is well. */ - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to tune the continuation parameters. */ - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Shows the current values of the continuation parameters. */ - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tunes the values of the continuation parameters. - * On input are two integers: - * 1) the difficulty level of the solution paths; and - * 2) the number of decimal places in the precision. */ - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to determine the level of output - * during the path tracking. */ - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in arbitrary multiprecision. - * On input is one integer: the number of decimal places in the precision. - * On return is the failure code, which is zero when all went well. */ - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the target solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the target solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the target solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the target solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the start solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the start solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the start solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the start solutions in arbitrary multiprecision. */ - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in standard double precision. - * One integer is expected on input: the number of tasks. - * If that number is zero, then no multitasking is applied. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard systems container. */ - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in standard double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; and - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard Laurent systems - * container. */ - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed volume, and the stable mixed volume as well if - * the input parameter equals 1. On return is the mixed volume, or - * a tuple with the mixed volume and the stable mixed volume. */ - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in standard double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in double double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in quad double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the system in - * the standard systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the system in - * the dobldobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the system in - * the quaddobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the system in - * the multprec systems container and to the solutions in the container. - * On input is an integer, the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the Laurent - * system in the standard Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the Laurent - * system in the dobldobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the Laurent - * system in the quaddobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the Laurent - * system in the multprec Laurent systems container and to the solutions - * in the container. - * On input is an integer: the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies Newton's method in variable precision. - * There are six input parameters: - * 1) the dimension: the number of variables and equations; - * 2) the accuracy, expressed as the correct number of decimal places; - * 3) the maximum number of iterations in Newton's method; - * 4) an upper bound on the number of decimal places in the precision; - * 5) a string, with the representation of the polynomials in the system. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in unisolvers.h starts here. */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with standard double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the standard systems container. After the call of this function, - * the standard solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with double double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the dobldobl systems container. After the call of this function, - * the dobldobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with quad double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the quaddobl systems container. After the call of this function, - * the quaddobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with arbitrary multiprecision arithmetic. - * On input are three numbers: - * 1) the number of decimal places in the working precision; - * 2) the maximum number of iterations in the method of Weierstrass; and - * 3) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the multprec systems container. After the call of this function, - * the multprec solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a planar point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * On return is the string representation of the vertex points, - * sorted so that each two consecutive points define an edge. */ - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * When the function returns, the internal data structures - * to store the convex hull are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of facets of the given dimension. - * On input is an integer, the dimension of the facet. */ - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a facet. - * On input are two integer numbers: - * 1) the dimension of the facet; - * 2) the index of the facet. */ - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension three. */ - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension four. */ - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation of - * the support of the first Laurent polynomial in the container. */ - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the support - * of a Laurent polynomial. */ - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the string representation of the support set - * that was stored internally by the call py2c_giftwrap_support_size. */ - -static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the Laurent systems container by its initial form. - * There are three input parameters: - * 1) the dimension, number of coordinates in the inner normal; - * 2) the number of characters in the string representation for the normal; - * 3) the string representation of the inner normal. - * On return is the failure code, which equals zero if all went well. */ - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in standard double precision. - * The system will be placed in the standard systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in standard double precision. - * The system will be placed in the standard Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in double double precision. - * The system will be placed in the dobldobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in double double precision. - * The system will be placed in the dobldobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in quad double precision. - * The system will be placed in the quaddobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in quad double precision. - * The system will be placed in the quaddobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in arbitrary multiprecision. The one input parameter is an integer, - * the number of decimal places in the working precision. - * The system will be placed in the multprec systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in arbitrary multiprecision. The one input parameter is - * an integer, the number of decimal places in the working precision. - * The system will be placed in the multprec Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in standard double precision. - * There are four integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]. */ - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with standard double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with standard double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with double double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with double double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with quad double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with quad double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with arbitrary multiprecision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with arbitrary multiprecision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of symbols in the symbol table. */ - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the symbols in the symbol table to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string that contains the symbols in the symbol table. - * The symbols are separate from each other by one space. */ - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Removes a symbol, given by name, from the symbol table. - * On input are two arguments: - * 1) an integer, as the number of characters in the name; - * 2) a string of characters with the name of the symbol. - * The failure code is returned, which equals zero when all went well. */ - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the symbol table. */ - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in standard - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in double - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in quad - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in arbitrary - * multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * standard double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * double double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * quad double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * arbitrary multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in standard double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in double double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in quad double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in arbitrary multiprecision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th polynomial stored in the - * container for systems with coefficients in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th Laurent polynomial stored - * in the container for Laurent polynomials systems with coefficients - * in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves one term of a polynomial with coefficients in standard - * double precision, that is stored in the systems container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns in d the total degree of the system with coefficients in - * standard double precision, as stored in the container. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syson_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in solcon.h starts here. */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in standard double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in double double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in quad double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in arbitrary multiprecision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in standard double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in double double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in quad double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in arbitrary multiprecision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in standard double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in double double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in quad double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in arbitrary multiprecision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for the name of the input file for the solutions and - * opens the input file. All subsequent reading happens from this input. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in standard double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in double double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in quad double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in arbitrary multiprecision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in standard double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in double double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in quad double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in arbitrary multiprecision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current standard solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current dobldobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current quaddobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current multprec solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in standard double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in arbitrary multiprecision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current standard double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current double double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current quad double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current arbitrary multiprecision solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current standard double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in standard double precision in the container. */ - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current double double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in double double precision in the container. */ - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current quad double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in quad double precision in the container. */ - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current multiprecision solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in arbitrary multiprecision in the container. */ - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in standard double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in double double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in quad double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in arbitrary multiprecision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in standard double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in double double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in quad double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in arbitrary multiprecision, - * as stored in the container. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions in product.h starts here. */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a supporting set structure for the system stored in the - * container with coefficients in standard double precision. */ - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the supporting set structure to screen. */ - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the set structure. */ - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Parses a given string into a set structure. - * On input are two parameters, one integer and one string: - * 1) the number of characters in the given string; and - * 2) the characters in the string. - * On return is the failure code, if zero, then the string - * has been parsed into a valid set structure. */ - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Checks whether the stored set structure is supporting - * for the system in the standard systems container. - * Returns an integer which represents true (1) or false (0). */ - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the linear-product root count, computed from - * the supporting set structure. */ - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a random linear-product system based on the - * stored set structure. On return is the failure code, - * which equals zero if all went well. */ - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes all solutions to the linear-product system - * and stores the solutions in the container for solutions - * in standard double precision. On return is the failure - * code, which equals zero if all went well. */ - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the set structure. */ - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system in the standard systems container, - * a heuristic partition of the set of variables may - * lead to a Bezout number that is smaller than the total degree. - * On return is the m-homogeneous Bezout number for the - * string representation of the partition that is returned - * as the second argument in the tuple. */ - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, computes - * the m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, constructs - * an m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -/* The wrapping of functions with prototypes in celcon.h starts here. */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_celcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string representation of a lifted point. - * On input are three integer numbers: - * 1) the number of coordinates in the lifted point; - * 2) the index to the support set; and - * 3) the index to the point in that support set. */ - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_celcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in standard double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in double double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in quad double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in standard double precision is copied - * from the cell container to the container for systems with - * coefficients in standard double precision. */ - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in double double precision is copied - * from the cell container to the container for systems with - * coefficients in double double precision. */ - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in quad double precision is copied - * from the cell container to the container for systems with - * coefficients in quad double precision. */ - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in standard double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in double double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in quad double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using standard double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in standard double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using double double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in double double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using quad double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in quad double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in standard double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in double double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in quad double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with standard double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with double double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with quad double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data in the cell container. */ - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the standard systems container, - * with standard double precision arithmetic. The system in the standard - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the dobldobl systems container, - * with double double precision arithmetic. The system in the dobldobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the quaddobl systems container, - * with quad double precision arithmetic. The system in the quaddobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard solutions container with - * the scaled solutions, scaled with standard double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the dobldobl solutions container with - * the scaled solutions, scaled with double double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quaddobl solutions container with - * the scaled solutions, scaled with quad double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in a the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in standard double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations to silent. */ - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the output file for the factorization. - * On input are an integer and a string: - * 1) the integer equals the number of characters in the string; and - * 2) the string contains the name of a file. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in standard double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set. - * On entry is the dimension or the number of hyperplanes - * to slide the positive dimensional solution set. */ - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container to the data for monodromy loops. */ - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions from sampler to the container. */ - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_permutation_after_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a solution set of degree d, computes the permutation using the - * solutions most recently stored, after a loop. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_update_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the current - * decomposition of the witness set. */ - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_witness_set_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container on - * return contain a witness set for the hypersurface defined by p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a polynomial, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_create_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. */ - -static PyObject *py2c_start_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_extrinsic_top_diagonal_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the start and target system to - * start the extrinsic cascade to intersect two witness sets, - * respectively of dimensions a and b, with ambient dimensions - * respectively equal to n1 and n2. - * There are four integers as parameters on input: n1, n2, a and b. */ - -static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of Pieri and Littlewood-Richardson homotopies, - * with prototypes in schubert.h starts here. */ - -static PyObject *py2c_schubert_pieri_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of p-plane producing curves of degree q - * that meet m*p + q*(m+p) given general m-planes. - * On input are three integer numbers: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; and - * 3) q, the degree of the curve that produces p-planes. - * The dimension of the ambient space of this Pieri problem is m+p. */ - -static PyObject *py2c_schubert_resolve_conditions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resolves a general Schubert intersection condition in n-space - * for k-planes subject to conditions defined by brackers. - * On return is the root count, the number of k-planes that satisfy - * the intersection conditions imposed by the brackets for general flags. - * On entry are five integers and one string: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c, the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen. */ - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space. - * The polynomial system that was solved is in the container for - * systems with coefficients in standard double precision and the - * corresponding solutions are in the standard solutions container. - * On entry are six integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen; - * 7) nbchar, the number of characters in the string filename; - * 8) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_localization_poset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the localization poset for the - * Pieri root count for m, p, and q. The input parameters are the - * integer values for m, p, and q: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the curves that produce p-planes. */ - -static PyObject *py2c_schubert_pieri_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. - * On return the systems container for systems with coefficients in standard - * double precision contains the polynomial system solved and in the - * solutions in standard double precision are in the solutions container. - * On entry are four integers and two strings: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, the string with m*p + q*(m+p) random complex input m-planes, - * where the real and imaginary parts are separated by a space; - * 6) pts, the string with m*p + q*(m+p) random complex interpolation - * points, only needed if q > 0. - * The function returns the combinatorial Pieri root count, - * which should equal the number of solutions in the container. */ - -static PyObject *py2c_schubert_osculating_planes - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of n real m-planes in - * d-space osculating a rational normal curve - * at the n points in s, where n = m*p + q*(m+p) and d = m+p. - * On entry are four integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string pts; and - * 5) pts, the string with m*p + q*(m+p) interpolation points. */ - -static PyObject *py2c_schubert_pieri_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Fills the container of systems with coefficients in standard - * double precision with a polynomial system that expresses the - * intersection conditions of a general Pieri problem. - * On input are five integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, m*p + q*(m+p) random complex input m-planes, where - * the real and imaginary parts are separated by a space; - * 6) a flag is_real: if == 1, then the coefficients of A are real, - * if == 0, then the coefficients of A are complex. - * Returns the failure code, which equals zero if all went well. */ - -/* The wrapping functions in mapcon.h starts here. */ - -static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the binomial system stored in the Laurent systems container. - * There is one input argument, either one or zero. - * If one, then only the pure top dimensional solutions are computed. - * If zero, then all solution sets are computed. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the maps stored in the container to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the maps stored in the container. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the top dimension of the maps in the container. */ - -static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of maps in the container. */ - -static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the dimension and index of a map, given as two integers as - * input parameters, returns the degree of that map. */ - -static PyObject *py2c_mapcon_coefficients_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the coefficients of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of complex doubles. */ - -static PyObject *py2c_mapcon_exponents_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the exponents of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of integers. */ - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using standard double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the standard systems container. */ - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using double double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the dobldobl systems container. */ - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using quad double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the quaddobl systems container. */ - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using arbitrary multiprecision arithmetic. - * There is are two integer numbers on input: - * 1) one to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used; and - * 2) the number of decimal places in the working precision. - * Before calling this routine the target and start system must - * be copied over from the multprec systems container. */ - -static PyObject *py2c_initialize_varprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the variable precision homotopy with the target and - * start system stored in the strings. - * On entry are three integers and two strings, in the following order: - * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant - * is used, if 0, a random value for gamma will be generated; - * 2) nc_target, the number of characters in the string target; - * 3) target, the string representation of the target system; - * 4) nc_start, the number of characters in the string start; - * 5) start, the string representation of the start system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the standard solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the dobldobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the quaddobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the multprec solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Uses the string representation of a solution to initialize the - * variable precision path tracker with. - * There are three input parameters, two integers and one string: - * 1) nv, the number of variables in the solution; - * 2) nc, the number of characters in the string sol; - * 3) sol, the string representation of a solution. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with standard double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the standard solutions container. - * The functions py2c_initialized_standard_tracker and - * py2c_initialize_standard_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with double double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the dobldobl solutions container. - * The functions py2c_initialized_dobldobl_tracker and - * py2c_initialize_dobldobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with quad double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the quaddobl solutions container. - * The functions py2c_initialized_quaddobl_tracker and - * py2c_initialize_quaddobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with arbitrary - * multiprecision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the multprec solutions container. - * The functions py2c_initialized_multprec_tracker and - * py2c_initialize_multprec_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on a solution path in variable precision. - * There are four integer input parameters: - * 1) the number of correct decimal places in the solution; - * 2) an upper bound on the number of decimal places in the precision; - * 3) the maximum number of Newton iterations; - * 4) a flag zero or one to indicate the verbose level. - * On return is a tuple: - * 0) the failure code, which equals zero if all went well; and - * 1) the string representation of the next solution on the path. */ - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the standard double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the double double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the quad double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the arbitrary multiprecision tracker - * with a generator. */ - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the variable precision tracker - * with a generator. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in double precision by the - * functions in adepath.h, starts here. */ - -static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Lib/phcpy2c.h phcpack-2.4.85/src/Lib/phcpy2c.h --- phcpack-2.4.84/src/Lib/phcpy2c.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2c.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,7230 +0,0 @@ -/* This file contains the prototypes for the py2c interface functions. */ - -void initialize ( void ); -/* - * DESCRIPTION : - * Calls adainit(), initializing the interface to the Ada code, - * setting the initialized flag to one and the finalized flag to zero, - * if the initialized flag was zero. - * Nothing happens if the initialized flag equals one. */ - -void finalize ( void ); -/* - * DESCRIPTION : - * Calls adafinal(), finalizing the interface to the Ada code, - * setting the finalized flag to one and the initialized flag to zero, - * if the finalized flag was zero. - * Nothing happens if the finalized flag equals one. */ - -static PyObject *py2c_corecount - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cores available for multithreading. */ - -/* The wrapping of functions with prototypes in phcpack.h starts here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the version string of PHCpack. - * The version string is 40 characters long. */ - -static PyObject *py2c_set_seed - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the value of the integer given on input - * and sets the seed for the random number generators. - * This fixing of the seed enables reproducible runs. */ - -static PyObject *py2c_get_seed - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of the seed. - * Using this value in py2c_set_seed will ensure that the - * results of previous runs can be reproduced. */ - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_define_output_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to define the output file. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in double double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in quad double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in double double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in double double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_read_standard_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the start system from file, - * in standard double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_standard_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start Laurent system in standard double precision. */ - -static PyObject *py2c_read_standard_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the target system from file, - * in standard double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_standard_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target Laurent system in standard double precision. */ - -static PyObject *py2c_read_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the start system from file, - * in double double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_dobldobl_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start Laurent system in double double precision. */ - -static PyObject *py2c_read_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the target system from file, - * in double double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_dobldobl_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target Laurent system in double double precision. */ - -static PyObject *py2c_read_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the start system from file, - * in quad double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_quaddobl_start_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start Laurent system in quad double precision. */ - -static PyObject *py2c_read_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name and reads the target system from file, - * in quad double precision. - * If available on file, also its solutions will be read and stored. */ - -static PyObject *py2c_write_quaddobl_target_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target Laurent system in quad double precision. */ - -/* copying systems from and to containers */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the target system. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the target system. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the target system. */ - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the target system. */ - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the start system. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the start system. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the start system. */ - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the start system. */ - -static PyObject *py2c_copy_standard_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in standard double precision - * from the container to the start system. */ - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in double double precision - * from the container to the start system. */ - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in quad double precision - * from the container to the start system. */ - -static PyObject *py2c_copy_standard_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in standard double precision - * from the container to the target system. */ - -static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in double double precision - * from the container to the target system. */ - -static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the Laurent system in quad double precision - * from the container to the target system. */ - -static PyObject *py2c_copy_standard_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start Laurent system in standard double precision - * to the systems container for Laurent systems. */ - -static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start Laurent system in double double precision - * to the systems container for Laurent systems. */ - -static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start Laurent system in quad double precision - * to the systems container for Laurent systems. */ - -static PyObject *py2c_copy_standard_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target Laurent system in standard double precision - * to the systems container for Laurent systems. */ - -static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target Laurent system in double double precision - * to the systems container for Laurent systems. */ - -static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target Laurent system in quad double precision - * to the systems container for Laurent systems. */ - -/* creation of homotopy and tracking of all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * On input are two doubles and one positive integer: - * (1) the real and imaginary part of the gamma constant; - * (2) the power of t in the homotopy. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * On input are two doubles and one positive integer: - * (1) the real and imaginary part of the gamma constant; - * (2) the power of t in the homotopy. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * On input are two doubles and one positive integer: - * (1) the real and imaginary part of the gamma constant; - * (2) the power of t in the homotopy. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * On input are two doubles and one positive integer: - * (1) the real and imaginary part of the gamma constant; - * (2) the power of t in the homotopy. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in standard double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in double double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in quad double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in arbitrary multiprecision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_write_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start solutions in standard double precision either to - * the screen (standard output) or to the defined output file. - * On return is the failure code, which is zero if all is well. */ - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to tune the continuation parameters. */ - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Shows the current values of the continuation parameters. */ - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tunes the values of the continuation parameters. - * On input are two integers: - * 1) the difficulty level of the solution paths; and - * 2) the number of decimal places in the precision. */ - -static PyObject *py2c_get_value_of_continuation_parameter - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of a continuation parameter. - * On input is an index of a continuation parameter, in the range 1..34, - * on return is the current value of that continuation parameter. */ - -static PyObject *py2c_set_value_of_continuation_parameter - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the value of a continuation parameter. - * On input is an index of a continuation parameter, in the range 1..34, - * and the new value for the corresponding continuation parameter. */ - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to determine the level of output - * during the path tracking. */ - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in arbitrary multiprecision. - * On input is one integer: the number of decimal places in the precision. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision - * to solve a Laurent system stored in the systems container, - * starting at the solutions of a stored Laurent start system. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision - * to solve a Laurent system stored in the systems container, - * starting at the solutions of a stored Laurent start system. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision - * to solve a Laurent system stored in the systems container, - * starting at the solutions of a stored Laurent start system. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_clear_standard_operations_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates all data used by solve_by_standard_homotopy_continuation. */ - -static PyObject *py2c_clear_dobldobl_operations_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates all data used by solve_by_dobldobl_homotopy_continuation. */ - -static PyObject *py2c_clear_quaddobl_operations_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates all data used by solve_by_quaddobl_homotopy_continuation. */ - -static PyObject *py2c_clear_standard_Laurent_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data used to solve Laurent systems by homotopy - * continuation in standard double precision. */ - -static PyObject *py2c_clear_dobldobl_Laurent_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data used to solve Laurent systems by homotopy - * continuation in double double precision. */ - -static PyObject *py2c_clear_quaddobl_Laurent_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data used to solve Laurent systems by homotopy - * continuation in quad double precision. */ - -/* Wrapping of crude path trackers of the jumpstart library starts here. */ - -static PyObject *py2c_standard_crude_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * A crude tracker appends the end point of a path directly to - * the solutions container, without refinement or postprocessing. - * Tracking happens in standard double precision. - * On entry is the verbose parameter which is 1 or 0. - * If 1, then the solution vectors are written to screen, otherwise - * the crude tracker stays mute. - * On return is the failure code, which is zero when all went well. - * - * REQUIRED : - * The target system, start system, and start solutions in standard - * double precision have been initialized in the containers. */ - -static PyObject *py2c_dobldobl_crude_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * A crude tracker appends the end point of a path directly to - * the solutions container, without refinement or postprocessing. - * Tracking happens in double double precision. - * On entry is the verbose parameter which is 1 or 0. - * If 1, then the solution vectors are written to screen, otherwise - * the crude tracker stays mute. - * On return is the failure code, which is zero when all went well. - * - * REQUIRED : - * The target system, start system, and start solutions in double - * double precision have been initialized in the containers. */ - -static PyObject *py2c_quaddobl_crude_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * A crude tracker appends the end point of a path directly to - * the solutions container, without refinement or postprocessing. - * Tracking happens in quad double precision. - * On entry is the verbose parameter which is 1 or 0. - * If 1, then the solution vectors are written to screen, otherwise - * the crude tracker stays mute. - * On return is the failure code, which is zero when all went well. - * - * REQUIRED : - * The target system, start system, and start solutions in quad - * double precision have been initialized in the containers. */ - -/* The wrapping of copying solutions from and to containers starts here. */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the target solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the target solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the target solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the target solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the start solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the start solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the start solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the start solutions in arbitrary multiprecision. */ - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in standard double precision. - * Three integers are expected on input: (1) silent or not (0 or 1); - * (2) the number of tasks, if 0, then no multitasking; and - * (3) the verbose level. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard systems container. */ - -static PyObject *py2c_scan_for_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given on input are two arguments: a number and a string. - * The string holds the string representation of a polynomial system, - * where each polynomial is terminated by a semi colon. - * The first argument on input is the number of characters in the string. - * On return is the number of symbols used as variables in the system. - * This function helps to determine whether a system is square or not. */ - -static PyObject *py2c_solve_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in double double precision. - * Three integers are expected on input: (1) silent or not (0 or 1); - * (2) the number of tasks, if 0, the no multitasking; and - * (3) the verbose level. - * On return, the container for solutions in double double precision - * contains the solutions to the system in the dobldobl systems container. */ - -static PyObject *py2c_solve_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in quad double precision. - * Three integers are expected on input: (1) silent or not (0 or 1); - * (2) the number of tasks, if 0, then no multitasking; and - * (3) the verbose level. - * On return, the container for solutions in quad double precision - * contains the solutions to the system in the quaddobl systems container. */ - -static PyObject *py2c_solve_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in standard double precision. - * Three integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run; and - * 3) the verbose level. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard Laurent systems - * container. */ - -static PyObject *py2c_solve_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in double double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run; and - * 3) the verbose level. - * On return, the container for solutions in double double precision - * contains the solutions to the system in the dobldobl Laurent systems - * container. */ - -static PyObject *py2c_solve_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in quad double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run; and - * 3) the verbose level. - * On return, the container for solutions in quad double precision - * contains the solutions to the system in the quaddobl Laurent systems - * container. */ - -static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constant for later retrieval. - * Four parameters are expected on input, two doubles and two integers. - * The two doubles are the real and imaginary parts of the gamma. - * The two integers are the precision, 1, 2, or 4, respectively for - * double, double double, or quad double; and the verbose level. */ - -static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the gamma constant used by the solve functions. - * Two integer parameters are expected on input: - * (1) for the precision, 1, 2, or 4, respectively for double, - * double double, or quad double precision; and - * (2) the verbose level. - * The function returns a tuple of two doubles, - * for the real and imaginary part of the gamma constant. */ - -static PyObject *py2c_mixed_volume - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed volume, and the stable mixed volume as well if - * the input parameter equals 1. On return is the mixed volume, or - * a tuple with the mixed volume and the stable mixed volume. - * The Ada translation of the MixedVol algorithm is applied. - * The system in the standard systems container is considered first - * and if that container is empty, then the system in the standard - * Laurent systems container is taken as input. - * A regular mixed-cell configuration is in the cells container. */ - -static PyObject *py2c_mixed_volume_by_demics - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls DEMiCs to compute the mixed volume of the system in the - * standard systems container. If the standard systems container - * is empty, then the system in the standard Laurent systems - * container is taken as input. Returns the mixed volume. - * A regular mixed-cell configuration is in the cells container. - * The above is for the case if the input parameter equals 0. - * If the input parameter equals 1, then on return is a tuple, - * which contains the mixed volume and the stable mixed volume. */ - -static PyObject *py2c_standard_deflate - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in standard double precision to the system and - * the solutions stored in the containers. - * There are five parameters, two integers and three doubles: - * 1) the maximum number of iterations per root, - * 2) the maximum number of deflations per root, - * 3) tolerance on the error of each root, - * 4) tolerance on the residual of each root, - * 5) tolerance on the numerical rank of the Jacobians at each root. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_deflate - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in double double precision to the system and - * the solutions stored in the containers. - * There are five parameters, two integers and three doubles: - * 1) the maximum number of iterations per root, - * 2) the maximum number of deflations per root, - * 3) tolerance on the error of each root, - * 4) tolerance on the residual of each root, - * 5) tolerance on the numerical rank of the Jacobians at each root. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_deflate - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in quad double precision to the system and - * the solutions stored in the containers. - * There are five parameters, two integers and three doubles: - * 1) the maximum number of iterations per root, - * 2) the maximum number of deflations per root, - * 3) tolerance on the error of each root, - * 4) tolerance on the residual of each root, - * 5) tolerance on the numerical rank of the Jacobians at each root. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the system in - * the standard systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the system in - * the dobldobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the system in - * the quaddobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the system in - * the multprec systems container and to the solutions in the container. - * On input is an integer, the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the Laurent - * system in the standard Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the Laurent - * system in the dobldobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the Laurent - * system in the quaddobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the Laurent - * system in the multprec Laurent systems container and to the solutions - * in the container. - * On input is an integer: the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies Newton's method in variable precision. - * There are six input parameters: - * 1) the dimension: the number of variables and equations; - * 2) the accuracy, expressed as the correct number of decimal places; - * 3) the maximum number of iterations in Newton's method; - * 4) an upper bound on the number of decimal places in the precision; - * 5) a string, with the representation of the polynomials in the system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_condition_report - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system and solutions in the containers in double precision, - * computes a condition report. On input are the following: - * 1) maximum number of Newton iterations per solution; - * 2) tolerance on the residual; - * 3) tolerance on the forward error; - * 4) tolerance on the inverse condition number for singularities; - * 5) a string with the name of the output file, - * this string may be empty if no output to file is needed; - * 6) a verbose flag, either 1 or 0. - * On return are the counts of number of solutions that are - * regular, singular, real, complex, clustered, or failures; - * along with the frequency tables for the forward errors, - * residuals and estimates for the inverse condition numbers. */ - -/* The wrapping of functions with prototypes in unisolvers.h starts here. */ - -static PyObject *py2c_usolve_standard - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with standard double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the standard systems container. After the call of this function, - * the standard solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_dobldobl - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with double double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the dobldobl systems container. After the call of this function, - * the dobldobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_quaddobl - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with quad double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the quaddobl systems container. After the call of this function, - * the quaddobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_multprec - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with arbitrary multiprecision arithmetic. - * On input are three numbers: - * 1) the number of decimal places in the working precision; - * 2) the maximum number of iterations in the method of Weierstrass; and - * 3) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the multprec systems container. After the call of this function, - * the multprec solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ - -static PyObject *py2c_giftwrap_planar - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a planar point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * On return is the string representation of the vertex points, - * sorted so that each two consecutive points define an edge. */ - -static PyObject *py2c_giftwrap_convex_hull - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * When the function returns, the internal data structures - * to store the convex hull are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of facets of the given dimension. - * On input is an integer, the dimension of the facet. */ - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a facet. - * On input are two integer numbers: - * 1) the dimension of the facet; - * 2) the index of the facet. */ - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension three. */ - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension four. */ - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation of - * the support of the k-th Laurent polynomial in the container. - * The index k is given on input as an integer between 1 - * and the number of Laurent polynomials. */ - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the support - * of a Laurent polynomial. */ - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the string representation of the support set - * that was stored internally by the call py2c_giftwrap_support_size. */ - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the Laurent systems container by its initial form. - * There are three input parameters: - * 1) the dimension, number of coordinates in the inner normal; - * 2) the number of characters in the string representation for the normal; - * 3) the string representation of the inner normal. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in standard double precision. - * The system will be placed in the standard systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in standard double precision. - * The system will be placed in the standard Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in double double precision. - * The system will be placed in the dobldobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in double double precision. - * The system will be placed in the dobldobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in quad double precision. - * The system will be placed in the quaddobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in quad double precision. - * The system will be placed in the quaddobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in arbitrary multiprecision. The one input parameter is an integer, - * the number of decimal places in the working precision. - * The system will be placed in the multprec systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in arbitrary multiprecision. The one input parameter is - * an integer, the number of decimal places in the working precision. - * The system will be placed in the multprec Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_random_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in standard double precision. - * There are five integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]; - * 5) neq, the number of equations. */ - -static PyObject *py2c_syscon_dobldobl_random_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in double double precision. - * There are five integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]; - * 5) neq, the number of equations. */ - -static PyObject *py2c_syscon_quaddobl_random_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in double double precision. - * There are five integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]; - * 5) neq, the number of equations. */ - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with standard double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with standard double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with double double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with double double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with quad double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with quad double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with arbitrary multiprecision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with arbitrary multiprecision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of symbols in the symbol table. */ - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the symbols in the symbol table to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string that contains the symbols in the symbol table. - * The symbols are separate from each other by one space. */ - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Removes a symbol, given by name, from the symbol table. - * On input are two arguments: - * 1) an integer, as the number of characters in the name; - * 2) a string of characters with the name of the symbol. - * The failure code is returned, which equals zero when all went well. */ - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the symbol table. */ - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in standard - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in double - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in quad - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in arbitrary - * multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * standard double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * double double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * quad double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * arbitrary multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in standard double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in double double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in quad double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in arbitrary multiprecision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th polynomial stored in the - * container for systems with coefficients in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th Laurent polynomial stored - * in the container for Laurent polynomials systems with coefficients - * in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_retrieve_term - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves one term of a polynomial with coefficients in standard - * double precision, that is stored in the systems container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_total_degree - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns in d the total degree of the system with coefficients in - * standard double precision, as stored in the container. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the standard double precision container - * with the same Laurent system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the standard double precision container - * with the same Laurent system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the double double precision container - * with the same Laurent system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the double double precision container - * with the same Laurent system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the quad double precision container - * with the same Laurent system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system in the quad double precision container - * with the same Laurent system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_standard_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with its transformation in 1-homogeneous coordinates. - * There is one integer on input. - * If 0, then a random linear equation is added, - * otherwise, the linear equation z0 - 1 = 0 is added, - * where z0 is the extra homogeneous coordinate. */ - -static PyObject *py2c_syscon_dobldobl_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with its transformation in 1-homogeneous coordinates. - * There is one integer on input. - * If 0, then a random linear equation is added, - * otherwise, the linear equation z0 - 1 = 0 is added, - * where z0 is the extra homogeneous coordinate. */ - -static PyObject *py2c_syscon_quaddobl_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with its transformation in 1-homogeneous coordinates. - * There is one integer on input. - * If 0, then a random linear equation is added, - * otherwise, the linear equation z0 - 1 = 0 is added, - * where z0 is the extra homogeneous coordinate. */ - -static PyObject *py2c_syscon_add_symbol - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Adds a symbol to the table, with name given in the string, - * where the number of characters in the name equals the first - * integer argument. The second input parameter is the string. - * This symbol represents the last variable added in the homogeneous - * coordinate transformation. */ - -static PyObject *py2c_syscon_standard_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * by its transformation to affine coordinates, substituting the - * value of the last coordinate by one and removing the last equation. */ - -static PyObject *py2c_syscon_dobldobl_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * by its transformation to affine coordinates, substituting the - * value of the last coordinate by one and removing the last equation. */ - -static PyObject *py2c_syscon_quaddobl_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * by its transformation to affine coordinates, substituting the - * value of the last coordinate by one and removing the last equation. */ - -/* The wrapping of the functions in tabform.h starts from here */ - -static PyObject *py2c_tabform_store_standard_tableau - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the tableau form of a polynomial system, given by - * 1) the number of equations as an integer, - * 2) the number of equations as an integer, - * 3) the number of characters in the 4-th string input, - * 4) the number of terms in each polynomial, given as a string, - * the string representation of a list of integers, - * 5) the number of characters in the 6-th string input, - * 6) the coefficients of all terms, given as a string, - * the string representation of a list of doubles, - * each pair of consecutive doubles represents a complex coefficient, - * 7) the number of characters in the 7-th string input, - * 8) the exponents of all terms, given as a string, - * the string representation of a list of integers, - * 9) the verbose flag is an integer. - * The tableau form is parsed and the container for systems with - * standard double precision coefficients is initialized. */ - -static PyObject *py2c_tabform_load_standard_tableau - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a 5-tuple with the tableau form of the system with - * standard double precision coefficients in the container. - * On input is the verbose flag as an integer. - * The five items in the returned tuple are - * 1) the number of equations as an integer, - * 2) the number of equations as an integer, - * 3) the number of terms in each polynomial, given as a string, - * the string representation of a list of integers, - * 4) the coefficients of all terms, given as a string, - * the string representation of a list of doubles, - * each pair of consecutive doubles represents a complex coefficient, - * 5) the exponents of all terms, given as a string, - * the string representation of a list of integers. */ - -/* The wrapping of functions with prototypes in solcon.h starts here. */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in standard double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_standard_solutions_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a solution list to be parsed in standard double precision. - * Solutions are read from file and stored in the container for - * double precision solutions. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in double double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a solution list to be parsed in double double precision. - * Solutions are read from file and stored in the container for - * double double precision solutions. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in quad double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a solution list to be parsed in quad double precision. - * Solutions are read from file and stored in the container for - * quad double precision solutions. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in arbitrary multiprecision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in standard double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in double double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in quad double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in arbitrary multiprecision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in standard double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in double double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in quad double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in arbitrary multiprecision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for the name of the input file for the solutions and - * opens the input file. All subsequent reading happens from this input. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in standard double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in double double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in quad double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in arbitrary multiprecision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in standard double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in double double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in quad double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in arbitrary multiprecision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current standard solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current dobldobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current quaddobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current multprec solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in standard double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in arbitrary multiprecision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current standard double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current double double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current quad double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current arbitrary multiprecision solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current standard double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in standard double precision in the container. */ - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current double double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in double double precision in the container. */ - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current quad double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in quad double precision in the container. */ - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current multiprecision solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in arbitrary multiprecision in the container. */ - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in standard double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in double double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in quad double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in arbitrary multiprecision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in standard double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in double double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in quad double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in arbitrary multiprecision, - * as stored in the container. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Add one extra coordinate one to every solution in the container - * for solutions in standard double precision. */ - -static PyObject *py2c_solcon_dobldobl_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Add one extra coordinate one to every solution in the container - * for solutions in double double precision. */ - -static PyObject *py2c_solcon_quaddobl_one_homogenization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Add one extra coordinate one to every solution in the container - * for solutions in double double precision. */ - -static PyObject *py2c_solcon_standard_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Divides every coordinate by the last coordinate of every solution - * in the container for solutions in standard double precision. */ - -static PyObject *py2c_solcon_dobldobl_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Divides every coordinate by the last coordinate of every solution - * in the container for solutions in double double precision. */ - -static PyObject *py2c_solcon_quaddobl_one_affinization - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Divides every coordinate by the last coordinate of every solution - * in the container for solutions in quad double precision. */ - -/* The wrapping of the functions in product.h starts here. */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a supporting set structure for the system stored in the - * container with coefficients in standard double precision. */ - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the supporting set structure to screen. */ - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the set structure. */ - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Parses a given string into a set structure. - * On input are two parameters, one integer and one string: - * 1) the number of characters in the given string; and - * 2) the characters in the string. - * On return is the failure code, if zero, then the string - * has been parsed into a valid set structure. */ - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Checks whether the stored set structure is supporting - * for the system in the standard systems container. - * Returns an integer which represents true (1) or false (0). */ - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the linear-product root count, computed from - * the supporting set structure. */ - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a random linear-product system based on the - * stored set structure. On return is the failure code, - * which equals zero if all went well. */ - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes all solutions to the linear-product system - * and stores the solutions in the container for solutions - * in standard double precision. On return is the failure - * code, which equals zero if all went well. */ - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the set structure. */ - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system in the standard systems container, - * a heuristic partition of the set of variables may - * lead to a Bezout number that is smaller than the total degree. - * On return is the m-homogeneous Bezout number for the - * string representation of the partition that is returned - * as the second argument in the tuple. */ - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, computes - * the m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, constructs - * an m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -/* The wrapping of the functions with prototypes in celcon.h starts here. */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_celcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string representation of a lifted point. - * On input are three integer numbers: - * 1) the number of coordinates in the lifted point; - * 2) the index to the support set; and - * 3) the index to the point in that support set. */ - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_celcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_celcon_is_stable ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns 1 if the stable mixed cells were stored, returns 0 otherwise. */ - -static PyObject *py2c_celcon_number_of_original_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of original cells, without artificial original. */ - -static PyObject *py2c_celcon_number_of_stable_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of stable cells. */ - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in standard double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in double double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in quad double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in standard double precision is copied - * from the cell container to the container for systems with - * coefficients in standard double precision. */ - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in double double precision is copied - * from the cell container to the container for systems with - * coefficients in double double precision. */ - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in quad double precision is copied - * from the cell container to the container for systems with - * coefficients in quad double precision. */ - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in standard double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in double double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in quad double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_stable_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th stable mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th stable mixed cell. */ - -static PyObject *py2c_celcon_solve_stable_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th stable mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th stable mixed cell. */ - -static PyObject *py2c_celcon_solve_stable_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th stable mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th stable mixed cell. */ - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using standard double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in standard double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using double double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in double double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using quad double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in quad double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in standard double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in double double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in quad double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with standard double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with double double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with quad double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data in the cell container. */ - -/* The wrapping of functions with prototypes in intcelcon.h follows. */ - -static PyObject *py2c_intcelcon_read_mixed_cell_configuration - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for a file name, reads a mixed-cell configuration, - * which is then stored in the container. */ - -static PyObject *py2c_intcelcon_write_mixed_cell_configuration - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the mixed-cell configuration in the container to screen. */ - -static PyObject *py2c_intcelcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_intcelcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_intcelcon_length_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a list of integers where - * each integer contains the number of points in a support. */ - -static PyObject *py2c_intcelcon_get_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are three integer numbers: n, i, j, where n is the - * length of a lifted point, i is the index of a support, and - * j is the index of a point. Note that both i and j start at - * one instead of at zero. Returns the string representation of - * the n coordinates of the j-th point in the i-th lifted support. */ - -static PyObject *py2c_intcelcon_get_inner_normal - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given on input the dimension of the lifted points and the - * index of the mixed cell of interest, returns the string - * representation of the inner normal of the mixed cell. */ - -static PyObject *py2c_intcelcon_number_of_points_in_cell - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given is the index to a cell, starting the count at one. - * The second integer on input is the number of distinct supports. - * On return is the string representation of the number of points - * which span each component of the mixed cell. */ - -static PyObject *py2c_intcelcon_get_point_in_cell - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the n coordinates of - * the k-th point from the j-th list of the i-th cell. - * On input are the four integers: n, i, j, k, respectively - * the length of the lifted vectors in the supports, - * the index to a cell in the container, - * the index to a support of the i-th cell, and - * the index to a point in the j-th support of the i-th cell. */ - -static PyObject *py2c_intcelcon_mixed_volume - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_intcelcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_intcelcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_intcelcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_intcelcon_make_subdivision - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed cells for the lifted points stored in the - * container, with respect to the defined type of mixture. */ - -static PyObject *py2c_intcelcon_clear_mixed_cell_configuration - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the cells container. */ - -/* The wrapping of functions with prototypes in scalers.h starts from here. */ - -static PyObject *py2c_scale_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the standard systems container, - * with standard double precision arithmetic. The system in the standard - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the dobldobl systems container, - * with double double precision arithmetic. The system in the dobldobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the quaddobl systems container, - * with quad double precision arithmetic. The system in the quaddobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard solutions container with - * the scaled solutions, scaled with standard double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the dobldobl solutions container with - * the scaled solutions, scaled with double double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quaddobl solutions container with - * the scaled solutions, scaled with quad double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in a the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -/* The wrapping of functions with prototypes in reducers.h starts here. */ - -static PyObject *py2c_linear_reduce_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies linear reduction on the coefficient matrix of the system - * in the container for standard double precision. - * There is one integer parameter: whether to diagonalize or not. */ - -static PyObject *py2c_linear_reduce_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies linear reduction on the coefficient matrix of the system - * in the container for double double precision. - * There is one integer parameter: whether to diagonalize or not. */ - -static PyObject *py2c_linear_reduce_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies linear reduction on the coefficient matrix of the system - * in the container for quad double precision. - * There is one integer parameter: whether to diagonalize or not. */ - -static PyObject *py2c_nonlinear_reduce_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies nonlinear reduction on the system in the container - * for standard double precision. - * Three integer numbers are expected on input: - * (1) the maximum number of equal degree replacements, - * (2) the maximum number of computed S-polynomials, - * (3) the maximum number of computed R-polynomials. - * The system in the standard container is replace by the reduced system. - * Three numbers are returned: - * (1) the number of equal degree replacements, - * (2) the number of computed S-polynomials, - * (3) the number of computed R-polynomials. */ - -/* The wrapping of the functions with prototypes in sweep.h starts here. */ - -static PyObject *py2c_sweep_define_parameters_numerically - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the indices to the variables that serve as parameters - * numerically, that is: via integer indices. - * On entry are three integer numbers and a string. - * The string is a string representation of a Python list of integers, - * The three integers are the number of equations, the number of variables, - * and the number of parameters. The number of variables m includes the - * number of parameters. Then there should be as many as m indices in - * the list of integers to define which of the variables are parameters. */ - -static PyObject *py2c_sweep_define_parameters_symbolically - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the indices to the variables that serve as parameters - * symbolically, that is, as names of variables. - * For this to work, the symbol table must be initialized. - * On entry are four integer numbers and a string. - * The four integers are the number of equations, the number of variables, - * the number of parameters (the number of variables m includes the - * number of parameters), and the number of characters in the string. - * The string contains the names of the parameters, separated by one comma. - * For this to work, the symbol table must be initialized, e.g.: - * via the reading of a polynomial system. */ - -static PyObject *py2c_sweep_get_number_of_equations - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of equations. */ - -static PyObject *py2c_sweep_get_number_of_variables - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of variables. */ - -static PyObject *py2c_sweep_get_number_of_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of parameters. */ - -static PyObject *py2c_sweep_get_indices_numerically - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the indices of the variables that are parameters, - * as the string representation of a Python list of integers. */ - -static PyObject *py2c_sweep_get_indices_symbolically - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string with the names of the parameters, - * each separated by one space. */ - -static PyObject *py2c_sweep_clear_definitions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the definitions of the parameters. */ - -static PyObject *py2c_sweep_set_standard_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the start values for the m parameters in standard double precision, - * giving on input an integer m and 2*m doubles, with the consecutive - * real and imaginary parts for the start values of all m parameters. - * The doubles are given in a string representation of a Python - * list of doubles. */ - -static PyObject *py2c_sweep_set_standard_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the target values for the m parameters in standard double precision, - * giving on input an integer m and 2*m doubles, with the consecutive - * real and imaginary parts for the target values of all m parameters. */ - -static PyObject *py2c_sweep_set_dobldobl_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the start values for the m parameters in double double precision, - * giving on input an integer m and 4*m doubles, with the consecutive - * real and imaginary parts for the start values of all m parameters. */ - -static PyObject *py2c_sweep_set_dobldobl_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the target values for the m parameters in double double precision, - * giving on input an integer m and 4*m doubles, with the consecutive - * real and imaginary parts for the target values of all m parameters. */ - -static PyObject *py2c_sweep_set_quaddobl_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the start values for the m parameters in quad double precision, - * giving on input an integer m and 8*m doubles, with the consecutive - * real and imaginary parts for the start values of all m parameters. */ - -static PyObject *py2c_sweep_set_quaddobl_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the target values for the m parameters in quad double precision, - * giving on input an integer m and 8*m doubles, with the consecutive - * real and imaginary parts for the target values of all m parameters. */ - -static PyObject *py2c_sweep_get_standard_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Gets the start values for the parameters in standard double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the start values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_get_standard_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Gets the target values for the parameters in standard double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the target values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_get_dobldobl_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Gets the start values for the parameters in double double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the start values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_get_dobldobl_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Gets the target values for the parameters in double double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the target values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_get_quaddobl_start - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Gets the start values for the parameters in quad double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the start values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_get_quaddobl_target - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the target values for the parameters in quad double precision, - * giving on input the number n of doubles that need to be returned. - * On return will be n doubles, for the consecutive real and imaginary - * parts for the target values of all parameters, - * stored in the string representation of a Python list of doubles. */ - -static PyObject *py2c_sweep_standard_complex_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Starts the trackers in a complex convex parameter homotopy, - * in standard double precision, where the indices to the parameters, - * start and target values are already defined. Moreover, the containers - * of systems and solutions in standard double precision have been - * initialized with a parametric systems and start solutions. - * The first input parameter is 0, 1, or 2, for respectively - * a randomly generated gamma (0), or no gamma (1), or a user given - * gamma with real and imaginary parts given in 2 pointers to doubles. */ - -static PyObject *py2c_sweep_dobldobl_complex_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Starts the trackers in a complex convex parameter homotopy, - * in double double precision, where the indices to the parameters, - * start and target values are already defined. Moreover, the containers - * of systems and solutions in double double precision have been - * initialized with a parametric systems and start solutions. - * The first input parameter is 0, 1, or 2, for respectively - * a randomly generated gamma (0), or no gamma (1), or a user given - * gamma with real and imaginary parts given in 2 pointers to doubles. */ - -static PyObject *py2c_sweep_quaddobl_complex_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Starts the trackers in a complex convex parameter homotopy, - * in quad double precision, where the indices to the parameters, - * start and target values are already defined. Moreover, the containers - * of systems and solutions in quad double precision have been - * initialized with a parametric systems and start solutions. - * The first input parameter is 0, 1, or 2, for respectively - * a randomly generated gamma (0), or no gamma (1), or a user given - * gamma with real and imaginary parts given in 2 pointers to doubles. */ - -static PyObject *py2c_sweep_standard_real_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There are no input arguments to this routine. - * Starts a sweep with a natural parameter in a family of n equations - * in n+1 variables, where the last variable is the artificial parameter s - * that moves the one natural parameter from a start to target value. - * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), - * where A is the natural parameter, going from the start value v[0] - * to the target value v[1]. - * This family must be stored in the systems container in standard double - * precision and the corresponding start solutions in the standard solutions - * container, where every solution has the value v[0] for the A variable. - * The sweep stops when s reaches the value v[1], or when a singularity - * is encountered on the path. */ - -static PyObject *py2c_sweep_dobldobl_real_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There are no input arguments to this routine. - * Starts a sweep with a natural parameter in a family of n equations - * in n+1 variables, where the last variable is the artificial parameter s - * that moves the one natural parameter from a start to target value. - * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), - * where A is the natural parameter, going from the start value v[0] - * to the target value v[1]. - * This family must be stored in the systems container in double double - * precision and the corresponding start solutions in the dobldobl solutions - * container, where every solution has the value v[0] for the A variable. - * The sweep stops when s reaches the value v[1], or when a singularity - * is encountered on the path. */ - -static PyObject *py2c_sweep_quaddobl_real_run - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There are no input arguments to this routine. - * Starts a sweep with a natural parameter in a family of n equations - * in n+1 variables, where the last variable is the artificial parameter s - * that moves the one natural parameter from a start to target value. - * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), - * where A is the natural parameter, going from the start value v[0] - * to the target value v[1]. - * This family must be stored in the systems container in quad double - * precision and the corresponding start solutions in the quaddobl solutions - * container, where every solution has the value v[0] for the A variable. - * The sweep stops when s reaches the value v[1], or when a singularity - * is encountered on the path. */ - -/* The wrapping for the multiplicity structure starts here. */ - -static PyObject *py2c_standard_multiplicity_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the multiplicity structure in standard double precision. - * Required is the presence of a polynomial system in the standard - * systems container and a solution in the standard solutions container. - * The input parameters are two integers and one double: - * order : the maximum differentiation order, - * verbose : 1 for verbose, 0 for silent, and - * tol : tolerance on the numerical rank. - * On return is a tuple: the multiplicity and the values - * of the Hilbert function. */ - -static PyObject *py2c_dobldobl_multiplicity_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the multiplicity structure in double double precision. - * Required is the presence of a polynomial system in the dobldobl - * systems container and a solution in the dobldobl solutions container. - * The input parameters are two integers and one double: - * order : the maximum differentiation order, - * verbose : 1 for verbose, 0 for silent, and - * tol : tolerance on the numerical rank. - * On return is a tuple: the multiplicity and the values - * of the Hilbert function. */ - -static PyObject *py2c_quaddobl_multiplicity_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the multiplicity structure in quad double precision. - * Required is the presence of a polynomial system in the quaddobl - * systems container and a solution in the quaddobl solutions container. - * The input parameters are two integers and one double: - * order : the maximum differentiation order, - * verbose : 1 for verbose, 0 for silent, and - * tol : tolerance on the numerical rank. - * On return is a tuple: the multiplicity and the values - * of the Hilbert function. */ - -/* The wrapping of the numerical tropisms container starts here. */ - -static PyObject *py2c_numbtrop_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the numerical tropisms container, - * in standard double precision. The input parameters are - * nbt : number of tropisms; - * dim : length_of_each tropism; - * wnd : winding numbers, as many as nbt; - * dir : nbt*dim doubles with the coordinates of the tropisms; - * err : errors on the tropisms, as many doubles as the value of nbt. - * The numbers in wnd, dir, and err must be given in one string, - * as the string representation of a list of doubles. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the numerical tropisms container, - * in double double precision. The input parameters are - * nbt : number of tropisms; - * dim : length_of_each tropism; - * wnd : winding numbers, as many as nbt; - * dir : 2*nbt*dim doubles with the coordinates of the tropisms; - * err : errors on the tropisms, as many doubles as the value of 2*nbt. - * The numbers in wnd, dir, and err must be given in one string, - * as the string representation of a list of doubles. - * On return is the the failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the numerical tropisms container, - * in quad double precision. The input parameters are - * nbt : number of tropisms; - * dim : length_of_each tropism; - * wnd : winding numbers, as many as nbt; - * dir : 4*nbt*dim doubles with the coordinates of the tropisms; - * err : errors on the tropisms, as many doubles as the value of 4*nbt. - * The numbers in wnd, dir, and err must be given in one string, - * as the string representation of a list of doubles. - * On return is the the failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_standard_retrieve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves all tropisms stored in standard double precision. - * - * ON ENTRY : - * nbt number of tropisms; - * dim length_of_each tropism. - * - * ON RETURN : - * wnd winding numbers, as many as nbt; - * dir nbt*dim doubles with the coordinates of the tropisms; - * err errors on the tropisms, as many doubles as the value of nbt. - * All return parameters are in one string, - * the string representation of a list of doubles. - * The failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_dobldobl_retrieve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves all tropisms stored in double double precision. - * - * ON ENTRY : - * nbt number of tropisms; - * dim length_of_each tropism. - * - * ON RETURN : - * wnd winding numbers, as many as nbt; - * dir 2*nbt*dim doubles with the coordinates of the tropisms; - * err errors on the tropisms, as many doubles as the value of 2*nbt. - * All return parameters are in one string, - * the string representation of a list of doubles. - * The failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_quaddobl_retrieve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves all tropisms stored in quad double precision. - * - * ON ENTRY : - * nbt number of tropisms; - * dim length_of_each tropism. - * - * ON RETURN : - * wnd winding numbers, as many as nbt; - * dir 4*nbt*dim doubles with the coordinates of the tropisms; - * err errors on the tropisms, as many doubles as the value of 4*nbt. - * All return parameters are in one string, - * the string representation of a list of doubles. - * The failure code, which equals zero if all went well. */ - -static PyObject *py2c_numbtrop_standard_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of tropisms, stored in standard double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_dobldobl_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of tropisms, stored in double double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_quaddobl_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of tropisms, stored in quad double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_standard_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the tropisms, stored in standard double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_dobldobl_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the tropisms, stored in double double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_quaddobl_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the tropisms, stored in quad double - * precision, in the numerical tropisms container. */ - -static PyObject *py2c_numbtrop_store_standard_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores a tropism given in standard double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by standard_size. - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as dim; - * err the error on the tropism. - * All dim+1 doubles are given in one string, - * the string representation of a list of doubles. */ - -static PyObject *py2c_numbtrop_store_dobldobl_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores a tropism given in double double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by standard_size. - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as 2*dim; - * err the error on the tropism, two doubles. - * All 2*dim+2 doubles are given in one string, - * the string representation of a list of doubles. */ - -static PyObject *py2c_numbtrop_store_quaddobl_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores a tropism given in quad double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by standard_size. - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as 4*dim; - * err the error on the tropism, four doubles. - * All 4*dim+4 doubles are given in one string, - * the string representation of a list of doubles. */ - -static PyObject *py2c_numbtrop_standard_retrieve_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns one tropism, stored in standard double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by standard_size. - * - * ON RETURN : - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as dim; - * err the error on the tropism. - * All dim+1 doubles are returned in one string, - * the string representation of a list of doubles. */ - -static PyObject *py2c_numbtrop_dobldobl_retrieve_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns one tropism, stored in double double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by numbtrop_dobldobl_size. - * - * ON RETURN : - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as 2*dim; - * err the error on the tropism, two doubles. - * All 2*dim+2 doubles are returned in one string, - * the string representation of a list of doubles. */ - -static PyObject *py2c_numbtrop_quaddobl_retrieve_tropism - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns one tropism, stored in quad double precision. - * - * ON ENTRY : - * dim the length of the tropism vector; - * idx the index of the tropism, indexing starts at one, - * and ends at nbt, what is returned by numbtrop_quaddobl_size. - * - * ON RETURN : - * wnd estimated winding number; - * dir coordinates of the tropisms, as many as 4*dim; - * err the error on the tropism, four doubles. - * All 4*dim+4 doubles are returned in one string, - * the string representation of a list of doubles.*/ - -static PyObject *py2c_numbtrop_standard_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the stored numerically computed tropisms, - * computed in standard double precision. */ - -static PyObject *py2c_numbtrop_dobldobl_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the stored numerically computed tropisms, - * computed in double double precision. */ - -static PyObject *py2c_numbtrop_quaddobl_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the stored numerically computed tropisms, - * computed in quad double precision. */ - -/* The wrapping of functions with prototypes in witset.h starts here. */ - -static PyObject *py2c_embed_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the container with its embedding of dimension d. - * The dimension d is given as the first integer parameter on input. - * The second integer parameter indicates the precision, either 0, 1, or 2, - * respectively for double, double double, or quad double precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in standard double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in double double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in quad double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system with coefficients in standard double - * precision in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system with coefficients in double double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_embed_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the Laurent system with coefficients in quad double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_swap_symbols_for_standard_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the polynomial system with standard - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_swap_symbols_for_dobldobl_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the polynomial system with double - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_swap_symbols_for_quaddobl_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the polynomial system with quad - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_swap_symbols_for_standard_Laurent_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the Laurent system with standard - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_swap_symbols_for_dobldobl_Laurent_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the Laurent system with double - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_swap_symbols_for_quaddobl_Laurent_witness_set - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the slack variables in the Laurent system with quad - * double precision coefficients and its corresponding solutions in the - * containers so the slack variables appear at the end. On input are - * two integers: the total number of variables; and - * the number of slack variables, or the dimension of the set. - * This permutation is necessary to consider the system and solutions - * stored in containers as a witness set. */ - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Laurent_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * Laurent systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Laurent_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * Laurent systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Laurent_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * Laurent systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_set_standard_to_mute - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in standard double - * precision to silent. */ - -static PyObject *py2c_factor_set_dobldobl_to_mute - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in double double - * precision to silent. */ - -static PyObject *py2c_factor_set_quaddobl_to_mute - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in quad double - * precision to silent. */ - -static PyObject *py2c_factor_set_standard_to_verbose - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in standard double - * precision to verbose. */ - -static PyObject *py2c_factor_set_dobldobl_to_verbose - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in double double - * precision to verbose. */ - -static PyObject *py2c_factor_set_quaddobl_to_verbose - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations in quad double - * precision to verbose. */ - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the output file for the factorization. - * On input are an integer and a string: - * 1) the integer equals the number of characters in the string; and - * 2) the string contains the name of a file. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_standard_assign_labels - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in standard double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_dobldobl_assign_labels - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in double double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_quaddobl_assign_labels - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in quad double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_initialize_standard_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by an ordinary polynomial system in standard double precision. - * The embedded system is taken from the polynomial systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_dobldobl_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by an ordinary polynomial system in double double precision. - * The embedded system is taken from the polynomial systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_quaddobl_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by an ordinary polynomial system in quad double precision. - * The embedded system is taken from the polynomial systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_standard_Laurent_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by a Laurent polynomial system in standard double precision. - * The embedded system is taken from the Laurent systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_dobldobl_Laurent_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by a Laurent polynomial system in double double precision. - * The embedded system is taken from the Laurent systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_quaddobl_Laurent_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set, - * defined by a Laurent polynomial system in quad double precision. - * The embedded system is taken from the Laurent systems container - * and the generic points are taken from the solutions container. - * On entry is the dimension or the number of hyperplanes - * to intersect the positive dimensional solution set with. */ - -static PyObject *py2c_factor_initialize_standard_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d, - * in standard double precision. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_initialize_dobldobl_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d, - * in double double precision. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_initialize_quaddobl_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d, - * in quad double precision. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_standard_trace_grid_diagnostics - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple of two doubles with the diagnostics on the - * trace grid computed in standard double precision. - * The first double is the largest error of the samples. - * The second double is the smallest distance between two samples. */ - -static PyObject *py2c_factor_dobldobl_trace_grid_diagnostics - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple of two doubles with the diagnostics on the - * trace grid computed in double double precision. - * The first double is the largest error of the samples. - * The second double is the smallest distance between two samples. */ - -static PyObject *py2c_factor_quaddobl_trace_grid_diagnostics - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple of two doubles with the diagnostics on the - * trace grid computed in quad double precision. - * The first double is the largest error of the samples. - * The second double is the smallest distance between two samples. */ - -static PyObject *py2c_factor_store_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container, in standard double precision, - * to the data for monodromy loops. */ - -static PyObject *py2c_factor_store_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container, in double double precision, - * to the data for monodromy loops. */ - -static PyObject *py2c_factor_store_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container, in quad double precision, - * to the data for monodromy loops. */ - -static PyObject *py2c_factor_restore_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions, in standard double precision, - * from sampler to the container. */ - -static PyObject *py2c_factor_restore_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions, in double double precision, - * from sampler to the container. */ - -static PyObject *py2c_factor_restore_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions, in quad double precision, - * from sampler to the container. */ - -static PyObject *py2c_factor_standard_track_paths - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set, - * in standard double precision. - * On input is an integer, which must be 1 if the witness set is - * defined by a Laurent polynomial system. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_dobldobl_track_paths - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set, - * in double double precision. - * On input is an integer, which must be 1 if the witness set is - * defined by a Laurent polynomial system. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_quaddobl_track_paths - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set, - * in quad double precision. - * On input is an integer, which must be 1 if the witness set is - * defined by a Laurent polynomial system. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_standard_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back, in standard double precision. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_dobldobl_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back, in double double precision. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_quaddobl_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back, in quad double precision. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_standard_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space in standard double precision. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_dobldobl_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space in double double precision. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_quaddobl_slices - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space in quad double precision. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_set_standard_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice, - * in standard double precision. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_set_dobldobl_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice, - * in double double precision. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_set_quaddobl_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice, - * in quad double precision. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_standard_gammas - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants in standard double precision - * for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_dobldobl_gammas - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants in double double precision - * for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_quaddobl_gammas - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants in quad double precision - * for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_permutation_after_standard_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a set of degree d, computes the permutation using the solutions - * most recently stored, after a loop in standard double precision. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_permutation_after_dobldobl_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a set of degree d, computes the permutation using the solutions - * most recently stored, after a loop in double double precision. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_permutation_after_quaddobl_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a set of degree d, computes the permutation using the solutions - * most recently stored, after a loop in quad double precision. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_update_standard_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements, - * computed in standard double precision. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_update_dobldobl_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements, - * computed in double double precision. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_update_quaddobl_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements, - * computed in quad double precision. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_number_of_standard_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the standard double - * precision decomposition of the witness set. */ - -static PyObject *py2c_factor_number_of_dobldobl_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the double double - * precision decomposition of the witness set. */ - -static PyObject *py2c_factor_number_of_quaddobl_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the quad double - * precision decomposition of the witness set. */ - -static PyObject *py2c_factor_witness_points_of_standard_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component, - * computed in standard double precision. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_witness_points_of_dobldobl_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component, - * computed in double double precision. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_witness_points_of_quaddobl_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component, - * computed in quad double precision. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_standard_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum, in standard double precision. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_factor_dobldobl_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum, in double double precision. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_factor_quaddobl_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum, in quad double precision. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_witset_standard_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by an ordinary polynomial system - * in standard double precision. - * The containers in standard double precision must contain the embedded - * polynomial system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 2*nvr doubles for the real and imaginary parts of the - * standard double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_dobldobl_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by an ordinary polynomial system - * in double double precision. - * The containers in double double precision must contain the embedded - * polynomial system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 4*nvr doubles for the real and imaginary parts of the - * double double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_quaddobl_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by an ordinary polynomial system - * in quad double precision. - * The containers in quad double precision must contain the embedded - * polynomial system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 8*nvr doubles for the real and imaginary parts of the - * quad double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_standard_Laurent_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by a Laurent polynomial system - * in standard double precision. - * The containers in standard double precision must contain the embedded - * Laurent system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 2*nvr doubles for the real and imaginary parts of the - * standard double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_dobldobl_Laurent_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by a Laurent polynomial system - * in double double precision. - * The containers in double double precision must contain the embedded - * Laurent system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 4*nvr doubles for the real and imaginary parts of the - * double double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_quaddobl_Laurent_membertest - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes the homotopy membership test for a point to belong to - * a witness set defined by a Laurent polynomial system - * in quad double precision. - * The containers in quad double precision must contain the embedded - * Laurent system and its corresponding solutions for the witness set - * of a positive dimensional solution set. - * On entry are the seven parameters, the first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of the point as a list with as - * many as 8*nvr doubles for the real and imaginary parts of the - * quad double precision coordinates of the test point. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_standard_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by an ordinary polynomial system in standard double precision, - * where the test point is given as a string in PHCpack format. - * The containers in standard double precision must contain the - * embedded system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_dobldobl_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by an ordinary polynomial system in double double precision, - * where the test point is given as a string in PHCpack format. - * The containers in double double precision must contain the - * embedded system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_quaddobl_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by an ordinary polynomial system in quad double precision, - * where the test point is given as a string in PHCpack format. - * The containers in quad double precision must contain the - * embedded system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_standard_Laurent_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by a Laurent polynomial system in standard double precision, - * where the test point is given as a string in PHCpack format. - * The containers in standard double precision must contain the - * embedded Laurent system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_dobldobl_Laurent_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by a Laurent polynomial system in double double precision, - * where the test point is given as a string in PHCpack format. - * The containers in double double precision must contain the - * embedded Laurent system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_witset_quaddobl_Laurent_ismember - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the homotopy membership test for a point to belong to a witness set - * defined by a Laurent polynomial system in quad double precision, - * where the test point is given as a string in PHCpack format. - * The containers in quad double precision must contain the - * embedded Laurent system and the corresponding generic points. - * On entry are seven parameters. The first four are integers: - * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, - * 2) nvr, the ambient dimension, number of coordinates of the point, - * 3) dim, the dimension of the witness set, - * 4) nbc, the number of characters in the string representing the point, - * the test point is represented as a solution string in symbolic format, - * including the symbols for the variables, before the coordinates; - * the next two parameters are two doubles: - * 5) restol, tolerance on the residual for the valuation of the point, - * 6) homtol, tolerance on the homotopy membership test for the point; - * and the last parameter is a string: - * 7) tpt, the string representation of a solution which contains - * the coordinates of the test point in symbolic format. - * On return are three 0/1 integers, to be interpreted as booleans: - * 1) fail, the failure code of the procedure, - * 2) onsys, 0 if the evaluation test failed, 1 if success, - * 3) onset, 0 if not a member of the witness set, 1 if a member. */ - -static PyObject *py2c_standard_witset_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * standard double precision on return contain a witness set for the - * hypersurface defined by the ordinary polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of an ordinary polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_witset_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * double double precision on return contain a witness set for the - * hypersurface defined by the ordinary polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of an ordinary polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_witset_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * double double precision on return contain a witness set for the - * hypersurface defined by the ordinary polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of an ordinary polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_witset_of_Laurent_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * standard double precision on return contain a witness set for the - * hypersurface defined by the Laurent polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a Laurent polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_witset_of_Laurent_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * double double precision on return contain a witness set for the - * hypersurface defined by the Laurent polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a Laurent polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_witset_of_Laurent_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container in - * double double precision on return contain a witness set for the - * hypersurface defined by the Laurent polynomial in p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a Laurent polynomial in several - * variables, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container, - * in standard double precision, define the witness sets for these - * two solution sets. */ - -static PyObject *py2c_dobldobl_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container, - * in double double precision, define the witness sets for these - * two solution sets. */ - -static PyObject *py2c_quaddobl_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container, - * in quad double precision, define the witness sets for these - * two solution sets. */ - -static PyObject *py2c_standard_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b, - * in standard double precision. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_dobldobl_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b, - * in double double precision. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_quaddobl_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b, - * in quad double precision. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_extrinsic_top_diagonal_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the start and target system to - * start the extrinsic cascade to intersect two witness sets, - * respectively of dimensions a and b, with ambient dimensions - * respectively equal to n1 and n2. - * There are four integers as parameters on input: n1, n2, a and b. */ - -static PyObject *py2c_diagonal_symbols_doubler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Doubles the number of symbols in the symbol table to enable the - * writing of the target system to string properly when starting the - * cascade of a diagonal homotopy in extrinsic coordinates. - * On input are three integers, n, d, nc, and one string s. - * On input are n, the ambient dimension = #variables before the embedding, - * d is the number of slack variables, or the dimension of the first set, - * and in s (nc characters) are the symbols for the first witness set. - * This function takes the symbols in s and combines those symbols with - * those in the current symbol table for the second witness set stored - * in the standard systems container. On return, the symbol table - * contains then all symbols to write the top system in the cascade - * to start the diagonal homotopy. */ - -static PyObject *py2c_standard_collapse_diagonal - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers for standard doubles. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_collapse_diagonal - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers for double doubles. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_collapse_diagonal - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers for quad doubles. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in witsols.h starts here. */ - -static PyObject *py2c_standard_polysys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the polynomial system in - * the standard systems container. Runs in standard double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_standard_laursys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the Laurent polynomial system in - * the standard systems container. Runs in standard double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_dobldobl_polysys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the polynomial system in - * the dobldobl systems container. Runs in double double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_dobldobl_laursys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the Laurent polynomial system in - * the dobldobl systems container. Runs in double double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_quaddobl_polysys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the polynomial system in - * the quaddobl systems container. Runs in quad double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_quaddobl_laursys_solve - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the cascades of homotopies on the Laurent polynomial system in - * the quaddobl systems container. Runs in quad double precision. - * On input are five integers : - * 1) nbtasks equals the number of tasks for multitasking, - * 2) topdim is the top dimension to start the homotopy cascades, - * 3) filter is a 0 or 1 flag to filter the witness supersets, - * 4) factor is a 0 or 1 flag to factor the witness sets, - * 5) verbose is a flag for intermediate output. */ - -static PyObject *py2c_copy_standard_polysys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the systems and solutions container, - * in standard double precision. - * - * REQUIRED : - * 1) py2c_standard_polysys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_copy_standard_laursys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the Laurent systems and solutions container, - * in standard double precision. - * - * REQUIRED : - * 1) py2c_standard_laursys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_copy_dobldobl_polysys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the systems and solutions container, - * in double double precision. - * - * REQUIRED : - * 1) py2c_dobldobl_polysys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_copy_dobldobl_laursys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the Laurent systems and solutions container, - * in double double precision. - * - * REQUIRED : - * 1) py2c_dobldobl_laursys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_copy_quaddobl_polysys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the systems and solutions container, - * in quad double precision. - * - * REQUIRED : - * 1) py2c_quaddobl_polysys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_copy_quaddobl_laursys_witset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * There is one integer parameter dim on input, - * which represents the dimension of the witness set. - * Copies the witness set representation for a solution set - * of dimension dim into the Laurent systems and solutions container, - * in quad double precision. - * - * REQUIRED : - * 1) py2c_quaddobl_laursys_solve was executed successfully, and - * 2) dim is in the range 0..topdim. */ - -static PyObject *py2c_clear_standard_witsols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the witness solutions in standard double precision. */ - -static PyObject *py2c_clear_dobldobl_witsols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the witness solutions in double double precision. */ - -static PyObject *py2c_clear_quaddobl_witsols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the witness solutions in quad double precision. */ - -/* The wrapping of functions with prototypes in schubert.h starts here. */ - -static PyObject *py2c_schubert_pieri_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of p-plane producing curves of degree q - * that meet m*p + q*(m+p) given general m-planes. - * On input are three integer numbers: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; and - * 3) q, the degree of the curve that produces p-planes. - * The dimension of the ambient space of this Pieri problem is m+p. */ - -static PyObject *py2c_schubert_resolve_conditions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resolves a general Schubert intersection condition in n-space - * for k-planes subject to conditions defined by brackers. - * On return is the root count, the number of k-planes that satisfy - * the intersection conditions imposed by the brackets for general flags. - * On entry are five integers and one string: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c, the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen. */ - -static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space, - * in standard double precision. - * The polynomial system that was solved is in the container for - * systems with coefficients in standard double precision and the - * corresponding solutions are in the standard solutions container. - * On entry are nine integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: if 0, then no intermediate output is written, - * if 1, then the resolution is dispayed on screen; - * 7) the flag verify: if 0, then no diagnostic output is written to file, - * if 1, then diagnostic output is written to file; - * 8) the flag minrep: if 0, then all minors are used in the system, - * if 1, then a minimal representation of the problem is used; - * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, - * if 1, then the overdetermined systems are squared; - * 10) nbchar, the number of characters in the string filename; - * 11) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_dobldobl_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space, - * in double double precision. - * The polynomial system that was solved is in the container for - * systems with coefficients in double double precision and the - * corresponding solutions are in the dobldobl solutions container. - * On entry are nine integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: if 0, then no intermediate output is written, - * if 1, then the resolution is dispayed on screen; - * 7) the flag verify: if 0, then no diagnostic output is written to file, - * if 1, then diagnostic output is written to file; - * 8) the flag minrep: if 0, then all minors are used in the system, - * if 1, then a minimal representation of the problem is used; - * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, - * if 1, then the overdetermined systems are squared; - * 10) nbchar, the number of characters in the string filename; - * 11) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_quaddobl_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space, - * in quad double precision. - * The polynomial system that was solved is in the container for - * systems with coefficients in quad double precision and the - * corresponding solutions are in the quaddobl solutions container. - * On entry are nine integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, then no intermediate output is written, - * when 1, then the resolution is dispayed on screen; - * 7) the flag verify: when 0, then no diagnostic output is written to file, - * when 1, then diagnostic output is written to file; - * 8) the flag minrep: if 0, then all minors are used in the system, - * if 1, then a minimal representation of the problem is used; - * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, - * if 1, then the overdetermined systems are squared; - * 10) nbchar, the number of characters in the string filename; - * 11) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_localization_poset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the localization poset for the - * Pieri root count for m, p, and q. The input parameters are the - * integer values for m, p, and q: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the curves that produce p-planes. */ - -static PyObject *py2c_schubert_pieri_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. - * On return the systems container for systems with coefficients in standard - * double precision contains the polynomial system solved and in the - * solutions in standard double precision are in the solutions container. - * On entry are four integers and two strings: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, the string with m*p + q*(m+p) random complex input m-planes, - * where the real and imaginary parts are separated by a space; - * 6) pts, the string with m*p + q*(m+p) random complex interpolation - * points, only needed if q > 0. - * The function returns the combinatorial Pieri root count, - * which should equal the number of solutions in the container. */ - -static PyObject *py2c_schubert_osculating_planes - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of n real m-planes in - * d-space osculating a rational normal curve - * at the n points in s, where n = m*p + q*(m+p) and d = m+p. - * On entry are four integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string pts; and - * 5) pts, the string with m*p + q*(m+p) interpolation points. */ - -static PyObject *py2c_schubert_pieri_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Fills the container of systems with coefficients in standard - * double precision with a polynomial system that expresses the - * intersection conditions of a general Pieri problem. - * On input are five integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, m*p + q*(m+p) random complex input m-planes, where - * the real and imaginary parts are separated by a space; - * 6) a flag is_real: if == 1, then the coefficients of A are real, - * if == 0, then the coefficients of A are complex. - * Returns the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions with prototypes in mapcon.h starts here. */ - -static PyObject *py2c_mapcon_solve_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the binomial system stored in the Laurent systems container. - * There is one input argument, either one or zero. - * If one, then only the pure top dimensional solutions are computed. - * If zero, then all solution sets are computed. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_write_maps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the maps stored in the container to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_clear_maps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the maps stored in the container. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_top_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the top dimension of the maps in the container. */ - -static PyObject *py2c_mapcon_number_of_maps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of maps in the container. */ - -static PyObject *py2c_mapcon_degree_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the dimension and index of a map, given as two integers as - * input parameters, returns the degree of that map. */ - -static PyObject *py2c_mapcon_coefficients_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the coefficients of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of complex doubles. */ - -static PyObject *py2c_mapcon_exponents_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the exponents of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of integers. */ - -/* The wrapping of functions with prototypes in series.h starts below. */ - -static PyObject *py2c_standard_Newton_series ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in standard double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in standard double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the standard systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_series ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in double double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in double double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the double double systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_series ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in quad double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in quad double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the quad double systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_power_series - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in standard double precision, and in the standard systems pool the - * leading terms of the power series, this function runs Newton's method - * to compute power series solutions of the system in the container, - * in standard double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the standard systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_power_series - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in double double precision, and in the dobldobl systems pool the - * leading terms of the power series, this function runs Newton's method - * to compute power series solutions of the system in the container, - * in double double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the double double systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_power_series - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in quad double precision, and in the quaddobl systems pool the - * leading terms of the power series, this function runs Newton's method - * to compute power series solutions of the system in the container, - * in quad double precision. There are four integers on input: - * 1) the index of the series parameter; - * 2) the maximal degree of the series; - * 3) the number of Newton steps to be done on each solution; - * 4) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The solution series are stored in the quad double systems pool. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Pade_approximant - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in standard double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in standard double precision, followed by the construction of the - * Pade approximants, for each solution. There are five integers on input: - * 1) the index of the series parameter; - * 2) the degree of the numerator of the Pade approximant; - * 3) the degree of the denominator of the Pade approximant; - * 4) the number of Newton steps to be done on each solution; - * 5) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The Pade approximants are stored in the standard systems pool, - * numerators in the odd indexed entries and denominators in the entries - * with even index in each system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Pade_approximant - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in double double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in double double precision, followed by the construction of the - * Pade approximants, for each solution. There are five integers on input: - * 1) the index of the series parameter; - * 2) the degree of the numerator of the Pade approximant; - * 3) the degree of the denominator of the Pade approximant; - * 4) the number of Newton steps to be done on each solution; - * 5) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The Pade approximants are stored in the dobldobl systems pool, - * numerators in the odd indexed entries and denominators in the entries - * with even index in each system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Pade_approximant - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the systems container a polynomial system with coefficients - * in quad double precision, and in the solutions container the - * leading coefficients of the power series, this function runs Newton's - * method to compute power series solutions of the system in the container, - * in quad double precision, followed by the construction of the - * Pade approximants, for each solution. There are five integers on input: - * 1) the index of the series parameter; - * 2) the degree of the numerator of the Pade approximant; - * 3) the degree of the denominator of the Pade approximant; - * 4) the number of Newton steps to be done on each solution; - * 5) a 0/1-flag to indicate whether additional diagnostic output needs - * to be written to screen. - * The Pade approximants are stored in the quaddobl systems pool, - * numerators in the odd indexed entries and denominators in the entries - * with even index in each system. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of Pade continuation starts here. */ - -static PyObject *py2c_padcon_set_default_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the default values of the homotopy continuation parameters. */ - -static PyObject *py2c_padcon_clear_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the allocated space for the parameters. */ - -static PyObject *py2c_padcon_get_homotopy_continuation_parameter - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the value of the k-th continuation parameter, - * if k ranges between 1 and 12. The integer k is given on entry. */ - -static PyObject *py2c_padcon_set_homotopy_continuation_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The gamma constant is the first homotopy continuation parameter. - * The gamma is a complex number and it should be given as two - * doubles, as its real and imaginary part respectively. */ - -static PyObject *py2c_padcon_set_homotopy_continuation_parameter - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the value of the k-th continuation parameter to the given value. - * The first parameter k is an integer number between 2 and 12. - * The second parameter is the value of the k-th parameter, - * parsed as a floating point number. */ - -static PyObject *py2c_padcon_standard_track - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target, start system, and start solutions, - * launches the Pade continuation in standard double precision. - * Seven input parameters are expected: - * 1) the number of characters in the name of the output file; - * 2) a string which defines the name of the output file, - * if the string is empty, then no file is created; - * 3) a flag to indicate whether the output file is the defined output file - * (value 1 of the flag), or whether the file is local (value 0); - * 4) an integer for the verbose flag, if zero, then no extra - * information is written to file or to screen; - * 5) an integer for the homogenization, if zero, tracking happens in - * affine space, if one, then tracking happens in 1-projective space, - * if m, for m > 1, then multihomogenization is applied; - * 6) an integer for the number of variables, 0 if the fifth parameter m - * is zero or one; - * 7) a string with the index representation for the partition of the - * set of variables, if the fifth parameter m is larger than one. */ - -static PyObject *py2c_padcon_dobldobl_track - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target, start system, and start solutions, - * launches the Pade continuation in double double precision. - * Seven input parameters are expected: - * 1) the number of characters in the name of the output file; - * 2) a string which defines the name of the output file, - * if the string is empty, then no file is created; - * 3) a flag to indicate whether the output file is the defined output file - * (value 1 of the flag), or whether the file is local (value 0); - * 4) an integer for the verbose flag, if zero, then no extra - * information is written to file or to screen; - * 5) an integer for the homogenization, if zero, tracking happens in - * affine space, if one, then tracking happens in 1-projective space, - * if m, for m > 1, then multihomogenization is applied; - * 6) an integer for the number of variables, 0 if the fifth parameter m - * is zero or one; - * 7) a string with the index representation for the partition of the - * set of variables, if the fifth parameter m is larger than one. */ - -static PyObject *py2c_padcon_quaddobl_track - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target, start system, and start solutions, - * launches the Pade continuation in quad double precision. - * Seven input parameters are expected: - * 1) the number of characters in the name of the output file, - * 2) a string which defines the name of the output file, - * if the string is empty, then no file is created; - * 3) a flag to indicate whether the output file is the defined output file - * (value 1 of the flag), or whether the file is local (value 0); - * 4) an integer for the verbose flag, if zero, then no extra - * information is written to file or to screen; - * 5) an integer for the homogenization, if zero, tracking happens in - * affine space, if one, then tracking happens in 1-projective space, - * if m, for m > 1, then multihomogenization is applied; - * 6) an integer for the number of variables, 0 if the fifth parameter m - * is zero or one; - * 7) a string with the index representation for the partition of the - * set of variables, if the fifth parameter m is larger than one. */ - -static PyObject *py2c_padcon_standard_initialize_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target and start system, - * initializes the homotopy in standard double precision, - * for the step-by-step Pade continuation. - * On entry are two parameters, the verbose flag which is zero or one, - * and the homogeneous flag which is zero or one. - * If the verbose flag is 1, then extra output will be written. - * If the homogeneous flag is 1, tracking happens in projective space. */ - -static PyObject *py2c_padcon_dobldobl_initialize_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target and start system, - * initializes the homotopy in double double precision, - * for the step-by-step Pade continuation. - * On entry are two parameters, the verbose flag which is zero or one, - * and the homogeneous flag which is zero or one. - * If the verbose flag is 1, then extra output will be written. - * If the homogeneous flag is 1, tracking happens in projective space. */ - -static PyObject *py2c_padcon_quaddobl_initialize_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the defined target and start system, - * initializes the homotopy in quad double precision, - * for the step-by-step Pade continuation. - * On entry is one parameter, the verbose flag which is zero or one, - * and the homogeneous flag which is zero or one. - * If the verbose flag is 1, then extra output will be written. - * If the homogeneous flag is 1, tracking happens in projective space. */ - -static PyObject *py2c_padcon_standard_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integers: 1) the index for the continuation - * parameter in the natural homotopy and 2) the verbose flag. - * With the system, defined as target system, and the index - * for the continuation parameter, initializes the homotopy in - * standard double precision for the step-by-step Pade continuation. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integers: 1) the index for the continuation - * parameter in the natural homotopy and 2) the verbose flag. - * With the system, defined as target system, and the index - * for the continuation parameter, initializes the homotopy in - * double double precision for the step-by-step Pade continuation. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integers: 1) the index for the continuation - * parameter in the natural homotopy and 2) the verbose flag. - * With the system, defined as target system, and the index - * for the continuation parameter, initializes the homotopy in - * quad double precision for the step-by-step Pade continuation. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the solution with a given index in the solutions container in - * standard double precision and initializes the series-Pade tracker. - * On entry are two integers: 1) the index of the position of the solution - * in the container and 2) the verbose flag, which is zero or one. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the solution with a given index in the solutions container in - * double double precision and initializes the series-Pade tracker. - * On entry are two integers: 1) the index of the position of the solution - * in the container and 2) the verbose flag, which is zero or one. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the solution with a given index in the solutions container in - * quad double precision and initializes the series-Pade tracker. - * On entry are two integers: 1) the index of the position of the solution - * in the container and 2) the verbose flag, which is zero or one. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_standard_predict_correct - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes one predict-correct step on the current solution and - * the defined homotopy in standard double precision. - * On entry is one integer, the verbose flag which is zero or one. - * On return is the failure code of the predict-correct step: - * if zero, then the required accuracies were met, - * otherwise, either the predict or the correct step failed. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_dobldobl_predict_correct - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes one predict-correct step on the current solution and - * the defined homotopy in double double precision. - * On entry is one integer, the verbose flag which is zero or one. - * On return is the failure code of the predict-correct step: - * if zero, then the required accuracies were met, - * otherwise, either the predict or the correct step failed. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_quaddobl_predict_correct - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Executes one predict-correct step on the current solution and - * the defined homotopy in quad double precision. - * On entry is one integer, the verbose flag which is zero or one. - * On return is the failure code of the predict-correct step: - * if zero, then the required accuracies were met, - * otherwise, either the predict or the correct step failed. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_get_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integer parameters: 1) the index of the position of - * the solution and 2) the verbose flag, which is zero or one. - * Retrieves the current solution and places it at the given position - * in the solutions container in standard double precision. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_get_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integer parameters: 1) the index of the position of - * the solution and 2) the verbose flag, which is zero or one. - * Retrieves the current solution and places it at the given position - * in the solutions container in double double precision. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_get_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On entry are two integer parameters: 1) the index of the position of - * the solution and 2) the verbose flag, which is zero or one. - * Retrieves the current solution and places it at the given position - * in the solutions container in quad double precision. - * If the verbose flag is 1, then extra output will be written. */ - -static PyObject *py2c_padcon_standard_pole_radius - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the smallest pole radius computed - * by the predictor in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_pole_radius - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the smallest pole radius computed - * by the predictor in double double precision. - * The returned number is the high part of the double double number. */ - -static PyObject *py2c_padcon_quaddobl_pole_radius - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the smallest pole radius computed - * by the predictor in quad double precision. - * The returned number is the highest part of the quad double number. */ - -static PyObject *py2c_padcon_standard_closest_pole - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the complex number representation of the closest pole, - * computed by the predictor in standard double precision. - * Results are meaningful only if the real part >= 0.0. */ - -static PyObject *py2c_padcon_dobldobl_closest_pole - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the complex number representation of the closest pole, - * computed by the predictor in double double precision. - * The returned numbers are the high parts of the double doubles. - * Results are meaningful only if the real part >= 0.0. */ - -static PyObject *py2c_padcon_quaddobl_closest_pole - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the complex number representation of the closest pole, - * computed by the predictor in quad double precision. - * The returned numbers are the highest parts of the quad doubles. - * Results are meaningful only if the real part >= 0.0. */ - -static PyObject *py2c_padcon_standard_t_value - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current t value of the path tracker - * which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_t_value - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current t value of the path tracker - * which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_t_value - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current t value of the path tracker - * which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_step_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current step size of the path tracker - * which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_step_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current step size of the path tracker - * which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_step_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current step size of the path tracker - * which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_series_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current series step size of the path tracker - * which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_series_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current series step size of the path tracker - * which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_series_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current series step size of the path tracker - * which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_pole_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current pole step size of the path tracker - * which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_pole_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current pole step size of the path tracker - * which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_pole_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current pole step size of the path tracker - * which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_estimated_distance - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the estimated distance to the closest solution by - * the path tracker which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_estimated_distance - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the estimated distance to the closest solution by - * the path tracker which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_estimated_distance - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the estimated distance to the closest solution by - * the path tracker which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_hessian_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current Hessian step size of the path tracker - * which runs in standard double precision. */ - -static PyObject *py2c_padcon_dobldobl_hessian_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current Hessian step size of the path tracker - * which runs in double double precision. */ - -static PyObject *py2c_padcon_quaddobl_hessian_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current Hessian step size of the path tracker - * which runs in quad double precision. */ - -static PyObject *py2c_padcon_standard_series_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the series - * coefficient of component with leadidx at position idx, - * of the series computed by the predictor in double precision. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_dobldobl_series_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the series - * coefficient of component with leadidx at position idx, of the - * series computed by the predictor in double double precision. - * The doubles are the highest parts of the double doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_quaddobl_series_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the series - * coefficient of component with leadidx at position idx, of the - * series computed by the predictor in quad double precision. - * The doubles are the highest parts of the quad doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_standard_numerator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the - * coefficient of the numerator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in double precision. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_dobldobl_numerator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the - * coefficient of the numerator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in double double precision. - * The doubles are the highest parts of the double doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_quaddobl_numerator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the series - * coefficient of the numerator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in quad double precision. - * The doubles are the highest parts of the quad doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_standard_denominator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the - * coefficient of the denominator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in double precision. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_dobldobl_denominator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the - * coefficient of the denominator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in double double precision. - * The doubles are the highest parts of the double doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_quaddobl_denominator_coefficient - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the series - * coefficient of the denominator of the Pade approximant, - * at the component with leadidx at position idx, - * computed by the predictor in quad double precision. - * The doubles are the highest parts of the quad doubles. - * The integers leadidx and idx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the pole - * Pade approximant with leadidx at position poleidx, - * computed by the predictor in double precision. - * The integers leadidx and poleidx are two input parameters, - * the third input integer is the verbose flag. */ - -static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the pole - * Pade approximant with leadidx at position poleidx, - * computed by the predictor in double double precision. - * The integers leadidx and poleidx are two input parameters, - * the third input integer is the verbose flag. - * The returned doubles are the highest parts of the double doubles. */ - -static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a tuple: the real and imaginary parts of the pole - * Pade approximant with leadidx at position poleidx, - * computed by the predictor in quad double precision. - * The integers leadidx and poleidx are two input parameters, - * the third input integer is the verbose flag. - * The returned doubles are the highest parts of the quad doubles. */ - -static PyObject *py2c_padcon_clear_standard_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data for the series-Pade tracker in double precision. */ - -static PyObject *py2c_padcon_clear_dobldobl_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data for the series-Pade tracker - * in double double precision. */ - -static PyObject *py2c_padcon_clear_quaddobl_data - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data for the series-Pade tracker - * in quad double precision. */ - -/* The wrapping of functions with prototypes in syspool.h starts below. */ - -static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the size of the pool for systems with complex coefficients - * in standard double precision, with the value given on input. */ - -static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the size of the pool for systems with complex coefficients - * in double double precision, with the value given on input. */ - -static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the size of the pool for systems with complex coefficients - * in quad double precision, with the value given on input. */ - -static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the size of the pool for systems in standard double precision. */ - -static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the size of the pool for systems in double double precision. */ - -static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the size of the pool for systems in quad double precision. */ - -static PyObject *py2c_syspool_standard_create - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the index k (k between one and the size of the pool), - * and with a system defined in the standard double system container, - * that system is stored as the k-th system in the standard system pool. */ - -static PyObject *py2c_syspool_dobldobl_create - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the index k (k between one and the size of the pool), - * and with a system defined in the double double system container, - * that system is stored as the k-th system in the dobldobl system pool. */ - -static PyObject *py2c_syspool_quaddobl_create - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the index k (k between one and the size of the pool), - * and with a system defined in the quad double system container, - * that system is stored as the k-th system in the quaddobl system pool. */ - -static PyObject *py2c_syspool_copy_to_standard_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the k-th system in the pool for systems in standard double - * precision to the standard systems container. - * The value for k is given as an integer input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syspool_copy_to_dobldobl_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the k-th system in the pool for systems in double double - * precision to the dobldobl systems container. - * The value for k is given as an integer input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syspool_copy_to_quaddobl_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the k-th system in the pool for systems in quad double - * precision to the quaddobl systems container. - * The value for k is given as an integer input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syspool_standard_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the pool for systems in standard double precision. */ - -static PyObject *py2c_syspool_dobldobl_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the pool for systems in double double precision. */ - -static PyObject *py2c_syspool_quaddobl_clear - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the pool for systems in quad double precision. */ - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using standard double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the standard systems container. - * The two other input parameters are two doubles: the real and imaginary - * part of the gamma constant. If the integer parameter equals zero and - * if the two input doubles are not both zero, then the input gamma constant - * will be used, otherwise, if the two input doubles are zero and the first - * integer parameter is zero as well, then a random gamma constant will - * be generated. */ - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using double double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the dobldobl systems container. - * The two other input parameters are two doubles: the real and imaginary - * part of the gamma constant. If the integer parameter equals zero and - * if the two input doubles are not both zero, then the input gamma constant - * will be used, otherwise, if the two input doubles are zero and the first - * integer parameter is zero as well, then a random gamma constant will - * be generated. */ - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using quad double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the quaddobl systems container. - * The two other input parameters are two doubles: the real and imaginary - * part of the gamma constant. If the integer parameter equals zero and - * if the two input doubles are not both zero, then the input gamma constant - * will be used, otherwise, if the two input doubles are zero and the first - * integer parameter is zero as well, then a random gamma constant will - * be generated. */ - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using arbitrary multiprecision arithmetic. - * There is are two integer numbers on input: - * 1) one to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used; and - * 2) the number of decimal places in the working precision. - * Before calling this routine the target and start system must - * be copied over from the multprec systems container. */ - -static PyObject *py2c_initialize_varbprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the variable precision homotopy with the target and - * start system stored in the strings. - * On entry are three integers and two strings, in the following order: - * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant - * is used, if 0, a random value for gamma will be generated; - * 2) nc_target, the number of characters in the string target; - * 3) target, the string representation of the target system; - * 4) nc_start, the number of characters in the string start; - * 5) start, the string representation of the start system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the standard solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the dobldobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the quaddobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the multprec solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Uses the string representation of a solution to initialize the - * variable precision path tracker with. - * There are three input parameters, two integers and one string: - * 1) nv, the number of variables in the solution; - * 2) nc, the number of characters in the string sol; - * 3) sol, the string representation of a solution. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with standard double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the standard solutions container. - * The functions py2c_initialized_standard_tracker and - * py2c_initialize_standard_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with double double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the dobldobl solutions container. - * The functions py2c_initialized_dobldobl_tracker and - * py2c_initialize_dobldobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with quad double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the quaddobl solutions container. - * The functions py2c_initialized_quaddobl_tracker and - * py2c_initialize_quaddobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with arbitrary - * multiprecision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the multprec solutions container. - * The functions py2c_initialized_multprec_tracker and - * py2c_initialize_multprec_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on a solution path in variable precision. - * There are four integer input parameters: - * 1) the number of correct decimal places in the solution; - * 2) an upper bound on the number of decimal places in the precision; - * 3) the maximum number of Newton iterations; - * 4) a flag zero or one to indicate the verbose level. - * On return is a tuple: - * 0) the failure code, which equals zero if all went well; and - * 1) the string representation of the next solution on the path. */ - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the standard double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the double double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the quad double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the arbitrary multiprecision tracker - * with a generator. */ - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the variable precision tracker - * with a generator. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in lib2path.h, starts here. */ - -static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in double - * double double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The quaddobl systems container contains a valid polynomial system - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_get_default_path_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the precision (16, 32, or 64), returns the tuple with the - * default values for the path parameters. - * - * ON ENTRY : - * prec an integer value, 16, 32, or 64 to indicate double, - * double double, or quad double precision respectively. - * - * ON RETURN : - * t a 14-tuple with the defaults for the path parameters: - * t[0] maximum number of steps along a path; - * t[1] number of points used in the predictor; - * t[2] increase factor of the predictor; - * t[3] decrease factor of the precdictor; - * t[4] maximum step size along a path; - * t[5] maximum step size at the end of a path; - * t[6] minimum step size; - * t[7] tolerance on the residual; - * t[8] tolerance on the corrector update; - * t[9] tolerance on the first correction update; - * t[10] maximum number of iterations of the corrector; - * t[11] tolerance on the corrector; - * t[12] number of steps in the Newton root refiner; - * t[13] tolerance for the final refinement. */ - -static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * All values of the 14 path parameters must be provided, - * default values are obtained with py2c_get_default_path_parameters. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant; - * par00 maximum number of steps along a path; - * par01 number of points used in the predictor; - * par02 increase factor of the predictor; - * par03 decrease factor of the precdictor; - * par04 maximum step size along a path; - * par05 maximum step size at the end of a path; - * par06 minimum step size; - * par07 tolerance on the residual; - * par08 tolerance on the corrector update; - * par09 tolerance on the first correction update; - * par10 maximum number of iterations of the corrector; - * par11 tolerance on the corrector; - * par12 number of steps in the Newton root refiner; - * par13 tolerance for the final refinement. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * All values of the 14 path parameters must be provided, - * default values are obtained with py2c_get_default_path_parameters. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant; - * par00 maximum number of steps along a path; - * par01 number of points used in the predictor; - * par02 increase factor of the predictor; - * par03 decrease factor of the precdictor; - * par04 maximum step size along a path; - * par05 maximum step size at the end of a path; - * par06 minimum step size; - * par07 tolerance on the residual; - * par08 tolerance on the corrector update; - * par09 tolerance on the first correction update; - * par10 maximum number of iterations of the corrector; - * par11 tolerance on the corrector; - * par12 number of steps in the Newton root refiner; - * par13 tolerance for the final refinement. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * All values of the 14 path parameters must be provided, - * default values are obtained with py2c_get_default_path_parameters. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant; - * par00 maximum number of steps along a path; - * par01 number of points used in the predictor; - * par02 increase factor of the predictor; - * par03 decrease factor of the precdictor; - * par04 maximum step size along a path; - * par05 maximum step size at the end of a path; - * par06 minimum step size; - * par07 tolerance on the residual; - * par08 tolerance on the corrector update; - * par09 tolerance on the first correction update; - * par10 maximum number of iterations of the corrector; - * par11 tolerance on the corrector; - * par12 number of steps in the Newton root refiner; - * par13 tolerance for the final refinement. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_d.cpp phcpack-2.4.85/src/Lib/phcpy2cpath_d.cpp --- phcpack-2.4.84/src/Lib/phcpy2cpath_d.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_d.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,5582 +0,0 @@ -/* This file phcpy2cpath_d.cpp contains the definitions of the prototypes - * in phcpy2cpath_d.h, for compilation with the g++ compiler. */ - -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "scalers.h" -#include "witset.h" -#include "mapcon.h" -#include "next_track.h" -#include "structmember.h" -#include "adepath_d.h" -#include "gpupath_d.h" - -extern void adainit ( void ); -extern void adafinal ( void ); - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -/* The wrapping functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -/* moving systems from and to containers */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) -{ - int fail,rc,nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_system(&rc,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nbtasks = 0; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; - fail = solve_Laurent_system(&rc,silent,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* wrapping functions in giftwrappers.h starts from here */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - nbr = support_size(); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; - fail = syscon_random_system(n,m,d,c); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free (exp); - free (c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in solcon.h starts from here */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_open_solution_input_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_dobldobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_quaddobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_multprec_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_dobldobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_quaddobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_multprec_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_standard_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_dobldobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_quaddobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_multprec_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_standard_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_dobldobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_quaddobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_multprec_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_standard_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_multprec_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_standard_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_dobldobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_quaddobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_multprec_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - - /* printf("Calling solcon_append_solution_string ...\n"); */ - - fail = solcon_append_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_dobldobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_quaddobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_multprec_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_dobldobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_quaddobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_multprec_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_standard_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_standard_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in product.h starts here */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = supporting_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 1024; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_structure_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = parse_set_structure(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ) -{ - int fail,result; - - initialize(); - if (!PyArg_ParseTuple(args,"i",&result)) return NULL; - fail = is_set_structure_supporting(&result); - - return Py_BuildValue("i",result); -} - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ) -{ - int fail,r; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = linear_product_root_count(&r); - - return Py_BuildValue("i",r); -} - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = random_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solve_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char partition[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); - - return Py_BuildValue("(i,s)",mbz,partition); -} - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_partition_Bezout_number(&mbz,ncp,partition); - - return Py_BuildValue("i",mbz); -} - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_homogeneous_start_system(ncp,partition); - - return Py_BuildValue("i",mbz); -} - -/* wrapping functions in celcon.h starts here */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = celcon_initialize_supports(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ) -{ - int fail,r,cnt; - char *strmix; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; - - cnt = itemcount(strmix); - { - int mix[cnt]; - - str2intlist(cnt,strmix,mix); - fail = celcon_set_type_of_mixture(r,mix); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) -{ - int fail,r,nbc; - int mix[64]; - char strmix[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = celcon_type_of_mixture(&r,mix); - nbc = intlist2str(r,mix,strmix); - - return Py_BuildValue("s",strmix); -} - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,cnt; - char *strpoint; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; - - cnt = itemcount(strpoint); - { - double point[cnt]; - - str2dbllist(cnt,strpoint,point); - fail = celcon_append_lifted_point(dim,ind,point); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,sup,ind,nbc; - char strpoint[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; - { - double liftedpoint[dim]; - - fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); - nbc = dbllist2str(dim,liftedpoint,strpoint); - } - - return Py_BuildValue("s",strpoint); -} - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ) -{ - int fail,mv; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_mixed_volume_of_supports(&mv); - - return Py_BuildValue("i",mv); -} - -static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) -{ - int fail,length; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_number_of_cells(&length); - - return Py_BuildValue("i",length); -} - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_dobldobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_quaddobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_dobldobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_quaddobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_dobldobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_quaddobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_dobldobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_quaddobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_clear_mixed_cell_configuration(); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) -{ - int d,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&d)) return NULL; - fail = embed_system(d); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_state_to_silent(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ) -{ - int n,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; - fail = define_output_file_with_string(n,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) -{ - int n,nbsols,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; - { - double x[2*n+5]; - int i,j,m; - - for(i=1; i<=nbsols; i++) - { - /* printf("... retrieving solution %d ...\n", i); */ - fail = solcon_retrieve_solution(n,i,&m,x); - /* printf("fail = %d, m = %d\n", fail, m); - printf("printing the coordinates : \n"); - for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ - m = i; - /* printf("... replacing solution %d ...\n", i); */ - fail = solcon_replace_solution(n,i,m,x); - /* printf("... done replacing solution solution %d ...\n", i); */ - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = initialize_sampler(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ) -{ - int n,d,k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; - fail = initialize_monodromy(n,d,k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = store_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = restore_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = track_paths(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = swap_slices(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) -{ - int k,n,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; - fail = new_slices(k,n); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ) -{ - int first,fail; - double r[2]; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&first)) return NULL; - - if(first == 1) /* determine constant coefficient */ - { - r[0] = -1.0; r[1] = 0.0; - } - else - { - r[0] = +1.0; r[1] = 0.0; - } - fail = assign_coefficient_of_slice(0,0,r); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) -{ - int n,i,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - - { - double re_gamma[n]; - double im_gamma[n]; - - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_irreducible_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_irreducible_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple - (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; -/* - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, - "Sets the state to monodromy permutations to silent."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_assign_labels", py2c_factor_assign_labels, - METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, - METH_VARARGS, - "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, - METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, - "Stores the solutions in the container to the data for monodromy loops."}, - {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, - METH_VARARGS, - "Restores the first initialized solutions from sampler to the container."}, - {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, - "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, - "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, - METH_VARARGS, - "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, - METH_VARARGS, - "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_components", py2c_factor_number_of_components, - METH_VARARGS, - "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, - {"py2c_factor_witness_points_of_component", - py2c_factor_witness_points_of_component, - METH_VARARGS, - "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, - METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, - METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, - {"py2c_start_diagonal_cascade_solutions", - py2c_start_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_littlewood_richardson_homotopies", - py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_newton_d", py2c_gpu_newton_d, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_onepath_d", py2c_gpu_onepath_d, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_manypaths_d", py2c_gpu_manypaths_d, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -PyMODINIT_FUNC initphcpy2c(void) -{ - Py_InitModule("phcpy2c", phcpy2c_methods); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_dd.cpp phcpack-2.4.85/src/Lib/phcpy2cpath_dd.cpp --- phcpack-2.4.84/src/Lib/phcpy2cpath_dd.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_dd.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,5582 +0,0 @@ -/* This file phcpy2cpath_dd.cpp contains the definitions of the prototypes - * in phcpy2cpath_dd.h, for compilation with the g++ compiler. */ - -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "scalers.h" -#include "witset.h" -#include "mapcon.h" -#include "next_track.h" -#include "structmember.h" -#include "adepath_dd.h" -#include "gpupath_dd.h" - -extern void adainit ( void ); -extern void adafinal ( void ); - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -/* The wrapping functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -/* moving systems from and to containers */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) -{ - int fail,rc,nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_system(&rc,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nbtasks = 0; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; - fail = solve_Laurent_system(&rc,silent,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* wrapping functions in giftwrappers.h starts from here */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - nbr = support_size(); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; - fail = syscon_random_system(n,m,d,c); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free (exp); - free (c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in solcon.h starts from here */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_open_solution_input_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_dobldobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_quaddobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_multprec_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_dobldobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_quaddobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_multprec_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_standard_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_dobldobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_quaddobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_multprec_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_standard_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_dobldobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_quaddobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_multprec_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_standard_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_multprec_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_standard_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_dobldobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_quaddobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_multprec_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - - /* printf("Calling solcon_append_solution_string ...\n"); */ - - fail = solcon_append_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_dobldobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_quaddobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_multprec_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_dobldobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_quaddobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_multprec_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_standard_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_standard_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in product.h starts here */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = supporting_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 1024; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_structure_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = parse_set_structure(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ) -{ - int fail,result; - - initialize(); - if (!PyArg_ParseTuple(args,"i",&result)) return NULL; - fail = is_set_structure_supporting(&result); - - return Py_BuildValue("i",result); -} - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ) -{ - int fail,r; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = linear_product_root_count(&r); - - return Py_BuildValue("i",r); -} - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = random_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solve_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char partition[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); - - return Py_BuildValue("(i,s)",mbz,partition); -} - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_partition_Bezout_number(&mbz,ncp,partition); - - return Py_BuildValue("i",mbz); -} - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_homogeneous_start_system(ncp,partition); - - return Py_BuildValue("i",mbz); -} - -/* wrapping functions in celcon.h starts here */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = celcon_initialize_supports(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ) -{ - int fail,r,cnt; - char *strmix; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; - - cnt = itemcount(strmix); - { - int mix[cnt]; - - str2intlist(cnt,strmix,mix); - fail = celcon_set_type_of_mixture(r,mix); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) -{ - int fail,r,nbc; - int mix[64]; - char strmix[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = celcon_type_of_mixture(&r,mix); - nbc = intlist2str(r,mix,strmix); - - return Py_BuildValue("s",strmix); -} - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,cnt; - char *strpoint; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; - - cnt = itemcount(strpoint); - { - double point[cnt]; - - str2dbllist(cnt,strpoint,point); - fail = celcon_append_lifted_point(dim,ind,point); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,sup,ind,nbc; - char strpoint[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; - { - double liftedpoint[dim]; - - fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); - nbc = dbllist2str(dim,liftedpoint,strpoint); - } - - return Py_BuildValue("s",strpoint); -} - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ) -{ - int fail,mv; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_mixed_volume_of_supports(&mv); - - return Py_BuildValue("i",mv); -} - -static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) -{ - int fail,length; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_number_of_cells(&length); - - return Py_BuildValue("i",length); -} - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_dobldobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_quaddobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_dobldobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_quaddobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_dobldobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_quaddobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_dobldobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_quaddobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_clear_mixed_cell_configuration(); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) -{ - int d,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&d)) return NULL; - fail = embed_system(d); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_state_to_silent(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ) -{ - int n,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; - fail = define_output_file_with_string(n,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) -{ - int n,nbsols,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; - { - double x[2*n+5]; - int i,j,m; - - for(i=1; i<=nbsols; i++) - { - /* printf("... retrieving solution %d ...\n", i); */ - fail = solcon_retrieve_solution(n,i,&m,x); - /* printf("fail = %d, m = %d\n", fail, m); - printf("printing the coordinates : \n"); - for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ - m = i; - /* printf("... replacing solution %d ...\n", i); */ - fail = solcon_replace_solution(n,i,m,x); - /* printf("... done replacing solution solution %d ...\n", i); */ - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = initialize_sampler(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ) -{ - int n,d,k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; - fail = initialize_monodromy(n,d,k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = store_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = restore_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = track_paths(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = swap_slices(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) -{ - int k,n,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; - fail = new_slices(k,n); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ) -{ - int first,fail; - double r[2]; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&first)) return NULL; - - if(first == 1) /* determine constant coefficient */ - { - r[0] = -1.0; r[1] = 0.0; - } - else - { - r[0] = +1.0; r[1] = 0.0; - } - fail = assign_coefficient_of_slice(0,0,r); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) -{ - int n,i,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - - { - double re_gamma[n]; - double im_gamma[n]; - - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_irreducible_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_irreducible_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple - (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; -/* - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, - "Sets the state to monodromy permutations to silent."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_assign_labels", py2c_factor_assign_labels, - METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, - METH_VARARGS, - "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, - METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, - "Stores the solutions in the container to the data for monodromy loops."}, - {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, - METH_VARARGS, - "Restores the first initialized solutions from sampler to the container."}, - {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, - "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, - "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, - METH_VARARGS, - "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, - METH_VARARGS, - "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_components", py2c_factor_number_of_components, - METH_VARARGS, - "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, - {"py2c_factor_witness_points_of_component", - py2c_factor_witness_points_of_component, - METH_VARARGS, - "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, - METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, - METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, - {"py2c_start_diagonal_cascade_solutions", - py2c_start_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_littlewood_richardson_homotopies", - py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_newton_dd", py2c_gpu_newton_dd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_onepath_dd", py2c_gpu_onepath_dd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_manypaths_dd", py2c_gpu_manypaths_dd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -PyMODINIT_FUNC initphcpy2c(void) -{ - Py_InitModule("phcpy2c", phcpy2c_methods); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_dd.h phcpack-2.4.85/src/Lib/phcpy2cpath_dd.h --- phcpack-2.4.84/src/Lib/phcpy2cpath_dd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_dd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3200 +0,0 @@ -/* This file contains the prototypes for the py2c interface functions, - * linked with the double double version of the Path library. */ - -void initialize ( void ); -/* - * DESCRIPTION : - * Calls adainit(), initializing the interface to the Ada code, - * setting the initialized flag to one and the finalized flag to zero, - * if the initialized flag was zero. - * Nothing happens if the initialized flag equals one. */ - -void finalize ( void ); -/* - * DESCRIPTION : - * Calls adafinal(), finalizing the interface to the Ada code, - * setting the finalized flag to one and the initialized flag to zero, - * if the finalized flag was zero. - * Nothing happens if the finalized flag equals one. */ - -/* The wrapping of functions with prototypes in phcpack.h starts here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the version string of PHCpack. - * The version string is 40 characters long. */ - -static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the value of the integer given on input - * and sets the seed for the random number generators. - * This fixing of the seed enables reproducible runs. */ - -static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of the seed. - * Using this value in py2c_set_seed will ensure that the - * results of previous runs can be reproduced. */ - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to define the output file. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in standard double precision - * to screen or to the defined output file. */ - -/* Copying systems from and to containers. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the target system. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the target system. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the target system. */ - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the target system. */ - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the start system. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the start system. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the start system. */ - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the start system. */ - -/* Creation of homotopy and the tracking of all paths. */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in standard double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in double double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in quad double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in arbitrary multiprecision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start solutions in standard double precision either to - * the screen (standard output) or to the defined output file. - * On return is the failure code, which is zero if all is well. */ - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to tune the continuation parameters. */ - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Shows the current values of the continuation parameters. */ - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tunes the values of the continuation parameters. - * On input are two integers: - * 1) the difficulty level of the solution paths; and - * 2) the number of decimal places in the precision. */ - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to determine the level of output - * during the path tracking. */ - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in arbitrary multiprecision. - * On input is one integer: the number of decimal places in the precision. - * On return is the failure code, which is zero when all went well. */ - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the target solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the target solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the target solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the target solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the start solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the start solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the start solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the start solutions in arbitrary multiprecision. */ - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in standard double precision. - * One integer is expected on input: the number of tasks. - * If that number is zero, then no multitasking is applied. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard systems container. */ - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in standard double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; and - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard Laurent systems - * container. */ - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed volume, and the stable mixed volume as well if - * the input parameter equals 1. On return is the mixed volume, or - * a tuple with the mixed volume and the stable mixed volume. */ - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in standard double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in double double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in quad double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the system in - * the standard systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the system in - * the dobldobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the system in - * the quaddobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the system in - * the multprec systems container and to the solutions in the container. - * On input is an integer, the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the Laurent - * system in the standard Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the Laurent - * system in the dobldobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the Laurent - * system in the quaddobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the Laurent - * system in the multprec Laurent systems container and to the solutions - * in the container. - * On input is an integer: the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies Newton's method in variable precision. - * There are six input parameters: - * 1) the dimension: the number of variables and equations; - * 2) the accuracy, expressed as the correct number of decimal places; - * 3) the maximum number of iterations in Newton's method; - * 4) an upper bound on the number of decimal places in the precision; - * 5) a string, with the representation of the polynomials in the system. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in unisolvers.h starts here. */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with standard double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the standard systems container. After the call of this function, - * the standard solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with double double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the dobldobl systems container. After the call of this function, - * the dobldobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with quad double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the quaddobl systems container. After the call of this function, - * the quaddobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with arbitrary multiprecision arithmetic. - * On input are three numbers: - * 1) the number of decimal places in the working precision; - * 2) the maximum number of iterations in the method of Weierstrass; and - * 3) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the multprec systems container. After the call of this function, - * the multprec solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a planar point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * On return is the string representation of the vertex points, - * sorted so that each two consecutive points define an edge. */ - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * When the function returns, the internal data structures - * to store the convex hull are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of facets of the given dimension. - * On input is an integer, the dimension of the facet. */ - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a facet. - * On input are two integer numbers: - * 1) the dimension of the facet; - * 2) the index of the facet. */ - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension three. */ - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension four. */ - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation of - * the support of the first Laurent polynomial in the container. */ - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the support - * of a Laurent polynomial. */ - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the string representation of the support set - * that was stored internally by the call py2c_giftwrap_support_size. */ - -static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the Laurent systems container by its initial form. - * There are three input parameters: - * 1) the dimension, number of coordinates in the inner normal; - * 2) the number of characters in the string representation for the normal; - * 3) the string representation of the inner normal. - * On return is the failure code, which equals zero if all went well. */ - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in standard double precision. - * The system will be placed in the standard systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in standard double precision. - * The system will be placed in the standard Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in double double precision. - * The system will be placed in the dobldobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in double double precision. - * The system will be placed in the dobldobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in quad double precision. - * The system will be placed in the quaddobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in quad double precision. - * The system will be placed in the quaddobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in arbitrary multiprecision. The one input parameter is an integer, - * the number of decimal places in the working precision. - * The system will be placed in the multprec systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in arbitrary multiprecision. The one input parameter is - * an integer, the number of decimal places in the working precision. - * The system will be placed in the multprec Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in standard double precision. - * There are four integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]. */ - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with standard double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with standard double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with double double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with double double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with quad double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with quad double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with arbitrary multiprecision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with arbitrary multiprecision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of symbols in the symbol table. */ - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the symbols in the symbol table to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string that contains the symbols in the symbol table. - * The symbols are separate from each other by one space. */ - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Removes a symbol, given by name, from the symbol table. - * On input are two arguments: - * 1) an integer, as the number of characters in the name; - * 2) a string of characters with the name of the symbol. - * The failure code is returned, which equals zero when all went well. */ - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the symbol table. */ - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in standard - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in double - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in quad - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in arbitrary - * multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * standard double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * double double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * quad double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * arbitrary multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in standard double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in double double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in quad double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in arbitrary multiprecision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th polynomial stored in the - * container for systems with coefficients in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th Laurent polynomial stored - * in the container for Laurent polynomials systems with coefficients - * in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves one term of a polynomial with coefficients in standard - * double precision, that is stored in the systems container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns in d the total degree of the system with coefficients in - * standard double precision, as stored in the container. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syson_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in solcon.h starts here. */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in standard double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in double double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in quad double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in arbitrary multiprecision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in standard double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in double double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in quad double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in arbitrary multiprecision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in standard double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in double double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in quad double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in arbitrary multiprecision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for the name of the input file for the solutions and - * opens the input file. All subsequent reading happens from this input. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in standard double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in double double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in quad double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in arbitrary multiprecision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in standard double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in double double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in quad double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in arbitrary multiprecision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current standard solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current dobldobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current quaddobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current multprec solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in standard double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in arbitrary multiprecision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current standard double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current double double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current quad double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current arbitrary multiprecision solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current standard double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in standard double precision in the container. */ - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current double double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in double double precision in the container. */ - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current quad double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in quad double precision in the container. */ - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current multiprecision solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in arbitrary multiprecision in the container. */ - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in standard double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in double double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in quad double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in arbitrary multiprecision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in standard double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in double double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in quad double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in arbitrary multiprecision, - * as stored in the container. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions in product.h starts here. */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a supporting set structure for the system stored in the - * container with coefficients in standard double precision. */ - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the supporting set structure to screen. */ - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the set structure. */ - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Parses a given string into a set structure. - * On input are two parameters, one integer and one string: - * 1) the number of characters in the given string; and - * 2) the characters in the string. - * On return is the failure code, if zero, then the string - * has been parsed into a valid set structure. */ - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Checks whether the stored set structure is supporting - * for the system in the standard systems container. - * Returns an integer which represents true (1) or false (0). */ - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the linear-product root count, computed from - * the supporting set structure. */ - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a random linear-product system based on the - * stored set structure. On return is the failure code, - * which equals zero if all went well. */ - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes all solutions to the linear-product system - * and stores the solutions in the container for solutions - * in standard double precision. On return is the failure - * code, which equals zero if all went well. */ - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the set structure. */ - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system in the standard systems container, - * a heuristic partition of the set of variables may - * lead to a Bezout number that is smaller than the total degree. - * On return is the m-homogeneous Bezout number for the - * string representation of the partition that is returned - * as the second argument in the tuple. */ - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, computes - * the m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, constructs - * an m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -/* The wrapping of functions with prototypes in celcon.h starts here. */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_celcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string representation of a lifted point. - * On input are three integer numbers: - * 1) the number of coordinates in the lifted point; - * 2) the index to the support set; and - * 3) the index to the point in that support set. */ - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_celcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in standard double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in double double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in quad double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in standard double precision is copied - * from the cell container to the container for systems with - * coefficients in standard double precision. */ - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in double double precision is copied - * from the cell container to the container for systems with - * coefficients in double double precision. */ - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in quad double precision is copied - * from the cell container to the container for systems with - * coefficients in quad double precision. */ - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in standard double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in double double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in quad double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using standard double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in standard double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using double double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in double double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using quad double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in quad double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in standard double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in double double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in quad double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with standard double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with double double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with quad double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data in the cell container. */ - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the standard systems container, - * with standard double precision arithmetic. The system in the standard - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the dobldobl systems container, - * with double double precision arithmetic. The system in the dobldobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the quaddobl systems container, - * with quad double precision arithmetic. The system in the quaddobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard solutions container with - * the scaled solutions, scaled with standard double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the dobldobl solutions container with - * the scaled solutions, scaled with double double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quaddobl solutions container with - * the scaled solutions, scaled with quad double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in a the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in standard double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations to silent. */ - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the output file for the factorization. - * On input are an integer and a string: - * 1) the integer equals the number of characters in the string; and - * 2) the string contains the name of a file. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in standard double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set. - * On entry is the dimension or the number of hyperplanes - * to slide the positive dimensional solution set. */ - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container to the data for monodromy loops. */ - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions from sampler to the container. */ - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_permutation_after_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a solution set of degree d, computes the permutation using the - * solutions most recently stored, after a loop. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_update_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the current - * decomposition of the witness set. */ - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_witness_set_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container on - * return contain a witness set for the hypersurface defined by p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a polynomial, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_create_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. */ - -static PyObject *py2c_start_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_extrinsic_top_diagonal_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the start and target system to - * start the extrinsic cascade to intersect two witness sets, - * respectively of dimensions a and b, with ambient dimensions - * respectively equal to n1 and n2. - * There are four integers as parameters on input: n1, n2, a and b. */ - -static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of Pieri and Littlewood-Richardson homotopies, - * with prototypes in schubert.h starts here. */ - -static PyObject *py2c_schubert_pieri_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of p-plane producing curves of degree q - * that meet m*p + q*(m+p) given general m-planes. - * On input are three integer numbers: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; and - * 3) q, the degree of the curve that produces p-planes. - * The dimension of the ambient space of this Pieri problem is m+p. */ - -static PyObject *py2c_schubert_resolve_conditions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resolves a general Schubert intersection condition in n-space - * for k-planes subject to conditions defined by brackers. - * On return is the root count, the number of k-planes that satisfy - * the intersection conditions imposed by the brackets for general flags. - * On entry are five integers and one string: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c, the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen. */ - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space. - * The polynomial system that was solved is in the container for - * systems with coefficients in standard double precision and the - * corresponding solutions are in the standard solutions container. - * On entry are six integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen; - * 7) nbchar, the number of characters in the string filename; - * 8) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_localization_poset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the localization poset for the - * Pieri root count for m, p, and q. The input parameters are the - * integer values for m, p, and q: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the curves that produce p-planes. */ - -static PyObject *py2c_schubert_pieri_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. - * On return the systems container for systems with coefficients in standard - * double precision contains the polynomial system solved and in the - * solutions in standard double precision are in the solutions container. - * On entry are four integers and two strings: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, the string with m*p + q*(m+p) random complex input m-planes, - * where the real and imaginary parts are separated by a space; - * 6) pts, the string with m*p + q*(m+p) random complex interpolation - * points, only needed if q > 0. - * The function returns the combinatorial Pieri root count, - * which should equal the number of solutions in the container. */ - -static PyObject *py2c_schubert_osculating_planes - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of n real m-planes in - * d-space osculating a rational normal curve - * at the n points in s, where n = m*p + q*(m+p) and d = m+p. - * On entry are four integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string pts; and - * 5) pts, the string with m*p + q*(m+p) interpolation points. */ - -static PyObject *py2c_schubert_pieri_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Fills the container of systems with coefficients in standard - * double precision with a polynomial system that expresses the - * intersection conditions of a general Pieri problem. - * On input are five integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, m*p + q*(m+p) random complex input m-planes, where - * the real and imaginary parts are separated by a space; - * 6) a flag is_real: if == 1, then the coefficients of A are real, - * if == 0, then the coefficients of A are complex. - * Returns the failure code, which equals zero if all went well. */ - -/* The wrapping functions in mapcon.h starts here. */ - -static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the binomial system stored in the Laurent systems container. - * There is one input argument, either one or zero. - * If one, then only the pure top dimensional solutions are computed. - * If zero, then all solution sets are computed. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the maps stored in the container to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the maps stored in the container. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the top dimension of the maps in the container. */ - -static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of maps in the container. */ - -static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the dimension and index of a map, given as two integers as - * input parameters, returns the degree of that map. */ - -static PyObject *py2c_mapcon_coefficients_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the coefficients of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of complex doubles. */ - -static PyObject *py2c_mapcon_exponents_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the exponents of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of integers. */ - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using standard double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the standard systems container. */ - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using double double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the dobldobl systems container. */ - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using quad double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the quaddobl systems container. */ - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using arbitrary multiprecision arithmetic. - * There is are two integer numbers on input: - * 1) one to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used; and - * 2) the number of decimal places in the working precision. - * Before calling this routine the target and start system must - * be copied over from the multprec systems container. */ - -static PyObject *py2c_initialize_varprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the variable precision homotopy with the target and - * start system stored in the strings. - * On entry are three integers and two strings, in the following order: - * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant - * is used, if 0, a random value for gamma will be generated; - * 2) nc_target, the number of characters in the string target; - * 3) target, the string representation of the target system; - * 4) nc_start, the number of characters in the string start; - * 5) start, the string representation of the start system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the standard solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the dobldobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the quaddobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the multprec solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Uses the string representation of a solution to initialize the - * variable precision path tracker with. - * There are three input parameters, two integers and one string: - * 1) nv, the number of variables in the solution; - * 2) nc, the number of characters in the string sol; - * 3) sol, the string representation of a solution. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with standard double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the standard solutions container. - * The functions py2c_initialized_standard_tracker and - * py2c_initialize_standard_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with double double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the dobldobl solutions container. - * The functions py2c_initialized_dobldobl_tracker and - * py2c_initialize_dobldobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with quad double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the quaddobl solutions container. - * The functions py2c_initialized_quaddobl_tracker and - * py2c_initialize_quaddobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with arbitrary - * multiprecision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the multprec solutions container. - * The functions py2c_initialized_multprec_tracker and - * py2c_initialize_multprec_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on a solution path in variable precision. - * There are four integer input parameters: - * 1) the number of correct decimal places in the solution; - * 2) an upper bound on the number of decimal places in the precision; - * 3) the maximum number of Newton iterations; - * 4) a flag zero or one to indicate the verbose level. - * On return is a tuple: - * 0) the failure code, which equals zero if all went well; and - * 1) the string representation of the next solution on the path. */ - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the standard double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the double double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the quad double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the arbitrary multiprecision tracker - * with a generator. */ - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the variable precision tracker - * with a generator. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in double double precision by the - * functions in adepath_dd.h, starts here. */ - -static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in double - * double double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in double - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in double double precision on the GPU - * by the functions in gpupath_dd.h, starts here. */ - -static PyObject *py2c_gpu_newton_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The dobldobl systems container contains a valid polynomial system - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_gpu_onepath_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_gpu_manypaths_dd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU and GPU - * in double double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The start and target systems have been defined - * and the dobldobl solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_d.h phcpack-2.4.85/src/Lib/phcpy2cpath_d.h --- phcpack-2.4.84/src/Lib/phcpy2cpath_d.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_d.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3197 +0,0 @@ -/* This file contains the prototypes for the py2c interface functions, - * linked with the double version of the Path library. */ - -void initialize ( void ); -/* - * DESCRIPTION : - * Calls adainit(), initializing the interface to the Ada code, - * setting the initialized flag to one and the finalized flag to zero, - * if the initialized flag was zero. - * Nothing happens if the initialized flag equals one. */ - -void finalize ( void ); -/* - * DESCRIPTION : - * Calls adafinal(), finalizing the interface to the Ada code, - * setting the finalized flag to one and the initialized flag to zero, - * if the finalized flag was zero. - * Nothing happens if the finalized flag equals one. */ - -/* The wrapping of functions with prototypes in phcpack.h starts here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the version string of PHCpack. - * The version string is 40 characters long. */ - -static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the value of the integer given on input - * and sets the seed for the random number generators. - * This fixing of the seed enables reproducible runs. */ - -static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of the seed. - * Using this value in py2c_set_seed will ensure that the - * results of previous runs can be reproduced. */ - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to define the output file. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in standard double precision - * to screen or to the defined output file. */ - -/* Copying systems from and to containers. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the target system. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the target system. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the target system. */ - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the target system. */ - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the start system. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the start system. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the start system. */ - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the start system. */ - -/* Creation of homotopy and the tracking of all paths. */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in standard double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in double double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in quad double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in arbitrary multiprecision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start solutions in standard double precision either to - * the screen (standard output) or to the defined output file. - * On return is the failure code, which is zero if all is well. */ - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to tune the continuation parameters. */ - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Shows the current values of the continuation parameters. */ - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tunes the values of the continuation parameters. - * On input are two integers: - * 1) the difficulty level of the solution paths; and - * 2) the number of decimal places in the precision. */ - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to determine the level of output - * during the path tracking. */ - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in arbitrary multiprecision. - * On input is one integer: the number of decimal places in the precision. - * On return is the failure code, which is zero when all went well. */ - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the target solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the target solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the target solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the target solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the start solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the start solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the start solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the start solutions in arbitrary multiprecision. */ - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in standard double precision. - * One integer is expected on input: the number of tasks. - * If that number is zero, then no multitasking is applied. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard systems container. */ - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in standard double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; and - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard Laurent systems - * container. */ - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed volume, and the stable mixed volume as well if - * the input parameter equals 1. On return is the mixed volume, or - * a tuple with the mixed volume and the stable mixed volume. */ - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in standard double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in double double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in quad double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the system in - * the standard systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the system in - * the dobldobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the system in - * the quaddobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the system in - * the multprec systems container and to the solutions in the container. - * On input is an integer, the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the Laurent - * system in the standard Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the Laurent - * system in the dobldobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the Laurent - * system in the quaddobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the Laurent - * system in the multprec Laurent systems container and to the solutions - * in the container. - * On input is an integer: the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies Newton's method in variable precision. - * There are six input parameters: - * 1) the dimension: the number of variables and equations; - * 2) the accuracy, expressed as the correct number of decimal places; - * 3) the maximum number of iterations in Newton's method; - * 4) an upper bound on the number of decimal places in the precision; - * 5) a string, with the representation of the polynomials in the system. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in unisolvers.h starts here. */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with standard double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the standard systems container. After the call of this function, - * the standard solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with double double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the dobldobl systems container. After the call of this function, - * the dobldobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with quad double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the quaddobl systems container. After the call of this function, - * the quaddobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with arbitrary multiprecision arithmetic. - * On input are three numbers: - * 1) the number of decimal places in the working precision; - * 2) the maximum number of iterations in the method of Weierstrass; and - * 3) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the multprec systems container. After the call of this function, - * the multprec solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a planar point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * On return is the string representation of the vertex points, - * sorted so that each two consecutive points define an edge. */ - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * When the function returns, the internal data structures - * to store the convex hull are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of facets of the given dimension. - * On input is an integer, the dimension of the facet. */ - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a facet. - * On input are two integer numbers: - * 1) the dimension of the facet; - * 2) the index of the facet. */ - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension three. */ - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension four. */ - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation of - * the support of the first Laurent polynomial in the container. */ - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the support - * of a Laurent polynomial. */ - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the string representation of the support set - * that was stored internally by the call py2c_giftwrap_support_size. */ - -static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the Laurent systems container by its initial form. - * There are three input parameters: - * 1) the dimension, number of coordinates in the inner normal; - * 2) the number of characters in the string representation for the normal; - * 3) the string representation of the inner normal. - * On return is the failure code, which equals zero if all went well. */ - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in standard double precision. - * The system will be placed in the standard systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in standard double precision. - * The system will be placed in the standard Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in double double precision. - * The system will be placed in the dobldobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in double double precision. - * The system will be placed in the dobldobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in quad double precision. - * The system will be placed in the quaddobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in quad double precision. - * The system will be placed in the quaddobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in arbitrary multiprecision. The one input parameter is an integer, - * the number of decimal places in the working precision. - * The system will be placed in the multprec systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in arbitrary multiprecision. The one input parameter is - * an integer, the number of decimal places in the working precision. - * The system will be placed in the multprec Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in standard double precision. - * There are four integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]. */ - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with standard double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with standard double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with double double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with double double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with quad double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with quad double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with arbitrary multiprecision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with arbitrary multiprecision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of symbols in the symbol table. */ - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the symbols in the symbol table to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string that contains the symbols in the symbol table. - * The symbols are separate from each other by one space. */ - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Removes a symbol, given by name, from the symbol table. - * On input are two arguments: - * 1) an integer, as the number of characters in the name; - * 2) a string of characters with the name of the symbol. - * The failure code is returned, which equals zero when all went well. */ - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the symbol table. */ - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in standard - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in double - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in quad - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in arbitrary - * multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * standard double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * double double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * quad double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * arbitrary multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in standard double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in double double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in quad double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in arbitrary multiprecision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th polynomial stored in the - * container for systems with coefficients in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th Laurent polynomial stored - * in the container for Laurent polynomials systems with coefficients - * in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves one term of a polynomial with coefficients in standard - * double precision, that is stored in the systems container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns in d the total degree of the system with coefficients in - * standard double precision, as stored in the container. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syson_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in solcon.h starts here. */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in standard double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in double double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in quad double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in arbitrary multiprecision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in standard double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in double double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in quad double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in arbitrary multiprecision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in standard double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in double double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in quad double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in arbitrary multiprecision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for the name of the input file for the solutions and - * opens the input file. All subsequent reading happens from this input. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in standard double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in double double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in quad double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in arbitrary multiprecision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in standard double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in double double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in quad double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in arbitrary multiprecision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current standard solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current dobldobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current quaddobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current multprec solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in standard double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in arbitrary multiprecision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current standard double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current double double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current quad double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current arbitrary multiprecision solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current standard double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in standard double precision in the container. */ - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current double double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in double double precision in the container. */ - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current quad double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in quad double precision in the container. */ - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current multiprecision solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in arbitrary multiprecision in the container. */ - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in standard double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in double double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in quad double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in arbitrary multiprecision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in standard double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in double double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in quad double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in arbitrary multiprecision, - * as stored in the container. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions in product.h starts here. */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a supporting set structure for the system stored in the - * container with coefficients in standard double precision. */ - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the supporting set structure to screen. */ - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the set structure. */ - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Parses a given string into a set structure. - * On input are two parameters, one integer and one string: - * 1) the number of characters in the given string; and - * 2) the characters in the string. - * On return is the failure code, if zero, then the string - * has been parsed into a valid set structure. */ - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Checks whether the stored set structure is supporting - * for the system in the standard systems container. - * Returns an integer which represents true (1) or false (0). */ - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the linear-product root count, computed from - * the supporting set structure. */ - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a random linear-product system based on the - * stored set structure. On return is the failure code, - * which equals zero if all went well. */ - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes all solutions to the linear-product system - * and stores the solutions in the container for solutions - * in standard double precision. On return is the failure - * code, which equals zero if all went well. */ - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the set structure. */ - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system in the standard systems container, - * a heuristic partition of the set of variables may - * lead to a Bezout number that is smaller than the total degree. - * On return is the m-homogeneous Bezout number for the - * string representation of the partition that is returned - * as the second argument in the tuple. */ - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, computes - * the m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, constructs - * an m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -/* The wrapping of functions with prototypes in celcon.h starts here. */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_celcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string representation of a lifted point. - * On input are three integer numbers: - * 1) the number of coordinates in the lifted point; - * 2) the index to the support set; and - * 3) the index to the point in that support set. */ - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_celcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in standard double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in double double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in quad double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in standard double precision is copied - * from the cell container to the container for systems with - * coefficients in standard double precision. */ - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in double double precision is copied - * from the cell container to the container for systems with - * coefficients in double double precision. */ - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in quad double precision is copied - * from the cell container to the container for systems with - * coefficients in quad double precision. */ - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in standard double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in double double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in quad double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using standard double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in standard double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using double double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in double double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using quad double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in quad double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in standard double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in double double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in quad double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with standard double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with double double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with quad double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data in the cell container. */ - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the standard systems container, - * with standard double precision arithmetic. The system in the standard - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the dobldobl systems container, - * with double double precision arithmetic. The system in the dobldobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the quaddobl systems container, - * with quad double precision arithmetic. The system in the quaddobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard solutions container with - * the scaled solutions, scaled with standard double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the dobldobl solutions container with - * the scaled solutions, scaled with double double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quaddobl solutions container with - * the scaled solutions, scaled with quad double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in a the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in standard double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations to silent. */ - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the output file for the factorization. - * On input are an integer and a string: - * 1) the integer equals the number of characters in the string; and - * 2) the string contains the name of a file. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in standard double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set. - * On entry is the dimension or the number of hyperplanes - * to slide the positive dimensional solution set. */ - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container to the data for monodromy loops. */ - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions from sampler to the container. */ - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_permutation_after_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a solution set of degree d, computes the permutation using the - * solutions most recently stored, after a loop. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_update_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the current - * decomposition of the witness set. */ - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_witness_set_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container on - * return contain a witness set for the hypersurface defined by p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a polynomial, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_create_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. */ - -static PyObject *py2c_start_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_extrinsic_top_diagonal_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the start and target system to - * start the extrinsic cascade to intersect two witness sets, - * respectively of dimensions a and b, with ambient dimensions - * respectively equal to n1 and n2. - * There are four integers as parameters on input: n1, n2, a and b. */ - -static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of Pieri and Littlewood-Richardson homotopies, - * with prototypes in schubert.h starts here. */ - -static PyObject *py2c_schubert_pieri_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of p-plane producing curves of degree q - * that meet m*p + q*(m+p) given general m-planes. - * On input are three integer numbers: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; and - * 3) q, the degree of the curve that produces p-planes. - * The dimension of the ambient space of this Pieri problem is m+p. */ - -static PyObject *py2c_schubert_resolve_conditions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resolves a general Schubert intersection condition in n-space - * for k-planes subject to conditions defined by brackers. - * On return is the root count, the number of k-planes that satisfy - * the intersection conditions imposed by the brackets for general flags. - * On entry are five integers and one string: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c, the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen. */ - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space. - * The polynomial system that was solved is in the container for - * systems with coefficients in standard double precision and the - * corresponding solutions are in the standard solutions container. - * On entry are six integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen; - * 7) nbchar, the number of characters in the string filename; - * 8) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_localization_poset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the localization poset for the - * Pieri root count for m, p, and q. The input parameters are the - * integer values for m, p, and q: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the curves that produce p-planes. */ - -static PyObject *py2c_schubert_pieri_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. - * On return the systems container for systems with coefficients in standard - * double precision contains the polynomial system solved and in the - * solutions in standard double precision are in the solutions container. - * On entry are four integers and two strings: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, the string with m*p + q*(m+p) random complex input m-planes, - * where the real and imaginary parts are separated by a space; - * 6) pts, the string with m*p + q*(m+p) random complex interpolation - * points, only needed if q > 0. - * The function returns the combinatorial Pieri root count, - * which should equal the number of solutions in the container. */ - -static PyObject *py2c_schubert_osculating_planes - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of n real m-planes in - * d-space osculating a rational normal curve - * at the n points in s, where n = m*p + q*(m+p) and d = m+p. - * On entry are four integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string pts; and - * 5) pts, the string with m*p + q*(m+p) interpolation points. */ - -static PyObject *py2c_schubert_pieri_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Fills the container of systems with coefficients in standard - * double precision with a polynomial system that expresses the - * intersection conditions of a general Pieri problem. - * On input are five integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, m*p + q*(m+p) random complex input m-planes, where - * the real and imaginary parts are separated by a space; - * 6) a flag is_real: if == 1, then the coefficients of A are real, - * if == 0, then the coefficients of A are complex. - * Returns the failure code, which equals zero if all went well. */ - -/* The wrapping functions in mapcon.h starts here. */ - -static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the binomial system stored in the Laurent systems container. - * There is one input argument, either one or zero. - * If one, then only the pure top dimensional solutions are computed. - * If zero, then all solution sets are computed. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the maps stored in the container to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the maps stored in the container. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the top dimension of the maps in the container. */ - -static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of maps in the container. */ - -static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the dimension and index of a map, given as two integers as - * input parameters, returns the degree of that map. */ - -static PyObject *py2c_mapcon_coefficients_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the coefficients of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of complex doubles. */ - -static PyObject *py2c_mapcon_exponents_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the exponents of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of integers. */ - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using standard double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the standard systems container. */ - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using double double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the dobldobl systems container. */ - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using quad double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the quaddobl systems container. */ - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using arbitrary multiprecision arithmetic. - * There is are two integer numbers on input: - * 1) one to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used; and - * 2) the number of decimal places in the working precision. - * Before calling this routine the target and start system must - * be copied over from the multprec systems container. */ - -static PyObject *py2c_initialize_varprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the variable precision homotopy with the target and - * start system stored in the strings. - * On entry are three integers and two strings, in the following order: - * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant - * is used, if 0, a random value for gamma will be generated; - * 2) nc_target, the number of characters in the string target; - * 3) target, the string representation of the target system; - * 4) nc_start, the number of characters in the string start; - * 5) start, the string representation of the start system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the standard solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the dobldobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the quaddobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the multprec solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Uses the string representation of a solution to initialize the - * variable precision path tracker with. - * There are three input parameters, two integers and one string: - * 1) nv, the number of variables in the solution; - * 2) nc, the number of characters in the string sol; - * 3) sol, the string representation of a solution. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with standard double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the standard solutions container. - * The functions py2c_initialized_standard_tracker and - * py2c_initialize_standard_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with double double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the dobldobl solutions container. - * The functions py2c_initialized_dobldobl_tracker and - * py2c_initialize_dobldobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with quad double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the quaddobl solutions container. - * The functions py2c_initialized_quaddobl_tracker and - * py2c_initialize_quaddobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with arbitrary - * multiprecision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the multprec solutions container. - * The functions py2c_initialized_multprec_tracker and - * py2c_initialize_multprec_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on a solution path in variable precision. - * There are four integer input parameters: - * 1) the number of correct decimal places in the solution; - * 2) an upper bound on the number of decimal places in the precision; - * 3) the maximum number of Newton iterations; - * 4) a flag zero or one to indicate the verbose level. - * On return is a tuple: - * 0) the failure code, which equals zero if all went well; and - * 1) the string representation of the next solution on the path. */ - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the standard double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the double double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the quad double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the arbitrary multiprecision tracker - * with a generator. */ - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the variable precision tracker - * with a generator. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in double precision by the - * functions in adepath_d.h, starts here. */ - -static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in double precision on the GPU - * by the functions in gpupath_d.h, starts here. */ - -static PyObject *py2c_gpu_newton_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU and GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The standard systems container contains a valid polynomial system - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_gpu_onepath_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU and GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_gpu_manypaths_d ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU and GPU - * in double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the standard solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_qd.cpp phcpack-2.4.85/src/Lib/phcpy2cpath_qd.cpp --- phcpack-2.4.84/src/Lib/phcpy2cpath_qd.cpp 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_qd.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,5582 +0,0 @@ -/* This file phcpy2cpath_qd.cpp contains the definitions of the prototypes - * in phcpy2cpath_qd.h, for compilation with the g++ compiler. */ - -#include -#include -#include -#include "phcpack.h" -#include "unisolvers.h" -#include "giftwrappers.h" -#include "schubert.h" -#include "syscon.h" -#include "solcon.h" -#include "product.h" -#include "lists_and_strings.h" -#include "celcon.h" -#include "scalers.h" -#include "witset.h" -#include "mapcon.h" -#include "next_track.h" -#include "structmember.h" -#include "adepath_qd.h" -#include "gpupath_qd.h" - -extern void adainit ( void ); -extern void adafinal ( void ); - -int g_ada_initialized = 0; -int g_ada_finalized = 0; - -void initialize ( void ) -{ - if(!g_ada_initialized) - { - adainit(); - g_ada_initialized = 1; - g_ada_finalized = 0; - } -} - -void finalize ( void ) -{ - if(!g_ada_finalized) - { - adafinal(); - g_ada_finalized = 1; - g_ada_initialized = 0; - } -} - -/* The wrapping functions in phcpack.h starts from here. */ - -static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 40; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = version_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; - - fail = set_seed(seed); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) -{ - int fail,seed; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = get_seed(&seed); - - return Py_BuildValue("i",seed); -} - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_standard_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_dobldobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_dobldobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_target_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = read_quaddobl_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; - fail = read_quaddobl_start_system_from_file(nc,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = define_output_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_standard_start_system(); - - return Py_BuildValue("i",fail); -} - -/* moving systems from and to containers */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_system_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_system(); - - return Py_BuildValue("i",fail); -} - -/* creation of homotopy and tracking all solution paths */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ) -{ - int fail; - double g_re,g_im; - - initialize(); - if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; - fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_dobldobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_quaddobl_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_multprec_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = tune_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = show_continuation_parameters(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ) -{ - int fail,level,nbdgt; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; - fail = autotune_continuation_parameters(level,nbdgt); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = determine_output_during_continuation(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_standard_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_dobldobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail, nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_by_quaddobl_homotopy_continuation(nbtasks); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = solve_by_multprec_homotopy_continuation(deci); - - return Py_BuildValue("i",fail); -} - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_target_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_target_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_start_solutions_to_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_dobldobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_quaddobl_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = copy_multprec_container_to_start_solutions(); - - return Py_BuildValue("i",fail); -} - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) -{ - int fail,rc,nbtasks = 0; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; - fail = solve_system(&rc,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) -{ - int silent,fail,rc,nbtasks = 0; - - initialize(); - if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; - fail = solve_Laurent_system(&rc,silent,nbtasks); - return Py_BuildValue("i",rc); -} - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) -{ - int stable,fail,mv,smv; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; - if(stable == 0) - { - fail = mixed_volume(&mv); - return Py_BuildValue("i",mv); - } - else - { - fail = stable_mixed_volume(&mv,&smv); - return Py_BuildValue("(i,i)",mv,smv); - } -} - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_deflate(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = standard_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = dobldobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - { - int fail = quaddobl_Newton_Laurent_step(); - return Py_BuildValue("i",fail); - } -} - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ) -{ - int fail,decimals; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; - fail = multprec_Newton_Laurent_step(decimals); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ) -{ - int fail,dim,wanted,maxitr,maxprc,nbstr; - char *pols; - - initialize(); - - if(!PyArg_ParseTuple(args,"iiiiis", - &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; - - fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in unisolvers.h starts from here */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_standard_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_double_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) -{ - int fail,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; - fail = solve_with_quad_doubles(max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) -{ - int fail,dcp,max,nit; - double eps; - - initialize(); - if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; - fail = solve_with_multiprecision(dcp,max,eps,&nit); - - return Py_BuildValue("i",nit); -} - -/* wrapping functions in giftwrappers.h starts from here */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - { - int nbc_hull; - char hull[10*nbc_pts]; - - fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); - hull[nbc_hull] = '\0'; - - return Py_BuildValue("s",hull); - } -} - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) -{ - int fail,nbc_pts; - char *pts; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; - - fail = convex_hull(nbc_pts,pts); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ) -{ - int fail,dim,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - - fail = number_of_facets(dim,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,ncp; - char rep[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; - - fail = retrieve_facet(dim,ind,&ncp,rep); - rep[ncp] = '\0'; - - return Py_BuildValue("s",rep); -} - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_3d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = clear_4d_facets(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ) -{ - int nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - nbr = support_size(); - - return Py_BuildValue("i",nbr); -} - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ) -{ - int nbr,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - { - char support[nbr+1]; - - fail = support_string(nbr,support); - - return Py_BuildValue("s",support); - } -} - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_support_string(); - - return Py_BuildValue("i",fail); -} - - -static PyObject *py2c_giftwrap_initial_form - ( PyObject *self, PyObject *args ) -{ - int fail,dim,nbc; - char *normal; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; - /* printf("the inner normal in wrapper is %s\n", normal); */ - fail = initial_form(dim,nbc,normal); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_read_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail,deci; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; - fail = syscon_read_multprec_Laurent_system(deci); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) -{ - int fail,n,m,d,c; - - initialize(); - if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; - fail = syscon_random_system(n,m,d,c); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_dobldobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_quaddobl_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_multprec_Laurent_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_symbols(&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_write_symbols(); - printf("\n"); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ) -{ - int nb; - int fail = syscon_number_of_symbols(&nb); - int size = 80*nb; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_string_of_symbols(&size,s); - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_remove_symbol_name_from_table(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_clear_symbol_table(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_polynomials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - static PyObject *a; - - initialize(); - /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_Laurentials(&number); - - /* a = Py_BuildValue("{i:i}",fail,number); - return a; */ - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_dobldobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_quaddobl_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,number; - - initialize(); - if (!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_number_of_multprec_Laurentials(&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_polynomials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - - if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; - initialize(); - fail = syscon_initialize_number_of_multprec_Laurentials(dim); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_dobldobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_quaddobl_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,equ,deg; - - if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; - initialize(); - fail = syscon_degree_of_multprec_polynomial(equ,°); - - return Py_BuildValue("i",deg); -} - -static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ - if (!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = syscon_number_of_Laurent_terms(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) -{ - int fail, *exp; - int i,j,n,k; - double *c; - static PyObject *a; - - initialize(); - if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; - - exp = (int *)malloc(n * sizeof(int)); - c = (double *)malloc(2*sizeof(double)); - - fail = syscon_retrieve_term(i,j,n,exp,c); - - a = Py_BuildValue("i", fail); - - free (exp); - free (c); - - return a; -} - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_polynomial(nc,n,k,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,dp; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; - fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); - - if(fail != 0) printf("Failed to store %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_polynomial(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_dobldobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; - fail = syscon_store_quaddobl_Laurential(nc,n,k,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,n,nc,k,size; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; - fail = syscon_store_multprec_Laurential(nc,n,k,size,p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[25600]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_standard_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[51200]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_dobldobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_quaddobl_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ) -{ - int fail,nc,k; - char p[102400]; /* must be computed or retrieved !!!! */ - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_load_multprec_Laurential(k,&nc,p); - - return Py_BuildValue("s",p); -} - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) -{ - int fail,totdeg; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = syscon_total_degree(&totdeg); - - return Py_BuildValue("i",totdeg); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_standard_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_standard_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_dobldobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_dobldobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = syscon_quaddobl_drop_variable_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = syscon_quaddobl_drop_variable_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in solcon.h starts from here */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_read_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_write_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_dobldobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_quaddobl_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_clear_multprec_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_open_solution_input_file(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_dobldobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_quaddobl_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,i,number; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&i)) return NULL; - fail = solcon_length_multprec_solution_string(i,&number); - - return Py_BuildValue("i",number); -} - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_dobldobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_quaddobl_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; - p = (char*)malloc((k+1)*sizeof(char)); - fail = solcon_write_multprec_solution_string(n,k,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_standard_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_dobldobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_quaddobl_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_retrieve_next_multprec_initialize(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_standard_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_dobldobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_quaddobl_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ) -{ - int fail,cursor; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_move_current_multprec_to_next(&cursor); - - return Py_BuildValue("i",cursor); -} - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_standard_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail,cursor,len; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solcon_length_current_multprec_solution_string(&cursor,&len); - if(cursor == 0) len = 0; - - return Py_BuildValue("i",len); -} - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_standard_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_dobldobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_quaddobl_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int n,k; - char *p; - static PyObject* a; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - p = (char*)malloc((n+1)*sizeof(char)); - fail = solcon_write_current_multprec_solution_string(&k,n,p); - - a = Py_BuildValue("s",p); - - free(p); - - return a; -} - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - - /* printf("Calling solcon_append_solution_string ...\n"); */ - - fail = solcon_append_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_dobldobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_quaddobl_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ) -{ - char fail; - int n,k; - char *p; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; - fail = solcon_append_multprec_solution_string(n,k,p); - - if(fail != 0) printf("Failed to append solution %s.\n",p); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_dobldobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_quaddobl_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ) -{ - int result,n; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - result = solcon_number_of_multprec_solutions(&n); - - return Py_BuildValue("i",n); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_standard_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_standard_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_index(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions in product.h starts here */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = supporting_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = write_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ) -{ - int fail; - int size = 1024; - char s[size]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_structure_string(&size,s); - s[size] = '\0'; - - return Py_BuildValue("s",s); -} - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ) -{ - int nc,fail; - char *s; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; - fail = parse_set_structure(nc,s); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ) -{ - int fail,result; - - initialize(); - if (!PyArg_ParseTuple(args,"i",&result)) return NULL; - fail = is_set_structure_supporting(&result); - - return Py_BuildValue("i",result); -} - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ) -{ - int fail,r; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = linear_product_root_count(&r); - - return Py_BuildValue("i",r); -} - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = random_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = solve_linear_product_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = clear_set_structure(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char partition[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); - - return Py_BuildValue("(i,s)",mbz,partition); -} - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_partition_Bezout_number(&mbz,ncp,partition); - - return Py_BuildValue("i",mbz); -} - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,mbz,ncp; - char *partition; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; - fail = m_homogeneous_start_system(ncp,partition); - - return Py_BuildValue("i",mbz); -} - -/* wrapping functions in celcon.h starts here */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ) -{ - int fail,nbr; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; - fail = celcon_initialize_supports(nbr); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ) -{ - int fail,r,cnt; - char *strmix; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; - - cnt = itemcount(strmix); - { - int mix[cnt]; - - str2intlist(cnt,strmix,mix); - fail = celcon_set_type_of_mixture(r,mix); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) -{ - int fail,r,nbc; - int mix[64]; - char strmix[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = celcon_type_of_mixture(&r,mix); - nbc = intlist2str(r,mix,strmix); - - return Py_BuildValue("s",strmix); -} - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,ind,cnt; - char *strpoint; - - initialize(); - if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; - - cnt = itemcount(strpoint); - { - double point[cnt]; - - str2dbllist(cnt,strpoint,point); - fail = celcon_append_lifted_point(dim,ind,point); - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ) -{ - int fail,dim,sup,ind,nbc; - char strpoint[256]; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; - { - double liftedpoint[dim]; - - fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); - nbc = dbllist2str(dim,liftedpoint,strpoint); - } - - return Py_BuildValue("s",strpoint); -} - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ) -{ - int fail,mv; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_mixed_volume_of_supports(&mv); - - return Py_BuildValue("i",mv); -} - -static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) -{ - int fail,length; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_number_of_cells(&length); - - return Py_BuildValue("i",length); -} - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_random_coefficient_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_dobldobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_copy_into_quaddobl_systems_container(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_create_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_dobldobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_quaddobl_polyhedral_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_dobldobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,nb; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = celcon_solve_quaddobl_start_system(k,&nb); - - return Py_BuildValue("i",nb); -} - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_dobldobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ) -{ - int fail,k,i,otp; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; - fail = celcon_track_quaddobl_solution_path(k,i,otp); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_dobldobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; - fail = celcon_copy_target_quaddobl_solution_to_container(k,i); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_dobldobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_permute_quaddobl_system(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ) -{ - int fail,k,i; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = celcon_clear_mixed_cell_configuration(); - - return Py_BuildValue("i",fail); -} - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[4*dim+2]; - - fail = standard_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(4*dim+1); - for(i=0; i<4*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_dobldobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[8*dim+4]; - - fail = dobldobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(8*dim+1); - for(i=0; i<8*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) -{ - int fail,mode,dim,i; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; - fail = syscon_number_of_quaddobl_polynomials(&dim); - if((fail == 0) && (dim > 0)) - { - double cff[16*dim+8]; - - fail = quaddobl_scale_system(mode,cff); - if(fail == 0) - { - if(mode > 0) - { - PyObject *result, *item; - result = PyList_New(16*dim+1); - for(i=0; i<16*dim+1; i++) - { - item = PyFloat_FromDouble(cff[i]); - PyList_SET_ITEM(result,i,item); - } - return result; - } - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = standard_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = dobldobl_scale_solutions(dim,10,scf); - } - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ) -{ - int fail,dim; - char *cff; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; - { - double scf[dim]; - - str2dbllist(dim,cff,scf); - fail = quaddobl_scale_solutions(dim,10,scf); - } - return Py_BuildValue("i",fail); -} - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) -{ - int d,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&d)) return NULL; - fail = embed_system(d); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_dobldobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = create_quaddobl_cascade_homotopy(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = set_state_to_silent(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ) -{ - int n,fail; - char *name; - - initialize(); - if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; - fail = define_output_file_with_string(n,name); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) -{ - int n,nbsols,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; - { - double x[2*n+5]; - int i,j,m; - - for(i=1; i<=nbsols; i++) - { - /* printf("... retrieving solution %d ...\n", i); */ - fail = solcon_retrieve_solution(n,i,&m,x); - /* printf("fail = %d, m = %d\n", fail, m); - printf("printing the coordinates : \n"); - for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ - m = i; - /* printf("... replacing solution %d ...\n", i); */ - fail = solcon_replace_solution(n,i,m,x); - /* printf("... done replacing solution solution %d ...\n", i); */ - } - } - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ) -{ - int k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&k)) return NULL; - fail = initialize_sampler(k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ) -{ - int n,d,k,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; - fail = initialize_monodromy(n,d,k); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = store_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = restore_solutions(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = track_paths(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) -{ - int fail; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - fail = swap_slices(); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) -{ - int k,n,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; - fail = new_slices(k,n); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ) -{ - int first,fail; - double r[2]; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&first)) return NULL; - - if(first == 1) /* determine constant coefficient */ - { - r[0] = -1.0; r[1] = 0.0; - } - else - { - r[0] = +1.0; r[1] = 0.0; - } - fail = assign_coefficient_of_slice(0,0,r); - - return Py_BuildValue("i",fail); -} - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) -{ - int n,i,fail; - - initialize(); - if(!PyArg_ParseTuple(args,"i",&n)) return NULL; - - { - double re_gamma[n]; - double im_gamma[n]; - - for(i=0; i %d\n",nf[0],nf[1]); */ - } - return Py_BuildValue("i",done); -} - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ) -{ - int fail,nf; - - initialize(); - if(!PyArg_ParseTuple(args,"")) return NULL; - - fail = number_of_irreducible_factors(&nf); - - return Py_BuildValue("i",nf); -} - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ) -{ - int fail,totdeg,k; - char *result; - - initialize(); - if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; - { - int deg,nb,i; - int w[totdeg]; - char s[10*totdeg]; - - fail = witness_points_of_irreducible_factor(k,°,w); - - nb = list2str(deg,w,s); - result = (char*)calloc(nb,sizeof(char)); - for(i=0; i nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); - } - return Py_BuildValue("i",r); -} - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ) -{ - int i,n,k,nbc,nc,fail,r,vrb,szn; - char *cond; - char *name; - - initialize(); - if(!PyArg_ParseTuple - (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; -/* - printf("name of the output file : %s\n", name); - printf("the number of characters : %d\n", nc); - printf("the conditions : %s\n", cond); - printf("the conditions parsed : "); -*/ - { - int cds[k*nbc]; - int pos = 0; - int idx = 0; - while((idx < k*nbc) && (pos < nc)) - { - while(cond[pos] == ' ' && pos < nc) pos++; - if(pos > nc) break; - cds[idx] = 0; - while(cond[pos] != ' ') - { - if(cond[pos] == '\0') break; - cds[idx] = cds[idx]*10 + (cond[pos] - '0'); - pos = pos + 1; - if(pos >= nc) break; - } - /* printf(" %d", cds[idx]); */ - idx = idx + 1; - } - const int fgsize = 2*(nbc-2)*n*n; - double fg[fgsize]; - char stfg[fgsize*24+2]; - fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); - stfg[0] = '['; - idx = 1; - for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_polynomial", - py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_polynomial", - py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_polynomial", - py2c_syscon_store_multprec_polynomial, METH_VARARGS, - "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_polynomial", - py2c_syscon_load_standard_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_polynomial", - py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_polynomial", - py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_polynomial", - py2c_syscon_load_multprec_polynomial, METH_VARARGS, - "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_store_standard_Laurential", - py2c_syscon_store_standard_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_dobldobl_Laurential", - py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_quaddobl_Laurential", - py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_store_multprec_Laurential", - py2c_syscon_store_multprec_Laurential, METH_VARARGS, - "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_syscon_load_standard_Laurential", - py2c_syscon_load_standard_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_dobldobl_Laurential", - py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_quaddobl_Laurential", - py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_load_multprec_Laurential", - py2c_syscon_load_multprec_Laurential, METH_VARARGS, - "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, - {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, - "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, - {"py2c_syscon_standard_drop_variable_by_index", - py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_standard_drop_variable_by_name", - py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_index", - py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_dobldobl_drop_variable_by_name", - py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_index", - py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_syscon_quaddobl_drop_variable_by_name", - py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, - "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_length_standard_solution_string", - py2c_solcon_length_standard_solution_string, - METH_VARARGS, - "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_dobldobl_solution_string", - py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_quaddobl_solution_string", - py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, - "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_length_multprec_solution_string", - py2c_solcon_length_multprec_solution_string, METH_VARARGS, - "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, - {"py2c_solcon_write_standard_solution_string", - py2c_solcon_write_standard_solution_string, - METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_dobldobl_solution_string", - py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_quaddobl_solution_string", - py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_write_multprec_solution_string", - py2c_solcon_write_multprec_solution_string, METH_VARARGS, - "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, - {"py2c_solcon_retrieve_next_standard_initialize", - py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, - "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_dobldobl_initialize", - py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, - "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_quaddobl_initialize", - py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, - "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_retrieve_next_multprec_initialize", - py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, - "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_move_current_standard_to_next", - py2c_solcon_move_current_standard_to_next, METH_VARARGS, - "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_dobldobl_to_next", - py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_quaddobl_to_next", - py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, - "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_move_current_multprec_to_next", - py2c_solcon_move_current_multprec_to_next, METH_VARARGS, - "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, - {"py2c_solcon_length_current_standard_solution_string", - py2c_solcon_length_current_standard_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_dobldobl_solution_string", - py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_quaddobl_solution_string", - py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_length_current_multprec_solution_string", - py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, - "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, - {"py2c_solcon_write_current_standard_solution_string", - py2c_solcon_write_current_standard_solution_string, METH_VARARGS, - "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_dobldobl_solution_string", - py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, - "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_quaddobl_solution_string", - py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, - "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_write_current_multprec_solution_string", - py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, - "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, - {"py2c_solcon_append_standard_solution_string", - py2c_solcon_append_standard_solution_string, - METH_VARARGS, - "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_dobldobl_solution_string", - py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, - "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_quaddobl_solution_string", - py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, - "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_append_multprec_solution_string", - py2c_solcon_append_multprec_solution_string, METH_VARARGS, - "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_solcon_number_of_standard_solutions", - py2c_solcon_number_of_standard_solutions, METH_VARARGS, - "Returns the number of solutions in standard double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_dobldobl_solutions", - py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, - "Returns the number of solutions in double double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_quaddobl_solutions", - py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, - "Returns the number of solutions in quad double precision,\n as stored in the container."}, - {"py2c_solcon_number_of_multprec_solutions", - py2c_solcon_number_of_multprec_solutions, METH_VARARGS, - "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, - {"py2c_solcon_standard_drop_coordinate_by_index", - py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_standard_drop_coordinate_by_name", - py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_index", - py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_dobldobl_drop_coordinate_by_name", - py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_index", - py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_solcon_quaddobl_drop_coordinate_by_name", - py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, - "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_product_supporting_set_structure", - py2c_product_supporting_set_structure, METH_VARARGS, - "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, - {"py2c_product_write_set_structure", py2c_product_write_set_structure, - METH_VARARGS, - "Writes the supporting set structure to screen."}, - {"py2c_product_set_structure_string", py2c_product_set_structure_string, - METH_VARARGS, - "Returns the string representation of the set structure."}, - {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, - METH_VARARGS, - "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, - {"py2c_product_is_set_structure_supporting", - py2c_product_is_set_structure_supporting, METH_VARARGS, - "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, - {"py2c_product_linear_product_root_count", - py2c_product_linear_product_root_count, METH_VARARGS, - "Returns the linear-product root count, computed from\n the supporting set structure."}, - {"py2c_product_random_linear_product_system", - py2c_product_random_linear_product_system, METH_VARARGS, - "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, - {"py2c_product_solve_linear_product_system", - py2c_product_solve_linear_product_system, METH_VARARGS, - "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, - {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, - METH_VARARGS, - "Deallocates the set structure."}, - {"py2c_product_m_homogeneous_Bezout_number", - py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, - "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, - {"py2c_product_m_partition_Bezout_number", - py2c_product_m_partition_Bezout_number, METH_VARARGS, - "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_product_m_homogeneous_start_system", - py2c_product_m_homogeneous_start_system, METH_VARARGS, - "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, - {"py2c_celcon_initialize_supports", - py2c_celcon_initialize_supports, METH_VARARGS, - "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_set_type_of_mixture", - py2c_celcon_set_type_of_mixture, METH_VARARGS, - "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, - {"py2c_celcon_type_of_mixture", - py2c_celcon_type_of_mixture, METH_VARARGS, - "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, - {"py2c_celcon_append_lifted_point", - py2c_celcon_append_lifted_point, METH_VARARGS, - "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, - {"py2c_celcon_retrieve_lifted_point", - py2c_celcon_retrieve_lifted_point, METH_VARARGS, - "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, - {"py2c_celcon_mixed_volume_of_supports", - py2c_celcon_mixed_volume_of_supports, METH_VARARGS, - "Returns the mixed volume of the supports stored in the cell container."}, - {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, - METH_VARARGS, "returns the number of cells in the cell container"}, - {"py2c_celcon_standard_random_coefficient_system", - py2c_celcon_standard_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, - {"py2c_celcon_dobldobl_random_coefficient_system", - py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, - {"py2c_celcon_quaddobl_random_coefficient_system", - py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, - "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, - {"py2c_celcon_copy_into_standard_systems_container", - py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, - "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, - {"py2c_celcon_copy_into_dobldobl_systems_container", - py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, - "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, - {"py2c_celcon_copy_into_quaddobl_systems_container", - py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, - "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, - {"py2c_celcon_standard_polyhedral_homotopy", - py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_dobldobl_polyhedral_homotopy", - py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_quaddobl_polyhedral_homotopy", - py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, - "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_solve_standard_start_system", - py2c_celcon_solve_standard_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_dobldobl_start_system", - py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_solve_quaddobl_start_system", - py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, - "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, - {"py2c_celcon_track_standard_solution_path", - py2c_celcon_track_standard_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_dobldobl_solution_path", - py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_track_quaddobl_solution_path", - py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, - "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, - {"py2c_celcon_copy_target_standard_solution_to_container", - py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_dobldobl_solution_to_container", - py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_copy_target_quaddobl_solution_to_container", - py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, - "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_celcon_permute_standard_system", - py2c_celcon_permute_standard_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_dobldobl_system", - py2c_celcon_permute_dobldobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_permute_quaddobl_system", - py2c_celcon_permute_quaddobl_system, METH_VARARGS, - "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, - "Deallocates the data in the cell container."}, - {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, - "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, - "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, - "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, - {"py2c_scale_standard_solutions", - py2c_scale_standard_solutions, METH_VARARGS, - "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_dobldobl_solutions", - py2c_scale_dobldobl_solutions, METH_VARARGS, - "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_scale_quaddobl_solutions", - py2c_scale_quaddobl_solutions, METH_VARARGS, - "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, - {"py2c_embed_system", py2c_embed_system, METH_VARARGS, - "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, - METH_VARARGS, - "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, - "Sets the state to monodromy permutations to silent."}, - {"py2c_factor_define_output_file_with_string", - py2c_factor_define_output_file_with_string, METH_VARARGS, - "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_assign_labels", py2c_factor_assign_labels, - METH_VARARGS, - "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, - METH_VARARGS, - "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, - {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, - METH_VARARGS, - "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, - "Stores the solutions in the container to the data for monodromy loops."}, - {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, - METH_VARARGS, - "Restores the first initialized solutions from sampler to the container."}, - {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, - "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, - "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, - "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, - {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, - "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, - "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, - {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, - METH_VARARGS, - "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, - {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, - METH_VARARGS, - "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, - {"py2c_factor_number_of_components", py2c_factor_number_of_components, - METH_VARARGS, - "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, - {"py2c_factor_witness_points_of_component", - py2c_factor_witness_points_of_component, - METH_VARARGS, - "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, - {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, - METH_VARARGS, - "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, - {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, - METH_VARARGS, - "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, - METH_VARARGS, - "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, - {"py2c_start_diagonal_cascade_solutions", - py2c_start_diagonal_cascade_solutions, METH_VARARGS, - "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, - {"py2c_extrinsic_top_diagonal_dimension", - py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, - "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, - {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, - "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, - "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, - {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, - METH_VARARGS, - "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, - {"py2c_schubert_littlewood_richardson_homotopies", - py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, - "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, - {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, - METH_VARARGS, - "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, - {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, - METH_VARARGS, - "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, - {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, - METH_VARARGS, - "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, - {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, - "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, - "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, - "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, - "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, - {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, - "Returns the top dimension of the maps in the container."}, - {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, - "Returns the number of maps in the container."}, - {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, - "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, - {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, - METH_VARARGS, - "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, - {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, - "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, - {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, - {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, - {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, - {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, - METH_VARARGS, - "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, - {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, - METH_VARARGS, - "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, - METH_VARARGS, - "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, - {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, - METH_VARARGS, - "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_next_standard_solution", py2c_next_standard_solution, - METH_VARARGS, - "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, - METH_VARARGS, - "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_multprec_solution", py2c_next_multprec_solution, - METH_VARARGS, - "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, - {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, - METH_VARARGS, - "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, - {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, - "Deallocates data used in the standard double precision tracker\n with a generator."}, - {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, - "Deallocates data used in the double double precision tracker\n with a generator."}, - {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, - "Deallocates data used in the quad double precision tracker\n with a generator."}, - {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, - "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, - {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, - "Deallocates data used in the variable precision tracker\n with a generator."}, - {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_newton_qd", py2c_gpu_newton_qd, METH_VARARGS, - "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_onepath_qd", py2c_gpu_onepath_qd, METH_VARARGS, - "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {"py2c_gpu_manypaths_qd", py2c_gpu_manypaths_qd, METH_VARARGS, - "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, - {NULL, NULL, 0, NULL} -}; - -/* This is the initialization routine which will be called by the - * Python run-time when the library is imported in order to retrieve - * a pointer to the above method address table. - * Note that therefore this routine must be visible in the dynamic library - * either through the use of a ".def" file or by a compiler instruction - * such as "declspec(export)" */ - -PyMODINIT_FUNC initphcpy2c(void) -{ - Py_InitModule("phcpy2c", phcpy2c_methods); -} diff -Nru phcpack-2.4.84/src/Lib/phcpy2cpath_qd.h phcpack-2.4.85/src/Lib/phcpy2cpath_qd.h --- phcpack-2.4.84/src/Lib/phcpy2cpath_qd.h 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/phcpy2cpath_qd.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,3200 +0,0 @@ -/* This file contains the prototypes for the py2c interface functions, - * linked with the quad double version of the Path library. */ - -void initialize ( void ); -/* - * DESCRIPTION : - * Calls adainit(), initializing the interface to the Ada code, - * setting the initialized flag to one and the finalized flag to zero, - * if the initialized flag was zero. - * Nothing happens if the initialized flag equals one. */ - -void finalize ( void ); -/* - * DESCRIPTION : - * Calls adafinal(), finalizing the interface to the Ada code, - * setting the finalized flag to one and the initialized flag to zero, - * if the finalized flag was zero. - * Nothing happens if the finalized flag equals one. */ - -/* The wrapping of functions with prototypes in phcpack.h starts here. */ - -static PyObject *py2c_PHCpack_version_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the version string of PHCpack. - * The version string is 40 characters long. */ - -static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Takes the value of the integer given on input - * and sets the seed for the random number generators. - * This fixing of the seed enables reproducible runs. */ - -static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the current value of the seed. - * Using this value in py2c_set_seed will ensure that the - * results of previous runs can be reproduced. */ - -static PyObject *py2c_read_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_standard_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in standard double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_dobldobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in double double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a target system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_target_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a target system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to enter a start system that will - * be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_read_quaddobl_start_system_from_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The two input arguments are a number and a string: - * 1) The number equals the number of characters in the string. - * 2) The string given on input is the name of a file which contains - * a start system to be parsed in quad double precision. - * The failure code is returned, which is zero if all went well. */ - -static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user to define the output file. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_write_standard_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the target system as stored in standard double precision - * to screen or to the defined output file. */ - -static PyObject *py2c_write_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start system as stored in standard double precision - * to screen or to the defined output file. */ - -/* Copying systems from and to containers. */ - -static PyObject *py2c_copy_standard_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the target system. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the target system. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the target system. */ - -static PyObject *py2c_copy_multprec_container_to_target_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the target system. */ - -static PyObject *py2c_copy_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_system_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start system to the container for systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in standard double precision to the start system. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in double double precision to the start system. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in quad double precision to the start system. */ - -static PyObject *py2c_copy_multprec_container_to_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the system in the container for systems with coefficients - * in arbitrary multiprecision to the start system. */ - -/* Creation of homotopy and the tracking of all paths. */ - -static PyObject *py2c_create_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_standard_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in standard double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_dobldobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in double double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_quaddobl_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in quad double precision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_create_multprec_homotopy_with_gamma - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the data for a homotopy in arbitrary multiprecision. - * On input are two doubles: the real and imaginary part of the - * gamma constant. - * The failure code is returned, which is zero when all goes well. */ - -static PyObject *py2c_clear_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in standard double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in double double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in quad double precision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_clear_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocation of the homotopy stored in arbitrary multiprecision. - * On return is the failure code, which equals zero if all is well. */ - -static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the start solutions in standard double precision either to - * the screen (standard output) or to the defined output file. - * On return is the failure code, which is zero if all is well. */ - -static PyObject *py2c_tune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to tune the continuation parameters. */ - -static PyObject *py2c_show_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Shows the current values of the continuation parameters. */ - -static PyObject *py2c_autotune_continuation_parameters - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tunes the values of the continuation parameters. - * On input are two integers: - * 1) the difficulty level of the solution paths; and - * 2) the number of decimal places in the precision. */ - -static PyObject *py2c_determine_output_during_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to determine the level of output - * during the path tracking. */ - -static PyObject *py2c_solve_by_standard_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in standard double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_dobldobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in double double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_quaddobl_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in quad double precision. - * On input is one integer: the number of tasks for path tracking. - * If that input number is zero, then no multitasking is applied. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_solve_by_multprec_homotopy_continuation - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks the paths defined by the homotopy in arbitrary multiprecision. - * On input is one integer: the number of decimal places in the precision. - * On return is the failure code, which is zero when all went well. */ - -/* copying solutions from and to containers */ - -static PyObject *py2c_copy_standard_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_target_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the target solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the target solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the target solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the target solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_target_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the target solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in standard double precision to the - * container for solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in double double precision to the - * container for solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in quad double precision to the - * container for solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_start_solutions_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the start solutions in arbitrary multiprecision to the - * container for solutions in arbitrary multiprecision. */ - -static PyObject *py2c_copy_standard_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in standard double precision from the - * container to the start solutions in standard double precision. */ - -static PyObject *py2c_copy_dobldobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in double double precision from the - * container to the start solutions in double double precision. */ - -static PyObject *py2c_copy_quaddobl_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in quad double precision from the - * container to the start solutions in quad double precision. */ - -static PyObject *py2c_copy_multprec_container_to_start_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the solutions in arbitrary multiprecision from the - * container to the start solutions in arbitrary multiprecision. */ - -/* black box solver, mixed volume calculator, and Newton step */ - -static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * systems with coefficients in standard double precision. - * One integer is expected on input: the number of tasks. - * If that number is zero, then no multitasking is applied. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard systems container. */ - -static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Calls the blackbox solver on the system stored in the container for - * Laurent systems with coefficients in standard double precision. - * Two integers are expected on input: - * 1) a boolean flag silent: if 1, then no intermediate output about - * the root counts is printed, if 0, then the solver is verbose; and - * 2) the number of tasks: if 0, then no multitasking is applied, - * otherwise as many tasks as the number will run. - * On return, the container for solutions in standard double precision - * contains the solutions to the system in the standard Laurent systems - * container. */ - -static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the mixed volume, and the stable mixed volume as well if - * the input parameter equals 1. On return is the mixed volume, or - * a tuple with the mixed volume and the stable mixed volume. */ - -static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in standard double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in double double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies deflation in quad double precision to the system and - * the solutions stored in the containers. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the system in - * the standard systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the system in - * the dobldobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the system in - * the quaddobl systems container and to the solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the system in - * the multprec systems container and to the solutions in the container. - * On input is an integer, the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in standard double precision to the Laurent - * system in the standard Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in double double precision to the Laurent - * system in the dobldobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in quad double precision to the Laurent - * system in the quaddobl Laurent systems container and to the solutions - * in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_multprec_Newton_Laurent_step - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies one Newton step in arbitrary multiprecision to the Laurent - * system in the multprec Laurent systems container and to the solutions - * in the container. - * On input is an integer: the number of decimal places in the precision. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_varbprec_Newton_Laurent_steps - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies Newton's method in variable precision. - * There are six input parameters: - * 1) the dimension: the number of variables and equations; - * 2) the accuracy, expressed as the correct number of decimal places; - * 3) the maximum number of iterations in Newton's method; - * 4) an upper bound on the number of decimal places in the precision; - * 5) a string, with the representation of the polynomials in the system. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in unisolvers.h starts here. */ - -static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with standard double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the standard systems container. After the call of this function, - * the standard solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with double double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the dobldobl systems container. After the call of this function, - * the dobldobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with quad double precision arithmetic. - * On input are two numbers: - * 1) the maximum number of iterations in the method of Weierstrass; and - * 2) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the quaddobl systems container. After the call of this function, - * the quaddobl solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the method of Weierstrass to compute all roots of a - * polynomial in one variable with arbitrary multiprecision arithmetic. - * On input are three numbers: - * 1) the number of decimal places in the working precision; - * 2) the maximum number of iterations in the method of Weierstrass; and - * 3) the epsilon requirement on the accuracy of the roots. - * Before calling this function, the polynomial should be stored in - * the multprec systems container. After the call of this function, - * the multprec solutions container contains the roots of the polynomial. - * On return is the number of iterations done by the solver. */ - -/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ - -static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a planar point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * On return is the string representation of the vertex points, - * sorted so that each two consecutive points define an edge. */ - -static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies the giftwrapping algorithm to a point configuration. - * On input are an integer and a string: - * 1) the number of points in the list; - * 2) the string representation of a Python list of tuples. - * When the function returns, the internal data structures - * to store the convex hull are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_giftwrap_number_of_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of facets of the given dimension. - * On input is an integer, the dimension of the facet. */ - -static PyObject *py2c_giftwrap_retrieve_facet - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of a facet. - * On input are two integer numbers: - * 1) the dimension of the facet; - * 2) the index of the facet. */ - -static PyObject *py2c_giftwrap_clear_3d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension three. */ - -static PyObject *py2c_giftwrap_clear_4d_facets - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data for a convex hull in dimension four. */ - -static PyObject *py2c_giftwrap_support_size - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation of - * the support of the first Laurent polynomial in the container. */ - -static PyObject *py2c_giftwrap_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the support - * of a Laurent polynomial. */ - -static PyObject *py2c_giftwrap_clear_support_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the string representation of the support set - * that was stored internally by the call py2c_giftwrap_support_size. */ - -static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the Laurent systems container by its initial form. - * There are three input parameters: - * 1) the dimension, number of coordinates in the inner normal; - * 2) the number of characters in the string representation for the normal; - * 3) the string representation of the inner normal. - * On return is the failure code, which equals zero if all went well. */ - -/* wrapping functions in syscon.h starts from here */ - -static PyObject *py2c_syscon_read_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in standard double precision. - * The system will be placed in the standard systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in standard double precision. - * The system will be placed in the standard Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in double double precision. - * The system will be placed in the dobldobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in double double precision. - * The system will be placed in the dobldobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in quad double precision. - * The system will be placed in the quaddobl systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in quad double precision. - * The system will be placed in the quaddobl Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a polynomial system with coefficients - * in arbitrary multiprecision. The one input parameter is an integer, - * the number of decimal places in the working precision. - * The system will be placed in the multprec systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_read_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive procedure to read a Laurent polynomial system with - * coefficients in arbitrary multiprecision. The one input parameter is - * an integer, the number of decimal places in the working precision. - * The system will be placed in the multprec Laurent systems container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Places in the systems container a random polynomial system - * with coefficients in standard double precision. - * There are four integers as input parameters: - * 1) n, the number of polynomials and variables; - * 2) m, the number of monomials per equation; - * 3) d, the largest degree of each monomial; - * 4) c, the type of coefficient: 0 if on the complex unit circle, - * 1, if all coefficients are one, 2, if all coefficients are - * random floats in [-1,+1]. */ - -static PyObject *py2c_syscon_write_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with standard double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with standard double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with double double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with double double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with quad double precision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with quad double precision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the polynomial system with arbitrary multiprecision coefficients - * that is stored in the container. */ - -static PyObject *py2c_syscon_write_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the Laurent polynomial system with arbitrary multiprecision - * coefficients that is stored in the container. */ - -static PyObject *py2c_syscon_clear_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_standard_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in standard double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_dobldobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in double double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_quaddobl_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in quad double precision. */ - -static PyObject *py2c_syscon_clear_multprec_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_clear_multprec_Laurent_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for Laurent polynomial systems - * with coefficients in arbitrary multiprecision. */ - -static PyObject *py2c_syscon_number_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of symbols in the symbol table. */ - -static PyObject *py2c_syscon_write_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the symbols in the symbol table to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_string_of_symbols - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string that contains the symbols in the symbol table. - * The symbols are separate from each other by one space. */ - -static PyObject *py2c_syscon_remove_symbol_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Removes a symbol, given by name, from the symbol table. - * On input are two arguments: - * 1) an integer, as the number of characters in the name; - * 2) a string of characters with the name of the symbol. - * The failure code is returned, which equals zero when all went well. */ - -static PyObject *py2c_syscon_clear_symbol_table - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Clears the symbol table. */ - -static PyObject *py2c_syscon_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in standard - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in double - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in quad - * double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of polynomials with coefficients in arbitrary - * multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * standard double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * double double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * quad double precision as stored in the systems container. */ - -static PyObject *py2c_syscon_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of Laurent polynomials with coefficients in - * arbitrary multiprecision as stored in the systems container. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for polynomials with coefficients in - * arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in standard double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in double double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in quad double precision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initialzes the container for Laurent polynomials with coefficients - * in arbitrary multiprecision. The input argument is an integer, - * the number of polynomials in the container. - * The failure code is returned, which equals zero if all went well. */ - -static PyObject *py2c_syscon_degree_of_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in standard double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in double double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in quad double precision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_degree_of_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the degree of the k-th polynomial in the container for - * polynomials with coefficients in arbitrary multiprecision. - * The index k of the polynomial is the one input argument. */ - -static PyObject *py2c_syscon_number_of_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th polynomial stored in the - * container for systems with coefficients in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_number_of_Laurent_terms - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of terms in the k-th Laurent polynomial stored - * in the container for Laurent polynomials systems with coefficients - * in standard double precision. - * The input parameter k is the index of the polynomial k. */ - -static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Retrieves one term of a polynomial with coefficients in standard - * double precision, that is stored in the systems container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_store_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for polynomials - * with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_polynomial - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_store_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in standard double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in double double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in quad double precision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are four input parameters, three integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_store_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the k-th polynomial in the systems container for Laurent - * polynomials with coefficients in arbitrary multiprecision. - * As a precondition for this function, the container must be initialized - * for sufficiently many polynomials, in any case >= k. - * There are five input parameters, four integers and one string: - * 1) nc, the number of characters in the string p; - * 2) n, the number of variables in the multivariate polynomial; - * 3) k, the index of the polynomial in the system; - * 4) dp, the number of decimal places to parse the coefficients; - * 5) p, a valid string representation for a polynomial. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_syscon_load_standard_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with standard double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_dobldobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with double double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_quaddobl_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with quad double complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_load_multprec_Laurential - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the k-th polynomial in the Laurent systems container - * with arbitrary multiprecision complex coefficients as a string. - * The value for k is in the one integer parameter of this function. */ - -static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns in d the total degree of the system with coefficients in - * standard double precision, as stored in the container. */ - -static PyObject *py2c_syscon_standard_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syson_standard_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the standard double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_dobldobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the double double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that has its k-th variable dropped. - * The index k of the vaiable is given as an input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_syscon_quaddobl_drop_variable_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system in the quad double precision container - * with the same system that have that variable dropped - * corresponding to the name in the string s of nc characters long. - * The function has two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, a string that holds the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of functions with prototypes in solcon.h starts here. */ - -static PyObject *py2c_solcon_read_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in standard double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in double double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in quad double precision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_read_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Interactive function to read the solutions into the container, - * in arbitrary multiprecision. - * Returns the failure code, which is zero when all went well. */ - -static PyObject *py2c_solcon_write_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in standard double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in double double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in quad double precision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_write_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the solutions in arbitrary multiprecision to screen. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in standard double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in double double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in quad double precision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_clear_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the container for solutions in arbitrary multiprecision. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_open_solution_input_file - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Prompts the user for the name of the input file for the solutions and - * opens the input file. All subsequent reading happens from this input. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_solcon_length_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in standard double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in double double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in quad double precision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_length_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * On input is the index k to a solution in arbitrary multiprecision, - * stored in the container. On return is the length of the string - * representation for that k-th solution in the container. */ - -static PyObject *py2c_solcon_write_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in standard double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in double double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in quad double precision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_write_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation for the k-th solution stored - * in arbitrary multiprecision in the container. - * On input are two integers: - * 1) the index to the solution; and - * 2) the number of characters in the string representation - * for that solution. */ - -static PyObject *py2c_solcon_retrieve_next_standard_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current standard solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current dobldobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current quaddobl solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_retrieve_next_multprec_initialize - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resets the pointer to the current multprec solution in the container - * to the first solution in the list. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_move_current_standard_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in standard double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_dobldobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_quaddobl_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in double double precision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_move_current_multprec_to_next - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Moves the pointer to the current solution in arbitrary multiprecision - * to the next solution and returns the value of the cursor. - * If cursor on return is zero, then either the pointer was null - * or there is no next solution. */ - -static PyObject *py2c_solcon_length_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current standard double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current double double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current quad double solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_length_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of characters in the string representation - * of the current arbitrary multiprecision solution in the container, - * at the place indicated by the value of the cursor. - * If this value equals zero, then there is no current solution, - * and then the length on return equals zero. */ - -static PyObject *py2c_solcon_write_current_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current standard double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in standard double precision in the container. */ - -static PyObject *py2c_solcon_write_current_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current double double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in double double precision in the container. */ - -static PyObject *py2c_solcon_write_current_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current quad double solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in quad double precision in the container. */ - -static PyObject *py2c_solcon_write_current_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the current multiprecision solution in the solution container - * to the string s of n+1 characters. The last character is \0. - * The value of n is given as the one input parameter to this function. - * On return is the string that contains the string representation of - * the current solution in arbitrary multiprecision in the container. */ - -static PyObject *py2c_solcon_append_standard_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in standard double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_dobldobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in double double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_quaddobl_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in quad double precision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_append_multprec_solution_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a solution in arbitrary multiprecision to the list - * of solutions already stored in the container. - * There are three input parameters: - * 1) the number of variables; - * 2) the number of characters in the string; - * 3) the string representing the solution to append to the list. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_number_of_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in standard double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in double double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in quad double precision, - * as stored in the container. */ - -static PyObject *py2c_solcon_number_of_multprec_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of solutions in arbitrary multiprecision, - * as stored in the container. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_standard_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the double double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their k-th coordinate dropped. - * There is one input parameter: the index k of the coordinate. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quad double precision container - * with the same solutions that have their coordinate dropped - * corresponding to the name in the string s of nc characters long. - * There are two input parameters, an integer and a string: - * 1) nc, the number of characters in the string with the name; - * 2) s, the string with the name of the variable. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of the functions in product.h starts here. */ - -static PyObject *py2c_product_supporting_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a supporting set structure for the system stored in the - * container with coefficients in standard double precision. */ - -static PyObject *py2c_product_write_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the supporting set structure to screen. */ - -static PyObject *py2c_product_set_structure_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the set structure. */ - -static PyObject *py2c_product_parse_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Parses a given string into a set structure. - * On input are two parameters, one integer and one string: - * 1) the number of characters in the given string; and - * 2) the characters in the string. - * On return is the failure code, if zero, then the string - * has been parsed into a valid set structure. */ - -static PyObject *py2c_product_is_set_structure_supporting - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Checks whether the stored set structure is supporting - * for the system in the standard systems container. - * Returns an integer which represents true (1) or false (0). */ - -static PyObject *py2c_product_linear_product_root_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the linear-product root count, computed from - * the supporting set structure. */ - -static PyObject *py2c_product_random_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Builds a random linear-product system based on the - * stored set structure. On return is the failure code, - * which equals zero if all went well. */ - -static PyObject *py2c_product_solve_linear_product_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes all solutions to the linear-product system - * and stores the solutions in the container for solutions - * in standard double precision. On return is the failure - * code, which equals zero if all went well. */ - -static PyObject *py2c_product_clear_set_structure - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the set structure. */ - -static PyObject *py2c_product_m_homogeneous_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For the system in the standard systems container, - * a heuristic partition of the set of variables may - * lead to a Bezout number that is smaller than the total degree. - * On return is the m-homogeneous Bezout number for the - * string representation of the partition that is returned - * as the second argument in the tuple. */ - -static PyObject *py2c_product_m_partition_Bezout_number - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, computes - * the m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -static PyObject *py2c_product_m_homogeneous_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given a partition of the set of variables, constructs - * an m-homogeneous Bezout number for the system in - * the standard systems container. - * On input are two arguments: - * 1) the number of characters in the string (second argument); and - * 2) the string representation for a partition of the variables. - * On return is the m-homogeneous Bezout number. */ - -/* The wrapping of functions with prototypes in celcon.h starts here. */ - -static PyObject *py2c_celcon_initialize_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the cell container with the number of distinct supports, - * this number is given as the one input parameter. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_set_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the type of mixture of the support sets. - * On input are two parameters, an integer and a string: - * 1) the integer equals the number of distinct supports; - * 2) the string is a string representation of a Python list of integers, - * there are as many integers as the value of the first parameter. - * Each integer is a positive number, equal to the number of occurrences - * of each support set. */ - -static PyObject *py2c_celcon_type_of_mixture - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the type of mixture - * of the support sets. This string is the string representation - * of a Python list of integers. */ - -static PyObject *py2c_celcon_append_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Appends a lifted point to the cells container. - * There are three input parameters: - * 1) the dimension of the point; - * 2) the index of the support to where to append to; and - * 3) the string representation of the lifted point. - * Returns the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_retrieve_lifted_point - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string representation of a lifted point. - * On input are three integer numbers: - * 1) the number of coordinates in the lifted point; - * 2) the index to the support set; and - * 3) the index to the point in that support set. */ - -static PyObject *py2c_celcon_mixed_volume_of_supports - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the mixed volume of the supports stored - * in the cell container. */ - -static PyObject *py2c_celcon_number_of_cells - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of cells in the cell container. */ - -static PyObject *py2c_celcon_standard_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in standard double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_dobldobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in double double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_quaddobl_random_coefficient_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifted supports stored in the container, - * a random coefficient system with coefficients in quad double - * precision is stored in the cell container. */ - -static PyObject *py2c_celcon_copy_into_standard_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in standard double precision is copied - * from the cell container to the container for systems with - * coefficients in standard double precision. */ - -static PyObject *py2c_celcon_copy_into_dobldobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in double double precision is copied - * from the cell container to the container for systems with - * coefficients in double double precision. */ - -static PyObject *py2c_celcon_copy_into_quaddobl_systems_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * The random coefficient system in quad double precision is copied - * from the cell container to the container for systems with - * coefficients in quad double precision. */ - -static PyObject *py2c_celcon_standard_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in standard double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in double double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Based on the lifting and the random coefficient system, - * the polyhedral homotopy to solve the random coefficient system - * in quad double precision is constructed. - * This function also initializes the internal data structures to store - * the solutions of start and target systems. - * The lifted supports and the random coefficient system are defined. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_solve_standard_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using standard double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in standard double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_dobldobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using double double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in double double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_solve_quaddobl_start_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the start system corresponding to the k-th mixed cell, - * using quad double precision arithmetic. - * The precondition for this function is that the creation of - * the polyhedral homotopy in quad double precision ended well. - * On return is the number of solution found, which must equal - * the mixed volume of the k-th mixed cell. */ - -static PyObject *py2c_celcon_track_standard_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using standard double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in standard double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_dobldobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using double double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in double double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_track_quaddobl_solution_path - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks a solution path starting at the i-th solution of the k-th cell, - * using quad double precision arithmetic. - * The precondition for this function is that the start system defined - * by the k-th mixed cell is solved in quad double precision. - * There are three input parameters: - * 1) k, the index to a mixed cell in the cell container; - * 2) i, the index to a solution path defined by that mixed cell; - * 3) otp, the level for intermediate output during path tracking. - * A target solution corresponding to the k-th cell is added on return. */ - -static PyObject *py2c_celcon_copy_target_standard_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in standard double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in double double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Copies the i-th target solution corresponding to the k-th mixed cell - * to the container for solutions in quad double precision. - * There are two input parameters for this function: - * 1) k, the index to the mixed cell; - * 2) i, the index to the i-th solution path defined by the cell. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_celcon_permute_standard_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with standard double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_dobldobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with double double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_permute_quaddobl_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Permutes the systems in the container for polynomial and Laurent systems - * with quad double coefficients corresponding to the permutation - * used to compute the mixed-cell configuration. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_celcon_clear_container - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the data in the cell container. */ - -/* wrapping functions to scale polynomial systems and solutions */ - -static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the standard systems container, - * with standard double precision arithmetic. The system in the standard - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the dobldobl systems container, - * with double double precision arithmetic. The system in the dobldobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Applies scaling to the system in the quaddobl systems container, - * with quad double precision arithmetic. The system in the quaddobl - * systems container is replaced by the scaled system. - * On entry is one integer, which should be either 0, 1, or 2: - * 0 for only scaling of the equations, - * 1 variable scaling without variability reduction, - * 2 variable scaling with variability reduction. - * On return is a tuple with the scaling coefficients (if mode > 0) - * and the estimated inverse condition number of the scaling problem. */ - -static PyObject *py2c_scale_standard_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the standard solutions container with - * the scaled solutions, scaled with standard double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_dobldobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the dobldobl solutions container with - * the scaled solutions, scaled with double double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -static PyObject *py2c_scale_quaddobl_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the solutions in the quaddobl solutions container with - * the scaled solutions, scaled with quad double precision arithmetic, - * using the given scaling coefficients. - * On entry are two parameters: an integer and a string. - * The integer contains the number of elements in the list - * of scaling coefficients (doubles) stored in a the string. - * The format of the string is the Python string representation - * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ - -/* wrapping functions to manipulate algebraic sets */ - -static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Replaces the system with coefficients in standard double precision - * in the container with its embedding of dimension d. - * The dimension d is given as an integer parameter on input. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_standard_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in standard double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_dobldobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in double double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_quaddobl_cascade_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a homotopy in quad double precision using the stored - * systems to go one level down the cascade, removing one slice. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Sets the state of monodromy permutations to silent. */ - -static PyObject *py2c_factor_define_output_file_with_string - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Defines the output file for the factorization. - * On input are an integer and a string: - * 1) the integer equals the number of characters in the string; and - * 2) the string contains the name of a file. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns labels, replacing the multiplicity field of each solution - * in standard double precision stored in the container. - * On entry are two integers: - * 1) n, the number of coordinates of the solutions; - * 2) nbsols, the number of solutions in the container. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_factor_initialize_sampler - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the sampling machine with a witness set. - * On entry is the dimension or the number of hyperplanes - * to slide the positive dimensional solution set. */ - -static PyObject *py2c_factor_initialize_monodromy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the internal data structures for n loops, - * to factor a k-dimensional solution component of degree d. - * There are three integers on input, in the following order: - * 1) n, the number of loops; - * 2) d, the degree of the solution set; - * 3) k, the dimensional of the solution set. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_factor_store_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the solutions in the container to the data for monodromy loops. */ - -static PyObject *py2c_factor_restore_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Restores the first initialized solutions from sampler to the container. */ - -static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks as many paths as defined by witness set. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Swaps the current slices with new slices and takes new solutions - * as start to turn back. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Generates k random slides in n-space. - * The k and the n are the two input parameters. - * On return is the failure code, which is zero when all went well. */ - -static PyObject *py2c_factor_set_trace_slice - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Assigns the constant coefficient of the first slice. - * On entry is a flag to indicate if it was the first time or not. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Stores the gamma constants for the sampler in the monodromy loops. - * Generates as many random complex constants as the value on input. - * On return is the failure code, which is zero if all went well. */ - -static PyObject *py2c_factor_permutation_after_loop - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * For a solution set of degree d, computes the permutation using the - * solutions most recently stored, after a loop. - * The number d is the input parameter of this function. - * On return is the string representation of the permutation. */ - -static PyObject *py2c_factor_update_decomposition - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Updates the decomposition with the given permutation of d elements. - * On entry are two integers and one string: - * 1) d, the number of elements in the permutation; - * 2) nc, the number of characters in the string; - * 3) p, the string representation of the permutation. - * Returns one if the current decomposition is certified, - * otherwise returns zero. */ - -static PyObject *py2c_factor_number_of_components - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of irreducible factors in the current - * decomposition of the witness set. */ - -static PyObject *py2c_factor_witness_points_of_component - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns a string which represents an irreducible component. - * On entry are two integers: - * 1) the sum of the degrees of all components; - * 2) the index of the component. */ - -static PyObject *py2c_factor_trace_sum_difference - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the difference between the actual sum at the samples - * defined by the labels to the generic points in the factor, - * and the trace sum. - * On entry are three integer numbers and one string: - * 1) d, the number of points in the witness set; - * 2) k, the dimension of the solution set; - * 3) nc, the number of characters in the string; - * 4) ws, the string representing the labels of the witness set. */ - -static PyObject *py2c_witness_set_of_hypersurface - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given in the string p of nc characters a polynomial in nv variables, - * terminated by a semicolon, the systems and solutions container on - * return contain a witness set for the hypersurface defined by p. - * On entry are two integers and one string, in the following order: - * 1) nv, the number of variables of the polynomials; - * 2) nc, the number of characters in the string p; - * 3) p, string representation of a polynomial, terminates with ';'. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_create_diagonal_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Creates a diagonal homotopy to intersect two solution sets of - * dimensions a and b respectively, where a >= b. - * The two input parameters are values for a and b. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. */ - -static PyObject *py2c_start_diagonal_cascade_solutions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Makes the start solutions to start the cascade homotopy to - * intersect two solution sets of dimensions a and b, where a >= b. - * The dimensions a and b are given as input parameters. - * The systems stored as target and start system in the container - * define the witness sets for these two solution sets. - * On return is the failure code, which equals zero when all went well. */ - -static PyObject *py2c_extrinsic_top_diagonal_dimension - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the dimension of the start and target system to - * start the extrinsic cascade to intersect two witness sets, - * respectively of dimensions a and b, with ambient dimensions - * respectively equal to n1 and n2. - * There are four integers as parameters on input: n1, n2, a and b. */ - -static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Eliminates the extrinsic diagonal for the system and solutions - * in the containers. On input are two integers: - * 1) k, the current number of slack variables in the embedding; - * 2) d, the number of slack variables to add to the final embedding. - * The system in the container has its diagonal eliminated and is - * embedded with k+d slack variables. The solutions corresponding - * to this system are in the solutions container. - * On return is the failure code, which equals zero if all went well. */ - -/* The wrapping of Pieri and Littlewood-Richardson homotopies, - * with prototypes in schubert.h starts here. */ - -static PyObject *py2c_schubert_pieri_count - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of p-plane producing curves of degree q - * that meet m*p + q*(m+p) given general m-planes. - * On input are three integer numbers: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; and - * 3) q, the degree of the curve that produces p-planes. - * The dimension of the ambient space of this Pieri problem is m+p. */ - -static PyObject *py2c_schubert_resolve_conditions - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Resolves a general Schubert intersection condition in n-space - * for k-planes subject to conditions defined by brackers. - * On return is the root count, the number of k-planes that satisfy - * the intersection conditions imposed by the brackets for general flags. - * On entry are five integers and one string: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c, the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen. */ - -static PyObject *py2c_schubert_littlewood_richardson_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Littlewood-Richardson homotopies to resolve a number of - * general Schubert intersection conditions on k-planes in n-space. - * The polynomial system that was solved is in the container for - * systems with coefficients in standard double precision and the - * corresponding solutions are in the standard solutions container. - * On entry are six integers and two strings, in the following order: - * 1) n, the ambient dimension, where the k-planes live; - * 2) k, the dimension of the solution planes; - * 3) c,the number of intersection conditions; - * 4) nc, the number of characters in the string brackets; - * 5) brackets is a string representation of c brackets, where the numbers - * in each bracket are separated by spaces; - * 6) the flag verbose: when 0, no intermediate output is written, - * when 1, then the resolution is dispayed on screen; - * 7) nbchar, the number of characters in the string filename; - * 8) filename is the name of the output file. - * The function returns a tuple of an integer and a string: - * 0) r is the formal root count as the number of k-planes - * for conditions imposed by the brackets for general flags; - * 1) flags, a string with the coefficients of the general flags. */ - -static PyObject *py2c_schubert_localization_poset - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of the localization poset for the - * Pieri root count for m, p, and q. The input parameters are the - * integer values for m, p, and q: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the curves that produce p-planes. */ - -static PyObject *py2c_schubert_pieri_homotopies - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. - * On return the systems container for systems with coefficients in standard - * double precision contains the polynomial system solved and in the - * solutions in standard double precision are in the solutions container. - * On entry are four integers and two strings: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, the string with m*p + q*(m+p) random complex input m-planes, - * where the real and imaginary parts are separated by a space; - * 6) pts, the string with m*p + q*(m+p) random complex interpolation - * points, only needed if q > 0. - * The function returns the combinatorial Pieri root count, - * which should equal the number of solutions in the container. */ - -static PyObject *py2c_schubert_osculating_planes - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the string representation of n real m-planes in - * d-space osculating a rational normal curve - * at the n points in s, where n = m*p + q*(m+p) and d = m+p. - * On entry are four integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string pts; and - * 5) pts, the string with m*p + q*(m+p) interpolation points. */ - -static PyObject *py2c_schubert_pieri_system - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Fills the container of systems with coefficients in standard - * double precision with a polynomial system that expresses the - * intersection conditions of a general Pieri problem. - * On input are five integers and one string: - * 1) m, the dimension of the input planes; - * 2) p, the dimension of the output planes; - * 3) q, the degree of the solution maps; - * 4) nc, the number of characters in the string A; - * 5) A, m*p + q*(m+p) random complex input m-planes, where - * the real and imaginary parts are separated by a space; - * 6) a flag is_real: if == 1, then the coefficients of A are real, - * if == 0, then the coefficients of A are complex. - * Returns the failure code, which equals zero if all went well. */ - -/* The wrapping functions in mapcon.h starts here. */ - -static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Solves the binomial system stored in the Laurent systems container. - * There is one input argument, either one or zero. - * If one, then only the pure top dimensional solutions are computed. - * If zero, then all solution sets are computed. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Writes the maps stored in the container to screen. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates the maps stored in the container. - * Returns the failure code, which equals zero if all went well. */ - -static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the top dimension of the maps in the container. */ - -static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the number of maps in the container. */ - -static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Given the dimension and index of a map, given as two integers as - * input parameters, returns the degree of that map. */ - -static PyObject *py2c_mapcon_coefficients_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the coefficients of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of complex doubles. */ - -static PyObject *py2c_mapcon_exponents_of_map - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Returns the exponents of a monomial map stored in the container. - * On entry are three parameters: - * 1) the dimension of the map; - * 2) the index of the map in all maps of that dimension; - * 3) the number of variables. - * On return is a Python list of integers. */ - -/* The wrapping of functions with prototypes in next_track.h starts below. */ - -static PyObject *py2c_initialize_standard_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using standard double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the standard systems container. */ - -static PyObject *py2c_initialize_dobldobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using double double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the dobldobl systems container. */ - -static PyObject *py2c_initialize_quaddobl_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using quad double precision arithmetic. - * There is one integer number on input to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used. - * Before calling this routine the target and start system must - * be copied over from the quaddobl systems container. */ - -static PyObject *py2c_initialize_multprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the homotopy to track a path with a generator, - * using arbitrary multiprecision arithmetic. - * There is are two integer numbers on input: - * 1) one to be considered as a boolean, - * as an indicator whether a fixed gamma constant will be used; and - * 2) the number of decimal places in the working precision. - * Before calling this routine the target and start system must - * be copied over from the multprec systems container. */ - -static PyObject *py2c_initialize_varprec_homotopy - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the variable precision homotopy with the target and - * start system stored in the strings. - * On entry are three integers and two strings, in the following order: - * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant - * is used, if 0, a random value for gamma will be generated; - * 2) nc_target, the number of characters in the string target; - * 3) target, the string representation of the target system; - * 4) nc_start, the number of characters in the string start; - * 5) start, the string representation of the start system. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_initialize_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the standard solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the dobldobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the quaddobl solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Initializes the path tracker with a generator with a solution - * from the multprec solutions container. The index to the solution - * is given as an integer input parameter. The counting of the - * indices starts at one, so the first solution has index one. */ - -static PyObject *py2c_initialize_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Uses the string representation of a solution to initialize the - * variable precision path tracker with. - * There are three input parameters, two integers and one string: - * 1) nv, the number of variables in the solution; - * 2) nc, the number of characters in the string sol; - * 3) sol, the string representation of a solution. - * On return is the failure code, which equals zero if all went well. */ - -static PyObject *py2c_next_standard_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with standard double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the standard solutions container. - * The functions py2c_initialized_standard_tracker and - * py2c_initialize_standard_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_dobldobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with double double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the dobldobl solutions container. - * The functions py2c_initialized_dobldobl_tracker and - * py2c_initialize_dobldobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_quaddobl_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with quad double - * precision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the quaddobl solutions container. - * The functions py2c_initialized_quaddobl_tracker and - * py2c_initialize_quaddobl_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_multprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on the solution path with arbitrary - * multiprecision for the given index. This index is given as an input - * parameter. The index to the solution path starts its count at one. - * The point itself is stored in the multprec solutions container. - * The functions py2c_initialized_multprec_tracker and - * py2c_initialize_multprec_solution must have been executed earlier. - * The failcode is returned, which equals zero if all is well. */ - -static PyObject *py2c_next_varbprec_solution - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Computes the next point on a solution path in variable precision. - * There are four integer input parameters: - * 1) the number of correct decimal places in the solution; - * 2) an upper bound on the number of decimal places in the precision; - * 3) the maximum number of Newton iterations; - * 4) a flag zero or one to indicate the verbose level. - * On return is a tuple: - * 0) the failure code, which equals zero if all went well; and - * 1) the string representation of the next solution on the path. */ - -static PyObject *py2c_clear_standard_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the standard double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_dobldobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the double double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_quaddobl_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the quad double precision tracker - * with a generator. */ - -static PyObject *py2c_clear_multprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the arbitrary multiprecision tracker - * with a generator. */ - -static PyObject *py2c_clear_varbprec_tracker - ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Deallocates data used in the variable precision tracker - * with a generator. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in quad double precision by the - * functions in adepath_qd.h, starts here. */ - -static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The quaddobl systems container contains a valid polynomial system - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation in quad - * double precision on the data in the systems and solutions container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ - -/* The wrapping of Newton's method and path trackers with the evaluation - * done by algorithmic differentiation in quad double precision on the GPU - * by the functions in gpupath_qd.h, starts here. */ - -static PyObject *py2c_gpu_newton_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Runs Newton's method with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The quaddobl systems container contains a valid polynomial system - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen. - * - * ON RETURN : - * fail 0 if all went well, and the corrected solution is in the - * solution container, - * if different from zero, then an error happened. */ - -static PyObject *py2c_gpu_onepath_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks one solution path with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds a valid solution. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solution at the end of the path - * is in the solution container, - * if different from 0, then an error happened. */ - -static PyObject *py2c_gpu_manypaths_qd ( PyObject *self, PyObject *args ); -/* - * DESCRIPTION : - * Tracks many solution paths with algorithmic differentation on CPU and GPU - * in quad double precision on the data in the systems and solutions - * container. - * - * REQUIRED : - * The start and target systems have been defined - * and the quaddobl solutions container holds valid solutions. - * - * ON ENTRY : - * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); - * verbose 0 if no intermediate output is wanted, - * 1 if extra information should be written to screen; - * regamma real part of the random gamma constant; - * imgamma imaginary part of the random constant. - * - * ON RETURN : - * fail 0 if all went well, and the solutions at the end of paths - * are in the solution container, - * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Lib/READ_ME phcpack-2.4.85/src/Lib/READ_ME --- phcpack-2.4.84/src/Lib/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -PHCpack as a library of C functions with a state machine in PHCv2.4.83 +PHCpack as a library of C functions with a state machine in PHCv2.4.85 This directory collects header files and definitions of C which bind the operations of PHCpack as a state machine in a systematic manner. @@ -7,8 +7,8 @@ Thanks to Anton Leykin for suggesting changes in the syntax of functions having arrays of parameters. -Jointly with Kathy Piret, we use the library to build a C extension -module "phcpy2c.c" for the Python interpreter. +This C library was used for the C extension module for Python and +to integrate the Path library, moved to the ../Mod folder in v2.4.85. Support for Laurent systems was added in version 2.3.72. New in 2.3.84 are path trackers with generators, available in the files @@ -18,12 +18,6 @@ in the directory ../Objects. Files starting with the prefix lib_ are test files. -The main upgrade in version 2.4 is the integration of the Path library -of Xiangcheng Yu. - -In 2.4.09, the phcpy2c3.c defines the code of the phcpy2c3 extension -module for use with Python 3.5. - ------------------------------------------------------------------------------ file name : short description ------------------------------------------------------------------------------ @@ -112,22 +106,5 @@ sweep.c : interface to the sweep homotopy lib_sweep.c : test on the sweep ------------------------------------------------------------------------------ -adepath_d : algorithmic diff in trackers with doubles -adepath_dd : algorithmic diff in trackers with double doubles -adepath_qd : algorithmic diff in trackers with quad doubles -lib_adepath_d : test on functions in adepath_d -lib_adepath_dd : test on functions in adepath_dd -lib_adepath_qd : test on functions in adepath_qd -gpupath_d : interface to Path library on GPU for doubles -gpupath_dd : interface to Path library on GPU for double doubles -gpupath_qd : interface to Path library on GPU for quad doubles -lib_gpupath_d : test on functions in gpupath_d -lib_gpupath_dd : test on functions in gpupath_dd -lib_gpupath_qd : test on functions in gpupath_qd ------------------------------------------------------------------------------- phc_solve.c : test on the blackbox solver in PHCpack -phcpy2c.c : C extension module for Python 2.6 and 2.7 -phcpy2cadepath_d.cpp : C++ extension of phcpy2c with Path (CPU) for doubles -phcpy2cpath_d.cpp : C++ extension of phcpy2c with Path (GPU) for doubles -phcpy2c3.c : C extension module for Python 3.5 ------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Lib/UPDATES phcpack-2.4.85/src/Lib/UPDATES --- phcpack-2.4.84/src/Lib/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Lib/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1,3 +1,10 @@ +Fri 25 Jun 2021 : updated lib.gpr and renamed the file to face.gpr. + +Thu 24 Jun 2021 : added a preliminary lib.gpr. + +Tue 22 Jun 2021 : moved the code for the extension module for phcpy to the + new, separate folder ../Mod. Moved also all code for the Path library. + Mon 14 Dec 2020 : extended phcpack with function to set and get the gamma. Added functions to phcpy2c.h, phcpy2c2.c, and phcpy2c3.c to set and get the gamma constant. diff -Nru phcpack-2.4.84/src/Mod/adepath_d.c phcpack-2.4.85/src/Mod/adepath_d.c --- phcpack-2.4.84/src/Mod/adepath_d.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_d.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file adepath_d.c contains the definitions of the functions + * with prototypes documented in adepath_d.h. */ + +#include +#include +#include "adepath_d.h" +#include "adenewton_d.h" +#include "adeonepath_d.h" +#include "ademanypaths_d.h" + +int ade_newton_d ( int verbose ) +{ + int fail = adenewton_d(verbose); + + return fail; +} + +int ade_onepath_d ( int verbose, double regamma, double imgamma ) +{ + int fail = adeonepath_d(verbose,regamma,imgamma); + + return fail; +} + +int ade_manypaths_d ( int verbose, double regamma, double imgamma ) +{ + int fail = ademanypaths_d(verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/adepath_dd.c phcpack-2.4.85/src/Mod/adepath_dd.c --- phcpack-2.4.84/src/Mod/adepath_dd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_dd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file adepath_dd.c contains the definitions of the functions + * with prototypes documented in adepath_dd.h. */ + +#include +#include +#include "adepath_dd.h" +#include "adenewton_dd.h" +#include "adeonepath_dd.h" +#include "ademanypaths_dd.h" + +int ade_newton_dd ( int verbose ) +{ + int fail = adenewton_dd(verbose); + + return fail; +} + +int ade_onepath_dd ( int verbose, double regamma, double imgamma ) +{ + int fail = adeonepath_dd(verbose,regamma,imgamma); + + return fail; +} + +int ade_manypaths_dd ( int verbose, double regamma, double imgamma ) +{ + int fail = ademanypaths_dd(verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/adepath_dd.h phcpack-2.4.85/src/Mod/adepath_dd.h --- phcpack-2.4.84/src/Mod/adepath_dd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_dd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,72 @@ +/* The file adepath_dd.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation in double + * double precision which use the Ada code for the data structures in PHCpack. + * By default, compilation with gcc is assumed. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __ADEPATH_DD_H__ +#define __ADEPATH_DD_H__ + +int ade_newton_dd ( int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int ade_onepath_dd ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random constant gamma; + * imgamma imaginary part of the random constant gamma. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int ade_manypaths_dd ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random constant gamma; + * imgamma imaginary part of the random constant gamma. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/adepath_d.h phcpack-2.4.85/src/Mod/adepath_d.h --- phcpack-2.4.84/src/Mod/adepath_d.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_d.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,69 @@ +/* The file adepath_d.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation in double + * precision wrapped so it can be used as a C library. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __ADEPATH_D_H__ +#define __ADEPATH_D_H__ + +int ade_newton_d ( int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int ade_onepath_d ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int ade_manypaths_d ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/adepath_qd.c phcpack-2.4.85/src/Mod/adepath_qd.c --- phcpack-2.4.84/src/Mod/adepath_qd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_qd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file adepath_qd.c contains the definitions of the functions + * with prototypes documented in adepath_qd.h. */ + +#include +#include +#include "adepath_qd.h" +#include "adenewton_qd.h" +#include "adeonepath_qd.h" +#include "ademanypaths_qd.h" + +int ade_newton_qd ( int verbose ) +{ + int fail = adenewton_qd(verbose); + + return fail; +} + +int ade_onepath_qd ( int verbose, double regamma, double imgamma ) +{ + int fail = adeonepath_qd(verbose,regamma,imgamma); + + return fail; +} + +int ade_manypaths_qd ( int verbose, double regamma, double imgamma ) +{ + int fail = ademanypaths_qd(verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/adepath_qd.h phcpack-2.4.85/src/Mod/adepath_qd.h --- phcpack-2.4.84/src/Mod/adepath_qd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/adepath_qd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,72 @@ +/* The file adepath_qd.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation in quad + * double precision which use the Ada code for the data structures in PHCpack. + * By default, compilation with gcc is assumed. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __ADEPATH_DD_H__ +#define __ADEPATH_DD_H__ + +int ade_newton_qd ( int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int ade_onepath_qd ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random complex constant gamma; + * imgamma imaginary part of the random complex constant gamma. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int ade_manypaths_qd ( int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random complex constant gamma; + * imgamma imaginary part of the random complex constant gamma. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/gpupath_d.c phcpack-2.4.85/src/Mod/gpupath_d.c --- phcpack-2.4.84/src/Mod/gpupath_d.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_d.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file gpupath_d.c contains the definitions of the functions + * with prototypes documented in gpupath_d.h. */ + +#include +#include +#include "gpupath_d.h" +#include "gpunewton_d.h" +#include "gpuonepath_d.h" +#include "gpumanypaths_d.h" + +int gpu_newton_d ( int mode, int verbose ) +{ + int fail = gpunewton_d(mode,verbose); + + return fail; +} + +int gpu_onepath_d ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpuonepath_d(mode,verbose,regamma,imgamma); + + return fail; +} + +int gpu_manypaths_d ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpumanypaths_d(mode,verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/gpupath_dd.c phcpack-2.4.85/src/Mod/gpupath_dd.c --- phcpack-2.4.84/src/Mod/gpupath_dd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_dd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file gpupath_dd.c contains the definitions of the functions + * with prototypes documented in gpupath_dd.h. */ + +#include +#include +#include "gpupath_dd.h" +#include "gpunewton_dd.h" +#include "gpuonepath_dd.h" +#include "gpumanypaths_dd.h" + +int gpu_newton_dd ( int mode, int verbose ) +{ + int fail = gpunewton_dd(mode,verbose); + + return fail; +} + +int gpu_onepath_dd ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpuonepath_dd(mode,verbose,regamma,imgamma); + + return fail; +} + +int gpu_manypaths_dd ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpumanypaths_dd(mode,verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/gpupath_dd.h phcpack-2.4.85/src/Mod/gpupath_dd.h --- phcpack-2.4.84/src/Mod/gpupath_dd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_dd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,86 @@ +/* The file gpupath_dd.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation on the GPU + * in double double precision wrapped so it can be used as a C library. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __GPUPATH_DD_H__ +#define __GPUPATH_DD_H__ + +int gpu_newton_dd ( int mode, int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int gpu_onepath_dd ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int gpu_manypaths_dd ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/gpupath_d.h phcpack-2.4.85/src/Mod/gpupath_d.h --- phcpack-2.4.84/src/Mod/gpupath_d.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_d.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,83 @@ +/* The file gpupath_d.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation in double + * precision wrapped so it can be used as a C library. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __GPUPATH_D_H__ +#define __GPUPATH_D_H__ + +int gpu_newton_d ( int mode, int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU or GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int gpu_onepath_d ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU or GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int gpu_manypaths_d ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU or GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/gpupath_qd.c phcpack-2.4.85/src/Mod/gpupath_qd.c --- phcpack-2.4.84/src/Mod/gpupath_qd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_qd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,30 @@ +/* The file gpupath_qd.c contains the definitions of the functions + * with prototypes documented in gpupath_qd.h. */ + +#include +#include +#include "gpupath_qd.h" +#include "gpunewton_qd.h" +#include "gpuonepath_qd.h" +#include "gpumanypaths_qd.h" + +int gpu_newton_qd ( int mode, int verbose ) +{ + int fail = gpunewton_qd(mode,verbose); + + return fail; +} + +int gpu_onepath_qd ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpuonepath_qd(mode,verbose,regamma,imgamma); + + return fail; +} + +int gpu_manypaths_qd ( int mode, int verbose, double regamma, double imgamma ) +{ + int fail = gpumanypaths_qd(mode,verbose,regamma,imgamma); + + return fail; +} diff -Nru phcpack-2.4.84/src/Mod/gpupath_qd.h phcpack-2.4.85/src/Mod/gpupath_qd.h --- phcpack-2.4.84/src/Mod/gpupath_qd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/gpupath_qd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,86 @@ +/* The file gpupath_qd.h contains prototypes to call Newton's method and + * the path tracking methods using algorithmic differentiation on the GPU + * in quad double precision wrapped so it can be used as a C library. + * To compile with a C++ compiler such as g++, the flag compilewgpp must + * be defined as "g++ -Dcompilewgpp=1." */ + +#ifndef __GPUPATH_QD_H__ +#define __GPUPATH_QD_H__ + +int gpu_newton_qd ( int mode, int verbose ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The quaddobl systems container contains a valid polynomial system + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +int gpu_onepath_qd ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +int gpu_manypaths_qd ( int mode, int verbose, double regamma, double imgamma ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * containers. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode equals 0, 1, or 2: + * if mode = 0, then both CPU and GPU will execute, + * if mode = 1, then only CPU runs Newton's method, + * if mode = 2, then only GPU runs Newton's method; + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random gamma constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +#endif diff -Nru phcpack-2.4.84/src/Mod/lib_adepath_d.c phcpack-2.4.85/src/Mod/lib_adepath_d.c --- phcpack-2.4.84/src/Mod/lib_adepath_d.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_adepath_d.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in adepath_d */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "adepath_d.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation : \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_standard_start_system(); + fail = copy_start_system_to_container(); + fail = copy_start_solutions_to_container(); + fail = syscon_number_of_standard_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_newton_d(1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_standard_target_system(); + fail = read_standard_start_system(); + fail = copy_start_solutions_to_container(); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_onepath_d(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_standard_target_system(); + fail = read_standard_start_system(); + fail = copy_start_solutions_to_container(); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_manypaths_d(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/lib_adepath_dd.c phcpack-2.4.85/src/Mod/lib_adepath_dd.c --- phcpack-2.4.84/src/Mod/lib_adepath_dd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_adepath_dd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in adepath_dd */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "adepath_dd.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation : \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_system_to_container(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = syscon_number_of_dobldobl_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_newton_dd(1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_dobldobl_target_system(); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_onepath_dd(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_dobldobl_target_system(); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_manypaths_dd(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/lib_adepath_qd.c phcpack-2.4.85/src/Mod/lib_adepath_qd.c --- phcpack-2.4.84/src/Mod/lib_adepath_qd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_adepath_qd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in adepath_qd */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "adepath_qd.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation : \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_system_to_container(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = syscon_number_of_quaddobl_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_newton_qd(1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_quaddobl_target_system(); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_onepath_qd(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_quaddobl_target_system(); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = ade_manypaths_qd(1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/lib_gpupath_d.c phcpack-2.4.85/src/Mod/lib_gpupath_d.c --- phcpack-2.4.84/src/Mod/lib_gpupath_d.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_gpupath_d.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in gpupath_d */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "gpupath_d.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_standard_start_system(); + fail = copy_start_system_to_container(); + fail = copy_start_solutions_to_container(); + fail = syscon_number_of_standard_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_newton_d(2,1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_standard_target_system(); + fail = read_standard_start_system(); + fail = copy_start_solutions_to_container(); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_onepath_d(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_standard_target_system(); + fail = read_standard_start_system(); + fail = copy_start_solutions_to_container(); + fail = solcon_number_of_standard_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_manypaths_d(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_standard_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/lib_gpupath_dd.c phcpack-2.4.85/src/Mod/lib_gpupath_dd.c --- phcpack-2.4.84/src/Mod/lib_gpupath_dd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_gpupath_dd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in gpupath_dd */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "gpupath_dd.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_system_to_container(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = syscon_number_of_dobldobl_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_newton_dd(2,1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_dobldobl_target_system(); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_onepath_dd(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_dobldobl_target_system(); + fail = read_dobldobl_start_system(); + fail = copy_dobldobl_start_solutions_to_container(); + fail = solcon_number_of_dobldobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_manypaths_dd(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_dobldobl_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/lib_gpupath_qd.c phcpack-2.4.85/src/Mod/lib_gpupath_qd.c --- phcpack-2.4.84/src/Mod/lib_gpupath_qd.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/lib_gpupath_qd.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,103 @@ +/* test on the functions in gpupath_qd */ + +#include +#include +#include +#include "phcpack.h" +#include "syscon.h" +#include "solcon.h" +#include "gpupath_qd.h" + +void test_newton ( void ); +/* + * DESCRIPTION : + * The user is prompted for a start system + * and Newton's method is called. */ + +void test_onepath ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and one solution path is tracked. */ + +void test_manypaths ( void ); +/* + * DESCRIPTION : + * The user is prompted for a target and start system + * and many solution paths are tracked. */ + +int main ( int argc, char *argv[] ) +{ + int choice; + char ch; + + adainit(); + + printf("\nMENU to apply algorithmic differentiation on the GPU: \n"); + printf(" 0. in Newton's method to correct one solution;\n"); + printf(" 1. to track one solution path;\n"); + printf(" 2. to track many solution paths.\n"); + printf("Type 0, 1, or 2 to select : "); + scanf("%d",&choice); + scanf("%c",&ch); /* skip newline symbol */ + + if(choice == 0) + test_newton(); + else if(choice == 1) + test_onepath(); + else if(choice == 2) + test_manypaths(); + else + printf("invalid selection, please try again\n"); + + adafinal(); + + return 0; +} + +void test_newton ( void ) +{ + int fail,dim,len; + + printf("\nRunning Newton's method ...\n"); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_system_to_container(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = syscon_number_of_quaddobl_polynomials(&dim); + printf("The system container has %d polynomials.\n",dim); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_newton_qd(2,1); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} + +void test_onepath ( void ) +{ + int fail,len; + + printf("\nTracking one solution path ...\n"); + fail = read_quaddobl_target_system(); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_onepath_qd(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} + +void test_manypaths ( void ) +{ + int fail,len; + + printf("\nTracking many solution paths ...\n"); + fail = read_quaddobl_target_system(); + fail = read_quaddobl_start_system(); + fail = copy_quaddobl_start_solutions_to_container(); + fail = solcon_number_of_quaddobl_solutions(&len); + printf("The solution container has size %d.\n",len); + fail = gpu_manypaths_qd(2,1,1.0,0.0); + printf("The solutions after Newton's method :\n"); + fail = solcon_write_quaddobl_solutions(); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2c2.c phcpack-2.4.85/src/Mod/phcpy2c2.c --- phcpack-2.4.84/src/Mod/phcpy2c2.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2c2.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,11852 @@ +/* This file contains the definitions of the prototypes in phcpy2c.h. */ + +#include +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "tabform.h" +#include "syspool.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "intcelcon.h" +#include "scalers.h" +#include "reducers.h" +#include "numbtrop.h" +#include "sweep.h" +#include "multiplicity.h" +#include "witset.h" +#include "witsols.h" +#include "mapcon.h" +#include "series.h" +#include "padcon.h" +#include "jump_track.h" +#include "next_track.h" +#include "structmember.h" + +#ifdef compilewgpp +extern "C" void adainit( void ); +extern "C" void adafinal( void ); +#else +extern void adainit( void ); +extern void adafinal( void ); +#endif + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +static PyObject *py2c_corecount + ( PyObject *self, PyObject *args ) +{ + if(!PyArg_ParseTuple(args,"")) return NULL; + + int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN); + + return Py_BuildValue("i", number_of_cores); +} + +/* The wrapping of functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed + ( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed + ( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of copying systems from and to containers starts here. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im,&pwt)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_value_of_continuation_parameter + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + double val; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = get_value_of_continuation_parameter(idx,&val); + + return Py_BuildValue("d",val); +} + +static PyObject *py2c_set_value_of_continuation_parameter + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + double val; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&idx,&val)) return NULL; + fail = set_value_of_continuation_parameter(idx,&val); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_standard_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +/* Wrapping of crude path trackers of the jumpstart library starts here. */ + +static PyObject *py2c_standard_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = standard_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = dobldobl_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = quaddobl_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of copying solutions from and to containers starts here. */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,vrb,nbtasks,mvfocus = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) + return NULL; + fail = solve_standard_system(&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_scan_for_symbols + ( PyObject *self, PyObject *args ) +{ + int fail,nbc,dim; + char *polsys; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc,&polsys)) return NULL; + + fail = scan_number_of_variables(nbc,polsys,&dim); + + return Py_BuildValue("i",dim); +} + +static PyObject *py2c_solve_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_dobldobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,vrb,nbtasks = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_quaddobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,vrb,nbtasks,mvfocus = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) + return NULL; + fail = solve_standard_Laurent_system + (&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,vrb,nbtasks = 0; + char rocos[1024]; + + initialize(); + if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_dobldobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_quaddobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ) +{ + int fail,prc,vrb; + double regm,imgm; + + initialize(); + if (!PyArg_ParseTuple(args,"ddii",®m,&imgm,&prc,&vrb)) return NULL; + fail = set_gamma_constant(regm,imgm,prc,vrb); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ) +{ + int fail,prc,vrb; + double regm,imgm; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&prc,&vrb)) return NULL; + fail = get_gamma_constant(®m,&imgm,prc,vrb); + + return Py_BuildValue("(d,d)",regm,imgm); +} + +static PyObject *py2c_mixed_volume + ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_mixed_volume_by_demics + ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume_by_demics(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume_by_demics(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = standard_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = dobldobl_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = quaddobl_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_condition_report + ( PyObject *self, PyObject *args ) +{ + int fail,maxit,verbose; + double tolres,tolerr,tolsing; + char *name; + int cntfail,cntreal,cntcmplx,cntregu,cntsing,cntclus,nbc; + int t_err[16]; + int t_rco[16]; + int t_res[16]; + char st_err[256]; + char st_rco[256]; + char st_res[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"idddsi", + &maxit,&tolres,&tolerr,&tolsing,&name,&verbose)) + return NULL; + + nbc = strlen(name); + + if(verbose == 1) + { + if(nbc == 0) + printf("Writing the output to screen.\n"); + else + printf("Writing the output to file %s.\n", name); + } + fail = standard_condition_report + (maxit,tolres,tolerr,tolsing,nbc,name, + &cntfail,&cntreal,&cntcmplx,&cntregu,&cntsing,&cntclus, + t_err,t_rco,t_res,verbose); + + intlist2str(16, t_err, st_err); + intlist2str(16, t_rco, st_rco); + intlist2str(16, t_res, st_res); + + return Py_BuildValue("(i, i, i, i, i, i, i, s, s, s)", fail, + cntregu, cntsing, cntreal, cntcmplx, cntclus, cntfail, + st_err, st_res, st_rco); +} + +/* The wrapping of the functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec + ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* The wrapping of the functions in giftwrappers.h starts from here. */ + +static PyObject *py2c_giftwrap_planar + ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull + ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int idx,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + nbr = support_size(idx); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions in syscon.h starts from here. */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_dobldobl_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_quaddobl_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_standard_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_standard_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_standard_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_standard_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_standard_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_standard_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_standard_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term + ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_standard_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free(exp); + free(c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_standard_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_standard_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_multprec_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_standard_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_multprec_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_total_degree + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_standard_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_dobldobl_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_quaddobl_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_add_symbol + ( PyObject *self, PyObject *args ) +{ + int fail,nbc; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc,&name)) return NULL; + + fail = syscon_add_symbol(nbc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_standard_one_affinization(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_dobldobl_one_affinization(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_quaddobl_one_affinization(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions in tabform.h starts from here */ + +static PyObject *py2c_tabform_store_standard_tableau + ( PyObject *self, PyObject *args ) +{ + int fail,neq,nvr,nc1,nc2,nc3,verbose; + char *nbt,*cff,*xpc; + + initialize(); + if(!PyArg_ParseTuple(args,"iiisisisi",&neq,&nvr,&nc1,&nbt,&nc2,&cff, + &nc3,&xpc,&verbose)) return NULL; + { + if(verbose > 0) + { + printf("the string of terms : %s\n", nbt); + printf("the string of coefficients : %s\n", cff); + printf("the string of exponents : %s\n", xpc); + } + int ic1 = itemcount(nbt); + int ic2 = itemcount(xpc); + int ic3 = itemcount(cff); + + if(verbose > 0) + { + printf("number of items in nbt : %d\n", ic1); + printf("number of items in xpc : %d\n", ic2); + printf("number of items in cff : %d\n", ic3); + } + int nbterms[ic1]; + int exponents[ic2]; + double coefficients[ic3]; + + str2intlist(ic1,nbt,nbterms); + str2intlist(ic2,xpc,exponents); + str2dbllist(ic3,cff,coefficients); + + if(verbose > 0) + { + int idx; + + printf("the number of terms : "); + for(idx=0; idx 0) + { + printf("the number of equations : %d\n", neq); + printf("the number of variables : %d\n", nvr); + printf("total number of terms : %d\n", nbt); + } + { + int nbterms[neq]; + const int nbexp = nvr*nbt; + const int nbcff = 2*nbt; + int exponents[nbexp]; + double coefficients[nbcff]; + char strnbt[neq*8]; + char strxps[nbexp*8]; + char strcff[nbcff*26]; + + fail = number_of_standard_terms(neq,nbterms,&nbt,verbose); + fail = standard_tableau_form + (neq,nvr,nbterms,coefficients,exponents,verbose); + + intlist2str(neq, nbterms, strnbt); + intlist2str(nbexp, exponents, strxps); + dbllist2str(nbcff, coefficients, strcff); + if(verbose > 0) + { + int idx; + printf("the number of terms : "); + for(idx=0; idx 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions with prototypes in reducers.h starts here. */ + +static PyObject *py2c_linear_reduce_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = standard_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_linear_reduce_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = dobldobl_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_linear_reduce_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = quaddobl_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_nonlinear_reduce_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,eqmax,spmax,rpmax,eqcnt,spcnt,rpcnt; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&eqmax,&spmax,&rpmax)) return NULL; + + fail = standard_nonlinear_reduce_system + (eqmax,spmax,rpmax,&eqcnt,&spcnt,&rpcnt); + + return Py_BuildValue("(i,i,i)",eqcnt,spcnt,rpcnt); +} + +/* The wrapping of the functions with prototypes in sweep.h starts here. */ + +static PyObject *py2c_sweep_define_parameters_numerically + ( PyObject *self, PyObject *args ) +{ + int fail,nq,nv,np,cnt; + char *strpars; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nq,&nv,&np,&strpars)) return NULL; + + cnt = itemcount(strpars); + { + int pars[cnt]; + + str2intlist(cnt,strpars,pars); + fail = sweep_define_parameters_numerically(nq,nv,np,pars); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_define_parameters_symbolically + ( PyObject *self, PyObject *args ) +{ + int fail,nq,nv,np,nc; + char *pars; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nq,&nv,&np,&nc,&pars)) return NULL; + + fail = sweep_define_parameters_symbolically(nq,nv,np,nc,pars); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_get_number_of_equations + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_equations(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_number_of_variables + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_variables(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_number_of_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_indices_numerically + ( PyObject *self, PyObject *args ) +{ + int fail,np,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&np); + { + int idx[np]; + char stridx[np*10]; + + fail = sweep_get_indices_numerically(idx); + + nc = intlist2str(np,idx,stridx); + + return Py_BuildValue("s",stridx); + } +} + +static PyObject *py2c_sweep_get_indices_symbolically + ( PyObject *self, PyObject *args ) +{ + int fail,np,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&np); + { + char buf[np*20]; /* assumes no more than 20 characters per symbol */ + + fail = sweep_get_indices_symbolically(&nc,buf); + + buf[nc] = '\0'; + + return Py_BuildValue("s",buf); + } +} + +static PyObject *py2c_sweep_clear_definitions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_clear_definitions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_standard_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 2*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_standard_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_standard_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 2*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_standard_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_dobldobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 4*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_dobldobl_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_dobldobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 4*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_dobldobl_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_quaddobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 8*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_quaddobl_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_quaddobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 8*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_quaddobl_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_get_standard_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_standard_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_standard_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_standard_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_dobldobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_dobldobl_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_dobldobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_dobldobl_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_quaddobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_quaddobl_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_quaddobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_quaddobl_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_standard_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + + fail = sweep_standard_complex_run(choice,&g_re,&g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_dobldobl_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + { + if(choice < 2) + fail = sweep_dobldobl_complex_run(choice,&g_re,&g_im); + else + { + double regamma[2]; + double imgamma[2]; + regamma[0] = g_re; regamma[1] = 0.0; + imgamma[0] = g_im; imgamma[1] = 0.0; + fail = sweep_dobldobl_complex_run(choice,regamma,imgamma); + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_quaddobl_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + { + if(choice < 2) + fail = sweep_quaddobl_complex_run(choice,&g_re,&g_im); + else + { + double regamma[4]; + double imgamma[4]; + regamma[0] = g_re; regamma[1] = 0.0; + regamma[2] = 0.0; regamma[3] = 0.0; + imgamma[0] = g_im; imgamma[1] = 0.0; + imgamma[2] = 0.0; imgamma[3] = 0.0; + fail = sweep_quaddobl_complex_run(choice,regamma,imgamma); + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_standard_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_standard_real_run(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_dobldobl_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_dobldobl_real_run(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_quaddobl_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_quaddobl_real_run(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping for the multiplicity structure starts here. */ + +static PyObject *py2c_standard_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = standard_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +static PyObject *py2c_dobldobl_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose,mult; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = dobldobl_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +static PyObject *py2c_quaddobl_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose,mult; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = quaddobl_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +/* The wrapping of the numerical tropisms container starts here. */ + +static PyObject *py2c_numbtrop_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail,nbt,dim,k; + char *data; /* all numbers come in one long string */ + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&nbt,&dim,&data)) return NULL; + { + const int lendata = nbt*(dim+2); + double numbers[lendata]; + int wnd[nbt]; + double dir[nbt*dim]; + double err[nbt]; + + str2dbllist(lendata,data,numbers); + + for(k=0; k %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_update_dobldobl_decomposition + ( PyObject *self, PyObject *args ) +{ + int fail,i,d,nc; + char *permutation; + int done = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; + { + int nb,perm[d],nf[2]; + + /* printf("updating with "); + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_update_quaddobl_decomposition + ( PyObject *self, PyObject *args ) +{ + int fail,i,d,nc; + char *permutation; + int done = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; + { + int nb,perm[d],nf[2]; + + /* printf("updating with "); + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_standard_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_standard_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_number_of_dobldobl_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_dobldobl_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_number_of_quaddobl_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_quaddobl_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_standard_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_standard_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,vrf,mrp,sqr,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiisiiiiis", + &n,&k,&nbc,&nc,&cond,&vrb,&vrf,&mrp,&sqr,&szn,&name)) + return NULL; +/* + printf("the value of szn : %d\n", szn); + printf("the value of vrb : %d\n", vrb); + printf("the value of vrf : %d\n", vrf); + printf("the value of mrp : %d\n", mrp); + printf("the value of sqr : %d\n", sqr); + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = standard_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 4*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = dobldobl_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 8*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = quaddobl_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_standard_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_track + ( PyObject *self, PyObject *args ) +{ + int nbc,fail,localfile,verbose,mhom,nvr,*idz; + char *name; + char *stridz; + + initialize(); + if(!PyArg_ParseTuple(args,"isiiiis", + &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; + + if(mhom == 1) + padcon_dobldobl_projective_transformation(); + else if(mhom > 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_dobldobl_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_track + ( PyObject *self, PyObject *args ) +{ + int nbc,fail,localfile,verbose,mhom,nvr,*idz; + char *name; + char *stridz; + + initialize(); + if(!PyArg_ParseTuple(args,"isiiiis", + &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; + + if(mhom == 1) + padcon_quaddobl_projective_transformation(); + else if(mhom > 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_quaddobl_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_standard_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_dobldobl_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_quaddobl_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_standard_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_dobldobl_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_quaddobl_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_standard_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_dobldobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_quaddobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_standard_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_dobldobl_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_dobldobl_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_quaddobl_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_quaddobl_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_get_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_standard_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_get_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_dobldobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_get_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_quaddobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_dobldobl_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_quaddobl_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_standard_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_dobldobl_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_quaddobl_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_standard_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_dobldobl_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_quaddobl_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_standard_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_clear_standard_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_standard_data(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_clear_dobldobl_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_dobldobl_data(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_clear_quaddobl_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_quaddobl_data(); + return Py_BuildValue("i",fail); +} + +/* The wrapping of functions with prototypes in syspool.h starts below. */ + +static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_standard_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_dobldobl_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_quaddobl_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_standard_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_dobldobl_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_quaddobl_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_standard_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_standard_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_dobldobl_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_quaddobl_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_standard_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_standard_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_dobldobl_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_dobldobl_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_quaddobl_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_quaddobl_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_standard_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_standard_clear(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_dobldobl_clear(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_quaddobl_clear(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_standard_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_dobldobl_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_quaddobl_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,deci,fixed; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&fixed,&deci)) return NULL; + fail = initialize_multprec_homotopy(fixed,deci); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_varbprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed,nctgt,ncstr; + char *tgt; + char *str; + + initialize(); + if(!PyArg_ParseTuple(args,"iisis",&fixed,&nctgt,&tgt,&ncstr,&str)) + return NULL; + fail = initialize_varbprec_homotopy(fixed,nctgt,tgt,ncstr,str); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_standard_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_dobldobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_quaddobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_multprec_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,nv,nc; + char *sol; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&nv,&nc,&sol)) return NULL; + fail = initialize_varbprec_solution(nv,nc,sol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_standard_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_dobldobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_quaddobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_multprec_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,want,mxpr,mxit,verb,nc; + char *sol; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&want,&mxpr,&mxit,&verb)) return NULL; + sol = next_varbprec_solution(want,mxpr,mxit,verb,&nc,&fail); + + return Py_BuildValue("(i,s)",fail,sol); +} + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_standard_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_varbprec_tracker(); + return Py_BuildValue("i",fail); +} + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in lib2path.h, starts here. */ + +// For the separate compilation of lib2path, extern declarations are needed. + +extern int standard_ade_newton ( int verbose ); +extern int standard_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int standard_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +extern int dobldobl_ade_newton ( int verbose ); +extern int dobldobl_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int dobldobl_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +extern int quaddobl_ade_newton ( int verbose ); +extern int quaddobl_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int quaddobl_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = standard_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = dobldobl_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = quaddobl_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = standard_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = dobldobl_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = quaddobl_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = standard_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = dobldobl_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = quaddobl_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +/* For the parameter tuning we need the default path parameters, + * provided by the lib2path function below, + * see lib2path.h for its specification. */ + +extern int get_default_path_parameters + ( int precision, int* max_step, int* n_predictor, + double* step_increase, double* step_decrease, + double* max_delta_t, double* max_delta_t_end, double* min_delta_t, + double* err_max_res, double* err_max_delta_x, double* err_max_first_delta_x, + int* max_it, double* err_min_round_off, + int* max_it_refine, double* err_min_round_off_refine ); + +static PyObject *py2c_get_default_path_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,precision,max_step,n_predictor,max_it,max_it_refine; + double step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&precision)) return NULL; + fail = get_default_path_parameters(precision,&max_step,&n_predictor, + &step_increase,&step_decrease,&max_delta_t,&max_delta_t_end,&min_delta_t, + &err_max_res,&err_max_delta_x,&err_max_first_delta_x, + &max_it,&err_min_round_off,&max_it_refine,&err_min_round_off_refine); + + return Py_BuildValue("(i,i,d,d,d,d,d,d,d,d,i,d,i,d)", + max_step,n_predictor,step_increase, + step_decrease,max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); +} + +// for separate compilation, extern declarations are needed, as below + +extern int standard_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +extern int dobldobl_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +extern int quaddobl_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = standard_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = dobldobl_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = quaddobl_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyMethodDef phcpy2c_methods[] = +{ + {"py2c_corecount", py2c_corecount, METH_VARARGS, + "Returns the number of cores available for multithreading."}, + {"py2c_PHCpack_version_string", py2c_PHCpack_version_string, METH_VARARGS, + "Returns the version string of PHCpack.\n The version string is 40 characters long."}, + {"py2c_set_seed", py2c_set_seed, METH_VARARGS, + "Takes the value of the integer given on input\n and sets the seed for the random number generators.\n This fixing of the seed enables reproducible runs." }, + {"py2c_get_seed", py2c_get_seed, METH_VARARGS, + "Returns the current value of the seed.\n Using this value in py2c_set_seed will ensure that the\n results of previous runs can be reproduced."}, + {"py2c_read_standard_target_system", py2c_read_standard_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_target_system_from_file", + py2c_read_standard_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_start_system", py2c_read_standard_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_start_system_from_file", + py2c_read_standard_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_target_system", py2c_read_dobldobl_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_target_system_from_file", + py2c_read_dobldobl_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_start_system", py2c_read_dobldobl_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_start_system_from_file", + py2c_read_dobldobl_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_target_system", py2c_read_quaddobl_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_target_system_from_file", + py2c_read_quaddobl_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_start_system", py2c_read_quaddobl_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_start_system_from_file", + py2c_read_quaddobl_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_define_output_file", py2c_define_output_file, METH_VARARGS, + "Prompts the user to define the output file.\n On return is the failure code, which is zero if all went well."}, + {"py2c_write_standard_target_system", + py2c_write_standard_target_system, METH_VARARGS, + "Writes the target system as stored in standard double precision\n to screen or to the defined output file."}, + {"py2c_write_dobldobl_target_system", + py2c_write_dobldobl_target_system, METH_VARARGS, + "Writes the target system as stored in double double precision\n to screen or to the defined output file."}, + {"py2c_write_quaddobl_target_system", + py2c_write_quaddobl_target_system, METH_VARARGS, + "Writes the target system as stored in quad double precision\n to screen or to the defined output file."}, + {"py2c_write_standard_start_system", + py2c_write_standard_start_system, METH_VARARGS, + "Writes the start system as stored in standard double precision\n to screen or to the defined output file."}, + {"py2c_write_dobldobl_start_system", + py2c_write_dobldobl_start_system, METH_VARARGS, + "Writes the start system as stored in double double precision\n to screen or to the defined output file."}, + {"py2c_write_quaddobl_start_system", + py2c_write_quaddobl_start_system, METH_VARARGS, + "Writes the start system as stored in quad double precision\n to screen or to the defined output file."}, + {"py2c_read_standard_start_Laurent_system", + py2c_read_standard_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_standard_start_Laurent_system", + py2c_write_standard_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in standard double precision."}, + {"py2c_read_standard_target_Laurent_system", + py2c_read_standard_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_standard_target_Laurent_system", + py2c_write_standard_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in standard double precision."}, + {"py2c_read_dobldobl_start_Laurent_system", + py2c_read_dobldobl_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_dobldobl_start_Laurent_system", + py2c_write_dobldobl_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in double double precision."}, + {"py2c_read_dobldobl_target_Laurent_system", + py2c_read_dobldobl_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_dobldobl_target_Laurent_system", + py2c_write_dobldobl_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in double double precision."}, + {"py2c_read_quaddobl_start_Laurent_system", + py2c_read_quaddobl_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_quaddobl_start_Laurent_system", + py2c_write_quaddobl_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in quad double precision."}, + {"py2c_read_quaddobl_target_Laurent_system", + py2c_read_quaddobl_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_quaddobl_target_Laurent_system", + py2c_write_quaddobl_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in quad double precision."}, + {"py2c_write_start_solutions", py2c_write_start_solutions, METH_VARARGS, + "Writes the start solutions in standard double precision either to\n the screen (standard output) or to the defined output file.\n On return is the failure code, which is zero if all is well."}, + {"py2c_copy_standard_target_system_to_container", + py2c_copy_standard_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in standard double precision."}, + {"py2c_copy_dobldobl_target_system_to_container", + py2c_copy_dobldobl_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in double double precision."}, + {"py2c_copy_quaddobl_target_system_to_container", + py2c_copy_quaddobl_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in quad double precision."}, + {"py2c_copy_multprec_target_system_to_container", + py2c_copy_multprec_target_system_to_container, METH_VARARGS, + "copies multiprecision target system to container"}, + {"py2c_copy_standard_container_to_target_system", + py2c_copy_standard_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in standard double precision to the target system."}, + {"py2c_copy_dobldobl_container_to_target_system", + py2c_copy_dobldobl_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in double double precision to the target system."}, + {"py2c_copy_quaddobl_container_to_target_system", + py2c_copy_quaddobl_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in quad double precision to the target system."}, + {"py2c_copy_multprec_container_to_target_system", + py2c_copy_multprec_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the target system."}, + {"py2c_copy_start_system_to_container", + py2c_copy_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in standard double precision."}, + {"py2c_copy_dobldobl_start_system_to_container", + py2c_copy_dobldobl_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in double double precision."}, + {"py2c_copy_quaddobl_start_system_to_container", + py2c_copy_quaddobl_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in quad double precision."}, + {"py2c_copy_multprec_start_system_to_container", + py2c_copy_multprec_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_start_system", + py2c_copy_standard_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in standard double precision to the start system."}, + {"py2c_copy_dobldobl_container_to_start_system", + py2c_copy_dobldobl_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in double double precision to the start system."}, + {"py2c_copy_quaddobl_container_to_start_system", + py2c_copy_quaddobl_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in quad double precision to the start system."}, + {"py2c_copy_multprec_container_to_start_system", + py2c_copy_multprec_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the start system."}, + {"py2c_copy_standard_Laurent_container_to_start_system", + py2c_copy_standard_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in standard double precision\n from the container to the start system."}, + {"py2c_copy_dobldobl_Laurent_container_to_start_system", + py2c_copy_dobldobl_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in double double precision\n from the container to the start system."}, + {"py2c_copy_quaddobl_Laurent_container_to_start_system", + py2c_copy_quaddobl_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in quad double precision\n from the container to the start system."}, + {"py2c_copy_standard_Laurent_container_to_target_system", + py2c_copy_standard_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in standard double precision\n from the container to the target system."}, + {"py2c_copy_dobldobl_Laurent_container_to_target_system", + py2c_copy_dobldobl_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in double double precision\n from the container to the target system."}, + {"py2c_copy_quaddobl_Laurent_container_to_target_system", + py2c_copy_quaddobl_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in quad double precision\n from the container to the target system."}, + {"py2c_copy_standard_Laurent_start_system_to_container", + py2c_copy_standard_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in standard double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_dobldobl_Laurent_start_system_to_container", + py2c_copy_dobldobl_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in double double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_quaddobl_Laurent_start_system_to_container", + py2c_copy_quaddobl_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in quad double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_standard_Laurent_target_system_to_container", + py2c_copy_standard_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in standard double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_dobldobl_Laurent_target_system_to_container", + py2c_copy_dobldobl_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in double double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_quaddobl_Laurent_target_system_to_container", + py2c_copy_quaddobl_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in quad double precision\n to the systems container for Laurent systems."}, + {"py2c_create_standard_homotopy", py2c_create_standard_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in standard double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_standard_homotopy_with_gamma", + py2c_create_standard_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in standard double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_dobldobl_homotopy", py2c_create_dobldobl_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in double double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_dobldobl_homotopy_with_gamma", + py2c_create_dobldobl_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in double double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_quaddobl_homotopy", py2c_create_quaddobl_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in quad double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_quaddobl_homotopy_with_gamma", + py2c_create_quaddobl_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in quad double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_multprec_homotopy", py2c_create_multprec_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in arbitrary multiprecision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_multprec_homotopy_with_gamma", + py2c_create_multprec_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in arbitrary multiprecision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_clear_standard_homotopy", py2c_clear_standard_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in standard double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_dobldobl_homotopy", py2c_clear_dobldobl_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in double double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_quaddobl_homotopy", py2c_clear_quaddobl_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in quad double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_multprec_homotopy", py2c_clear_multprec_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in arbitrary multiprecision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_tune_continuation_parameters", py2c_tune_continuation_parameters, + METH_VARARGS, + "Interactive procedure to tune the continuation parameters."}, + {"py2c_show_continuation_parameters", py2c_show_continuation_parameters, + METH_VARARGS, + "Shows the current values of the continuation parameters."}, + {"py2c_autotune_continuation_parameters", + py2c_autotune_continuation_parameters, METH_VARARGS, + "Tunes the values of the continuation parameters.\n On input are two integers:\n 1) the difficulty level of the solution paths; and\n 2) the number of decimal places in the precision."}, + {"py2c_get_value_of_continuation_parameter", + py2c_get_value_of_continuation_parameter, METH_VARARGS, + "Returns the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34.\n On return is a double with the value of the corresponding parameter."}, + {"py2c_set_value_of_continuation_parameter", + py2c_set_value_of_continuation_parameter, METH_VARARGS, + "Sets the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34;\n and the new value for the continuation parameter.\n On return is a double with the value of the corresponding parameter."}, + {"py2c_determine_output_during_continuation", + py2c_determine_output_during_continuation, METH_VARARGS, + "Interactive procedure to determine the level of output during the path tracking."}, + {"py2c_solve_by_standard_homotopy_continuation", + py2c_solve_by_standard_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in standard double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_dobldobl_homotopy_continuation", + py2c_solve_by_dobldobl_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in double double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_quaddobl_homotopy_continuation", + py2c_solve_by_quaddobl_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in quad double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_multprec_homotopy_continuation", + py2c_solve_by_multprec_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in arbitrary multiprecision.\n On input is one integer: the number of decimal places in the precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_standard_Laurent_homotopy_continuation", + py2c_solve_by_standard_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in standard double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_dobldobl_Laurent_homotopy_continuation", + py2c_solve_by_dobldobl_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in double double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_quaddobl_Laurent_homotopy_continuation", + py2c_solve_by_quaddobl_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in quad double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_clear_standard_operations_data", + py2c_clear_standard_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_standard_homotopy_continuation."}, + {"py2c_clear_dobldobl_operations_data", + py2c_clear_dobldobl_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_dobldobl_homotopy_continuation."}, + {"py2c_clear_quaddobl_operations_data", + py2c_clear_quaddobl_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_quaddobl_homotopy_continuation."}, + {"py2c_clear_standard_Laurent_data", + py2c_clear_standard_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in standard double precision."}, + {"py2c_clear_dobldobl_Laurent_data", + py2c_clear_dobldobl_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in double double precision."}, + {"py2c_clear_quaddobl_Laurent_data", + py2c_clear_quaddobl_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in quad double precision."}, + {"py2c_standard_crude_tracker", py2c_standard_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in standard double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in standard\n double precision have been initialized in the containers."}, + {"py2c_dobldobl_crude_tracker", py2c_dobldobl_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in double double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in double\n double precision have been initialized in the containers."}, + {"py2c_quaddobl_crude_tracker", py2c_quaddobl_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in quad double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in quad\n double precision have been initialized in the containers."}, + {"py2c_copy_standard_target_solutions_to_container", + py2c_copy_standard_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in standard double precision to the\n container for solutions in standard double precision."}, + {"py2c_copy_dobldobl_target_solutions_to_container", + py2c_copy_dobldobl_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in double double precision to the\n container for solutions in double double precision."}, + {"py2c_copy_quaddobl_target_solutions_to_container", + py2c_copy_quaddobl_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in quad double precision to the\n container for solutions in quad double precision."}, + {"py2c_copy_multprec_target_solutions_to_container", + py2c_copy_multprec_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_target_solutions", + py2c_copy_standard_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in standard double precision from the\n container to the target solutions in standard double precision."}, + {"py2c_copy_dobldobl_container_to_target_solutions", + py2c_copy_dobldobl_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in double double precision from the\n container to the target solutions in double double precision."}, + {"py2c_copy_quaddobl_container_to_target_solutions", + py2c_copy_quaddobl_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in quad double precision from the\n container to the target solutions in quad double precision."}, + {"py2c_copy_multprec_container_to_target_solutions", + py2c_copy_multprec_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in arbitrary multiprecision from the\n container to the target solutions in arbitrary multiprecision."}, + {"py2c_copy_start_solutions_to_container", + py2c_copy_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in standard double precision to the\n container for solutions in standard double precision."}, + {"py2c_copy_dobldobl_start_solutions_to_container", + py2c_copy_dobldobl_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in double double precision to the\n container for solutions in double double precision."}, + {"py2c_copy_quaddobl_start_solutions_to_container", + py2c_copy_quaddobl_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in quad double precision to the\n container for solutions in quad double precision."}, + {"py2c_copy_multprec_start_solutions_to_container", + py2c_copy_multprec_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_start_solutions", + py2c_copy_standard_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in standard double precision from the\n container to the start solutions in standard double precision."}, + {"py2c_copy_dobldobl_container_to_start_solutions", + py2c_copy_dobldobl_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in double double precision from the\n container to the start solutions in double double precision."}, + {"py2c_copy_quaddobl_container_to_start_solutions", + py2c_copy_quaddobl_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in quad double precision from the\n container to the start solutions in quad double precision."}, + {"py2c_copy_multprec_container_to_start_solutions", + py2c_copy_multprec_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in arbitrary multiprecision from the\n container to the start solutions in arbitrary multiprecision."}, + {"py2c_solve_standard_system", py2c_solve_standard_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard systems container."}, + {"py2c_scan_for_symbols", py2c_scan_for_symbols, METH_VARARGS, + "Given on input are two arguments: a number and a string.\n The string holds the string representation of a polynomial system,\n where each polynomial is terminated by a semi colon.\n The first argument on input is the number of characters in the string.\n On return is the number of symbols used as variables in the system.\n This function helps to determine whether a system is square or not."}, + {"py2c_solve_dobldobl_system", py2c_solve_dobldobl_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the dobldobl systems container."}, + {"py2c_solve_quaddobl_system", py2c_solve_quaddobl_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in quad double precision.\n Three integers are expected on input: 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level. \n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quaddobl systems container."}, + {"py2c_solve_standard_Laurent_system", + py2c_solve_standard_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in standard double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed, as when\n the system is genuinely Laurent with negative exponents; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard Laurent systems\n container."}, + {"py2c_solve_dobldobl_Laurent_system", + py2c_solve_dobldobl_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in double double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) 4) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the double double Laurent systems\n container."}, + {"py2c_solve_quaddobl_Laurent_system", + py2c_solve_quaddobl_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in quad double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quad double Laurent systems\n container."}, + {"py2c_set_gamma_constant", py2c_set_gamma_constant, METH_VARARGS, + "Stores the gamma constant for later retrieval.\n Four parameters are expected on input, two doubles and two integers.\n The two doubles are the real and imaginary parts of the gamma.\n The two integers are the precision, 1, 2, or 4, respectively for\n double, double double, or quad double; and the verbose level."}, + {"py2c_get_gamma_constant", py2c_get_gamma_constant, METH_VARARGS, + "Returns the gamma constant used by the solve functions.\n Two integer parameters are expected on input:\n (1) for the precision, 1, 2, or 4, respectively for double,\n double double, or quad double precision; and\n (2) the verbose level.\n The function returns a tuple of two doubles,\n for the real and imaginary part of the gamma constant."}, + {"py2c_mixed_volume", py2c_mixed_volume, METH_VARARGS, + "Computes the mixed volume, and the stable mixed volume as well if\n the input parameter equals 1. On return is the mixed volume, or\n a tuple with the mixed volume and the stable mixed volume.\n A regular mixed-cell configuration is in the cells container."}, + {"py2c_mixed_volume_by_demics", py2c_mixed_volume_by_demics, METH_VARARGS, + "Calls DEMiCs to compute the mixed volume of the system in the\n standard systems container. If the standard systems container\n is empty, then the system in the standard Laurent systems\n container is taken as input.\n The integer in mv on return equals the mixed volume.\n The regular mixed-cell configuration is in the cells container.\n The above is for the case if the input parameter equals 0.\n If the input parameter equals 1, then on return is a tuple,\n which contains the mixed volume and the stable mixed volume."}, + {"py2c_standard_deflate", py2c_standard_deflate, METH_VARARGS, + "Applies deflation in standard double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three floats:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_deflate", py2c_dobldobl_deflate, METH_VARARGS, + "Applies deflation in double double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three floats:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_deflate", py2c_quaddobl_deflate, METH_VARARGS, + "Applies deflation in quad double precision to the system and\n the solutions stored in the containers.\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_step", py2c_standard_Newton_step, METH_VARARGS, + "Applies one Newton step in standard double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_step", py2c_dobldobl_Newton_step, METH_VARARGS, + "Applies one Newton step in double double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_step", py2c_quaddobl_Newton_step, METH_VARARGS, + "Applies one Newton step in quad double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_multprec_Newton_step", py2c_multprec_Newton_step, METH_VARARGS, + "Applies one Newton step in arbitrary multiprecision to the system in\n the multprec systems container and to the solutions in the container.\n On input is an integer, the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_Laurent_step", py2c_standard_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in standard double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_Laurent_step", py2c_dobldobl_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in double double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_Laurent_step", py2c_quaddobl_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in quad double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_multprec_Newton_Laurent_step", py2c_multprec_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in arbitrary multiprecision to the Laurent\n system in the multprec Laurent systems container and to the solutions\n in the container.\n On input is an integer: the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_varbprec_Newton_Laurent_steps", py2c_varbprec_Newton_Laurent_steps, + METH_VARARGS, + "Applies Newton's method in variable precision.\n There are six input parameters:\n 1) the dimension: the number of variables and equations;\n 2) the accuracy, expressed as the correct number of decimal places;\n 3) the maximum number of iterations in Newton's method;\n 4) an upper bound on the number of decimal places in the precision;\n 5) a string, with the representation of the polynomials in the system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_condition_report", py2c_standard_condition_report, + METH_VARARGS, + "For the system and solutions in the containers in double precision,\n computes a condition report. On input are the following:\n 1) maximum number of Newton iterations per solution;\n 2) tolerance on the residual;\n 3) tolerance on the forward error;\n 4) tolerance on the inverse condition number for singularities;\n 5) a string with the name of the output file,\n this string may be empty if no output to file is needed;\n 6) a verbose flag, either 1 or 0.\n On return are the counts of number of solutions that are\n regular, singular, real, complex, clustered, or failures;\n along with the frequency tables for the forward errors,\n residuals and estimates for the inverse condition numbers."}, + {"py2c_usolve_standard", py2c_usolve_standard, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with standard double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the standard systems container. After the call of this function,\n the standard solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_dobldobl", py2c_usolve_dobldobl, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with double double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the dobldobl systems container. After the call of this function,\n the dobldobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_quaddobl", py2c_usolve_quaddobl, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with quad double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the quaddobl systems container. After the call of this function,\n the quaddobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_multprec", py2c_usolve_multprec, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with arbitrary multiprecision arithmetic.\n On input are three numbers:\n 1) the number of decimal places in the working precision;\n 2) the maximum number of iterations in the method of Weierstrass; and\n 3) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the multprec systems container. After the call of this function,\n the multprec solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_giftwrap_planar", py2c_giftwrap_planar, METH_VARARGS, + "Applies the giftwrapping algorithm to a planar point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n On return is the string representation of the vertex points,\n sorted so that each two consecutive points define an edge."}, + {"py2c_giftwrap_convex_hull", py2c_giftwrap_convex_hull, METH_VARARGS, + "Applies the giftwrapping algorithm to a point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n When the function returns, the internal data structures\n to store the convex hull are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_giftwrap_number_of_facets", py2c_giftwrap_number_of_facets, + METH_VARARGS, + "Returns the number of facets of the given dimension.\n On input is an integer, the dimension of the facet."}, + {"py2c_giftwrap_retrieve_facet", py2c_giftwrap_retrieve_facet, METH_VARARGS, + "Returns the string representation of a facet.\n On input are two integer numbers:\n 1) the dimension of the facet;\n 2) the index of the facet."}, + {"py2c_giftwrap_clear_3d_facets", py2c_giftwrap_clear_3d_facets, + METH_VARARGS, + "Deallocates list of facets of convex hull stored in 3-space."}, + {"py2c_giftwrap_clear_4d_facets", py2c_giftwrap_clear_4d_facets, + METH_VARARGS, + "Deallocates list of facets of convex hull stored in 4-space."}, + {"py2c_giftwrap_support_size", py2c_giftwrap_support_size, METH_VARARGS, + "Returns the number of characters in the string representation of\n the support of the k-th Laurent polynomial in the container, where k is given on input."}, + {"py2c_giftwrap_support_string", py2c_giftwrap_support_string, + METH_VARARGS, + "Returns the string representation of the support of a Laurent polynomial."}, + {"py2c_giftwrap_clear_support_string", py2c_giftwrap_clear_support_string, + METH_VARARGS, + "Deallocates the string representation of the support set\n that was stored internally by the call py2c_giftwrap_support_size."}, + {"py2c_giftwrap_initial_form", py2c_giftwrap_initial_form, METH_VARARGS, + "Replaces the system in the Laurent systems container by its initial form.\n There are three input parameters:\n 1) the dimension, number of coordinates in the inner normal;\n 2) the number of characters in the string representation for the normal;\n 3) the string representation of the inner normal.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_read_standard_system", + py2c_syscon_read_standard_system, METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in standard double precision.\n The system will be placed in the standard systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_standard_Laurent_system", + py2c_syscon_read_standard_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in standard double precision.\n The system will be placed in the standard Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_dobldobl_system", py2c_syscon_read_dobldobl_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in double double precision.\n The system will be placed in the dobldobl systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_dobldobl_Laurent_system", + py2c_syscon_read_dobldobl_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in double double precision.\n The system will be placed in the dobldobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_quaddobl_system", py2c_syscon_read_quaddobl_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in quad double precision.\n The system will be placed in the quaddobl systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_quaddobl_Laurent_system", + py2c_syscon_read_quaddobl_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in quad double precision.\n The system will be placed in the quaddobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_multprec_system", py2c_syscon_read_multprec_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in arbitrary multiprecision. The one input parameter is an integer,\n the number of decimal places in the working precision.\n The system will be placed in the multprec systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_multprec_Laurent_system", + py2c_syscon_read_multprec_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in arbitrary multiprecision. The one input parameter is\n an integer, the number of decimal places in the working precision.\n The system will be placed in the multprec Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_random_system", py2c_syscon_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in standard double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_dobldobl_random_system", + py2c_syscon_dobldobl_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in double double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_quaddobl_random_system", + py2c_syscon_quaddobl_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in quad double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_write_standard_system", + py2c_syscon_write_standard_system, METH_VARARGS, + "Writes the polynomial system with standard double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_standard_Laurent_system", + py2c_syscon_write_standard_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with standard double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_dobldobl_system", + py2c_syscon_write_dobldobl_system, METH_VARARGS, + "Writes the polynomial system with double double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_dobldobl_Laurent_system", + py2c_syscon_write_dobldobl_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with double double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_quaddobl_system", + py2c_syscon_write_quaddobl_system, METH_VARARGS, + "Writes the polynomial system with quad double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_quaddobl_Laurent_system", + py2c_syscon_write_quaddobl_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with quad double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_multprec_system", + py2c_syscon_write_multprec_system, METH_VARARGS, + "Writes the polynomial system with arbitrary multiprecision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_multprec_Laurent_system", + py2c_syscon_write_multprec_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with arbitrary multiprecision\n coefficients that is stored in the container."}, + {"py2c_syscon_clear_standard_system", + py2c_syscon_clear_standard_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in standard double precision."}, + {"py2c_syscon_clear_standard_Laurent_system", + py2c_syscon_clear_standard_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in standard double precision."}, + {"py2c_syscon_clear_dobldobl_system", + py2c_syscon_clear_dobldobl_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in double double precision."}, + {"py2c_syscon_clear_dobldobl_Laurent_system", + py2c_syscon_clear_dobldobl_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in double double precision."}, + {"py2c_syscon_clear_quaddobl_system", + py2c_syscon_clear_quaddobl_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in quad double precision."}, + {"py2c_syscon_clear_quaddobl_Laurent_system", + py2c_syscon_clear_quaddobl_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in quad double precision."}, + {"py2c_syscon_clear_multprec_system", + py2c_syscon_clear_multprec_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_syscon_clear_multprec_Laurent_system", + py2c_syscon_clear_multprec_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_syscon_number_of_symbols", + py2c_syscon_number_of_symbols, METH_VARARGS, + "Returns the number of symbols in the symbol table."}, + {"py2c_syscon_write_symbols", py2c_syscon_write_symbols, METH_VARARGS, + "Writes the symbols in the symbol table to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_syscon_string_of_symbols", + py2c_syscon_string_of_symbols, METH_VARARGS, + "Returns a string that contains the symbols in the symbol table.\n The symbols are separate from each other by one space."}, + {"py2c_syscon_remove_symbol_name", py2c_syscon_remove_symbol_name, + METH_VARARGS, + "Removes a symbol, given by name, from the symbol table.\n On input are two arguments:\n 1) an integer, as the number of characters in the name;\n 2) a string of characters with the name of the symbol.\n The failure code is returned, which equals zero when all went well."}, + {"py2c_syscon_clear_symbol_table", py2c_syscon_clear_symbol_table, + METH_VARARGS, "Clears the symbol table."}, + {"py2c_solcon_read_standard_solutions", + py2c_solcon_read_standard_solutions, METH_VARARGS, + "Interactive function to read the solutions into the container,\n in standard double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_dobldobl_solutions", py2c_solcon_read_dobldobl_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in double double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_quaddobl_solutions", py2c_solcon_read_quaddobl_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in quad double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_multprec_solutions", py2c_solcon_read_multprec_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in arbitrary multiprecision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_standard_solutions_from_file", + py2c_solcon_read_standard_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in standard double precision.\n Solutions are read from file and stored in the container for\n double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_read_dobldobl_solutions_from_file", + py2c_solcon_read_dobldobl_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in double double precision.\n Solutions are read from file and stored in the container for\n double double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_read_quaddobl_solutions_from_file", + py2c_solcon_read_quaddobl_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in quad double precision.\n Solutions are read from file and stored in the container for\n quad double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_write_standard_solutions", + py2c_solcon_write_standard_solutions, METH_VARARGS, + "Writes the solutions in standard double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_dobldobl_solutions", + py2c_solcon_write_dobldobl_solutions, METH_VARARGS, + "Writes the solutions in double double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_quaddobl_solutions", + py2c_solcon_write_quaddobl_solutions, METH_VARARGS, + "Writes the solutions in quad double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_multprec_solutions", + py2c_solcon_write_multprec_solutions, METH_VARARGS, + "Writes the solutions in arbitrary multiprecision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_standard_solutions", + py2c_solcon_clear_standard_solutions, METH_VARARGS, + "Deallocates the container for solutions in standard double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_dobldobl_solutions", + py2c_solcon_clear_dobldobl_solutions, METH_VARARGS, + "Deallocates the container for solutions in double double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_quaddobl_solutions", + py2c_solcon_clear_quaddobl_solutions, METH_VARARGS, + "Deallocates the container for solutions in quad double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_multprec_solutions", + py2c_solcon_clear_multprec_solutions, METH_VARARGS, + "Deallocates the container for solutions in arbitrary multiprecision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_open_solution_input_file", + py2c_solcon_open_solution_input_file, METH_VARARGS, + "Prompts the user for the name of the input file for the solutions and\n opens the input file. All subsequent reading happens from this input.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_syscon_number_of_standard_polynomials", + py2c_syscon_number_of_standard_polynomials, + METH_VARARGS, + "Returns the number of polynomials with coefficients in standard\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_dobldobl_polynomials", + py2c_syscon_number_of_dobldobl_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in double\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_quaddobl_polynomials", + py2c_syscon_number_of_quaddobl_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in quad\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_multprec_polynomials", + py2c_syscon_number_of_multprec_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in arbitrary\n multiprecision as stored in the systems container."}, + {"py2c_syscon_number_of_standard_Laurentials", + py2c_syscon_number_of_standard_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n standard double precision as stored in the systems container."}, + {"py2c_syscon_number_of_dobldobl_Laurentials", + py2c_syscon_number_of_dobldobl_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n double double precision as stored in the systems container."}, + {"py2c_syscon_number_of_quaddobl_Laurentials", + py2c_syscon_number_of_quaddobl_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n quad double precision as stored in the systems container."}, + {"py2c_syscon_number_of_multprec_Laurentials", + py2c_syscon_number_of_multprec_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n arbitrary multiprecision as stored in the systems container."}, + {"py2c_syscon_initialize_number_of_standard_polynomials", + py2c_syscon_initialize_number_of_standard_polynomials, METH_VARARGS, + "Initialzes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_dobldobl_polynomials", + py2c_syscon_initialize_number_of_dobldobl_polynomials, METH_VARARGS, + "Initialzes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_quaddobl_polynomials", + py2c_syscon_initialize_number_of_quaddobl_polynomials, METH_VARARGS, + "Initialzes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_multprec_polynomials", + py2c_syscon_initialize_number_of_multprec_polynomials, METH_VARARGS, + "Initialzes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_standard_Laurentials", + py2c_syscon_initialize_number_of_standard_Laurentials, METH_VARARGS, + "Initialzes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_dobldobl_Laurentials", + py2c_syscon_initialize_number_of_dobldobl_Laurentials, METH_VARARGS, + "Initialzes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_quaddobl_Laurentials", + py2c_syscon_initialize_number_of_quaddobl_Laurentials, METH_VARARGS, + "Initialzes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_multprec_Laurentials", + py2c_syscon_initialize_number_of_multprec_Laurentials, METH_VARARGS, + "Initialzes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_degree_of_standard_polynomial", + py2c_syscon_degree_of_standard_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in standard double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_dobldobl_polynomial", + py2c_syscon_degree_of_dobldobl_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in double double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_quaddobl_polynomial", + py2c_syscon_degree_of_quaddobl_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in quad double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_multprec_polynomial", + py2c_syscon_degree_of_multprec_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in arbitrary multiprecision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_number_of_terms", + py2c_syscon_number_of_terms, METH_VARARGS, + "Returns the number of terms in the k-th polynomial stored in the\n container for systems with coefficients in standard double precision.\n The input parameter k is the index of the polynomial k."}, + {"py2c_syscon_number_of_Laurent_terms", + py2c_syscon_number_of_Laurent_terms, METH_VARARGS, + "Returns the number of terms in the k-th Laurent polynomial stored\n in the container for Laurent polynomials systems with coefficients\n in standard double precision.\n The input parameter k is the index of the polynomial k."}, + {"py2c_syscon_retrieve_term", + py2c_syscon_retrieve_term, METH_VARARGS, + "Retrieves one term of a polynomial with coefficients in standard\n double precision, that is stored in the systems container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_store_standard_polynomial", + py2c_syscon_store_standard_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_Laurent_drop_variable_by_index", + py2c_syscon_standard_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_Laurent_drop_variable_by_name", + py2c_syscon_standard_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_Laurent_drop_variable_by_index", + py2c_syscon_dobldobl_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_Laurent_drop_variable_by_name", + py2c_syscon_dobldobl_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the double double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_Laurent_drop_variable_by_index", + py2c_syscon_quaddobl_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_Laurent_drop_variable_by_name", + py2c_syscon_quaddobl_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_one_homogenization", + py2c_syscon_standard_one_homogenization, METH_VARARGS, + "Replaces the system in the standard double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_dobldobl_one_homogenization", + py2c_syscon_dobldobl_one_homogenization, METH_VARARGS, + "Replaces the system in the double double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_quaddobl_one_homogenization", + py2c_syscon_quaddobl_one_homogenization, METH_VARARGS, + "Replaces the system in the quad double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_add_symbol", + py2c_syscon_add_symbol, METH_VARARGS, + "Adds a symbol to the table, with name given in the string,\n where the number of characters in the name equals the first\n integer argument. The second input parameter is the string.\n This symbol represents the last variable added in the homogeneous\n coordinate transformation."}, + {"py2c_syscon_standard_one_affinization", + py2c_syscon_standard_one_affinization, METH_VARARGS, + "Replaces the system in the standard double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_syscon_dobldobl_one_affinization", + py2c_syscon_dobldobl_one_affinization, METH_VARARGS, + "Replaces the system in the double double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_syscon_quaddobl_one_affinization", + py2c_syscon_quaddobl_one_affinization, METH_VARARGS, + "Replaces the system in the quad double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_tabform_store_standard_tableau", + py2c_tabform_store_standard_tableau, METH_VARARGS, + "On input is the tableau form of a polynomial system, given by\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of characters in the 4-th string input,\n 4) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 5) the number of characters in the 6-th string input,\n 6) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 7) the number of characters in the 7-th string input,\n 8) the exponents of all terms, given as a string,\n the string representation of a list of integers.\n The tableau form is parsed and the container for systems with\n standard double precision coefficients is initialized."}, + {"py2c_tabform_load_standard_tableau", + py2c_tabform_load_standard_tableau, METH_VARARGS, + "Returns a 5-tuple with the tableau form of the system with\n standard double precision coefficients in the container.\n The five items in the returned tuple are\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 4) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 5) the exponents of all terms, given as a string,\n the string representation of a list of integers."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_one_homogenization", + py2c_solcon_standard_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in standard double precision."}, + {"py2c_solcon_dobldobl_one_homogenization", + py2c_solcon_dobldobl_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, + {"py2c_solcon_quaddobl_one_homogenization", + py2c_solcon_quaddobl_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, + {"py2c_solcon_standard_one_affinization", + py2c_solcon_standard_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in standard double precision."}, + {"py2c_solcon_dobldobl_one_affinization", + py2c_solcon_dobldobl_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in double double precision."}, + {"py2c_solcon_quaddobl_one_affinization", + py2c_solcon_quaddobl_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in quad double precision."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_is_stable", py2c_celcon_is_stable, + METH_VARARGS, "returns 1 if stable mixed cells were stored, 0 otherwise"}, + {"py2c_celcon_number_of_original_cells", + py2c_celcon_number_of_original_cells, + METH_VARARGS, "returns the number of original cells in the cell container"}, + {"py2c_celcon_number_of_stable_cells", + py2c_celcon_number_of_stable_cells, + METH_VARARGS, "returns the number of stable cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_stable_standard_start_system", + py2c_celcon_solve_stable_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_solve_stable_dobldobl_start_system", + py2c_celcon_solve_stable_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_solve_stable_quaddobl_start_system", + py2c_celcon_solve_stable_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_intcelcon_read_mixed_cell_configuration", + py2c_intcelcon_read_mixed_cell_configuration, METH_VARARGS, + "Reads a mixed-cell configuration"}, + {"py2c_intcelcon_write_mixed_cell_configuration", + py2c_intcelcon_write_mixed_cell_configuration, METH_VARARGS, + "Writes the mixed-cell configuration to screen."}, + {"py2c_intcelcon_number_of_cells", + py2c_intcelcon_number_of_cells, METH_VARARGS, + "Returns the number of cells in the mixed subdivision by integer lifting."}, + {"py2c_intcelcon_type_of_mixture", + py2c_intcelcon_type_of_mixture, METH_VARARGS, + "Returns the type of mixture for the integer cells container."}, + {"py2c_intcelcon_length_of_supports", + py2c_intcelcon_length_of_supports, METH_VARARGS, + "Returns the string representation of a list of lengths of each support."}, + {"py2c_intcelcon_append_lifted_point", + py2c_intcelcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_intcelcon_get_lifted_point", + py2c_intcelcon_get_lifted_point, METH_VARARGS, + "Returns the string representation of the coordinates of a lifted point."}, + {"py2c_intcelcon_get_inner_normal", + py2c_intcelcon_get_inner_normal, METH_VARARGS, + "Given on input the dimension of the lifted points and the\n index of the mixed cell of interest, returns the string\n representation of the inner normal of the mixed cell."}, + {"py2c_intcelcon_number_of_points_in_cell", + py2c_intcelcon_number_of_points_in_cell, METH_VARARGS, + "Given are two integer numbers: the index to a cell\n (starting the count at one) and the number of different supports.\n On return is the string representation of the number of points\n which span each component of the mixed cell."}, + {"py2c_intcelcon_get_point_in_cell", + py2c_intcelcon_get_point_in_cell, METH_VARARGS, + "Returns the string representation of the n coordinates of\n the k-th point from the j-th list of the i-th cell.\n On input are the four integers: n, i, j, k, respectively\n the length of the lifted vectors in the supports,\n the index to a cell in the container,\n the index to a support of the i-th cell, and\n the index to a point in the j-th support of the i-th cell."}, + {"py2c_intcelcon_mixed_volume", + py2c_intcelcon_mixed_volume, METH_VARARGS, + "Returns the mixed volume of a mixed cell."}, + {"py2c_intcelcon_initialize_supports", + py2c_intcelcon_initialize_supports, METH_VARARGS, + "Initializes the supports with an integer valued lifting."}, + {"py2c_intcelcon_set_type_of_mixture", + py2c_intcelcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the tuple of supports."}, + {"py2c_intcelcon_make_subdivision", + py2c_intcelcon_make_subdivision, METH_VARARGS, + "Computes the cells in the regular subdivision induced by an integer\n valued lifting function."}, + {"py2c_intcelcon_clear_mixed_cell_configuration", + py2c_intcelcon_clear_mixed_cell_configuration, METH_VARARGS, + "Deallocates the data in the integer cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_linear_reduce_standard_system", + py2c_linear_reduce_standard_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for standard double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_linear_reduce_dobldobl_system", + py2c_linear_reduce_dobldobl_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for double double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_linear_reduce_quaddobl_system", + py2c_linear_reduce_quaddobl_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for quad double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_nonlinear_reduce_standard_system", + py2c_nonlinear_reduce_standard_system, METH_VARARGS, + "Applies nonlinear reduction on the system in the container\n for standard double precision.\n Three integer numbers are expected on input:\n (1) the maximum number of equal degree replacements,\n (2) the maximum number of computed S-polynomials,\n (3) the maximum number of computed R-polynomials.\n The system in the standard container is replace by the reduced system.\n Three numbers are returned:\n (1) the number of equal degree replacements,\n (2) the number of computed S-polynomials,\n (3) the number of computed R-polynomials."}, + {"py2c_sweep_define_parameters_numerically", + py2c_sweep_define_parameters_numerically, METH_VARARGS, + "Defines the indices to the variables that serve as parameters\n numerically, that is: via integer indices.\n On entry are three integer numbers and a string.\n The string is a string representation of a Python list of integers,\n The three integers are the number of equations, the number of variables,\n and the number of parameters. The number of variables m includes the\n number of parameters. Then there should be as many as m indices in\n the list of integers to define which of the variables are parameters."}, + {"py2c_sweep_define_parameters_symbolically", + py2c_sweep_define_parameters_symbolically, METH_VARARGS, + "Defines the indices to the variables that serve as parameters\n symbolically, that is, as names of variables.\n For this to work, the symbol table must be initialized.\n On entry are four integer numbers and a string.\n The four integers are the number of equations, the number of variables,\n the number of parameters (the number of variables m includes the\n number of parameters), and the number of characters in the string.\n The string contains the names of the parameters, separated by one comma.\n For this to work, the symbol table must be initialized, e.g.:\n via the reading of a polynomial system."}, + {"py2c_sweep_get_number_of_equations", + py2c_sweep_get_number_of_equations, METH_VARARGS, + "Returns the number of equations in the sweep homotopy."}, + {"py2c_sweep_get_number_of_variables", + py2c_sweep_get_number_of_variables, METH_VARARGS, + "Returns the number of variables in the sweep homotopy."}, + {"py2c_sweep_get_number_of_parameters", + py2c_sweep_get_number_of_parameters, METH_VARARGS, + "Returns the number of parameters in the sweep homotopy."}, + {"py2c_sweep_get_indices_numerically", + py2c_sweep_get_indices_numerically, METH_VARARGS, + "Returns the indices of the variables that are parameters,\n as the string representation of a Python list of integers."}, + {"py2c_sweep_get_indices_symbolically", + py2c_sweep_get_indices_symbolically, METH_VARARGS, + "Returns a string with the names of the parameters,\n each separated by one space."}, + {"py2c_sweep_clear_definitions", + py2c_sweep_clear_definitions, METH_VARARGS, + "Clears the definitions in the sweep homotopy."}, + {"py2c_sweep_set_standard_start", + py2c_sweep_set_standard_start, METH_VARARGS, + "Sets the start values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters.\n The doubles are given in a string representation of a Python\n list of doubles."}, + {"py2c_sweep_set_standard_target", + py2c_sweep_set_standard_target, METH_VARARGS, + "Sets the target values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_set_dobldobl_start", + py2c_sweep_set_dobldobl_start, METH_VARARGS, + "Sets the start values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, + {"py2c_sweep_set_dobldobl_target", + py2c_sweep_set_dobldobl_target, METH_VARARGS, + "Sets the target values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_set_quaddobl_start", + py2c_sweep_set_quaddobl_start, METH_VARARGS, + "Sets the start values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, + {"py2c_sweep_set_quaddobl_target", + py2c_sweep_set_quaddobl_target, METH_VARARGS, + "Sets the target values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_get_standard_start", + py2c_sweep_get_standard_start, METH_VARARGS, + "Gets the start values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_standard_target", + py2c_sweep_get_standard_target, METH_VARARGS, + "Gets the target values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_dobldobl_start", + py2c_sweep_get_dobldobl_start, METH_VARARGS, + "Gets the start values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_dobldobl_target", + py2c_sweep_get_dobldobl_target, METH_VARARGS, + "Gets the target values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_quaddobl_start", + py2c_sweep_get_quaddobl_start, METH_VARARGS, + "Gets the start values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_quaddobl_target", + py2c_sweep_get_quaddobl_target, METH_VARARGS, + "Returns the target values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_standard_complex_run", + py2c_sweep_standard_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in standard double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in standard double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_dobldobl_complex_run", + py2c_sweep_dobldobl_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in double double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in double double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_quaddobl_complex_run", + py2c_sweep_quaddobl_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in quad double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in quad double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_standard_real_run", + py2c_sweep_standard_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in standard double\n precision and the corresponding start solutions in the standard solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_sweep_dobldobl_real_run", + py2c_sweep_dobldobl_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in double double\n precision and the corresponding start solutions in the dobldobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_sweep_quaddobl_real_run", + py2c_sweep_quaddobl_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in quad double\n precision and the corresponding start solutions in the quaddobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_standard_multiplicity_structure", + py2c_standard_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in standard double precision.\n Required is the presence of a polynomial system in the standard\n systems container and a solution in the standard solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_dobldobl_multiplicity_structure", + py2c_dobldobl_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in double double precision.\n Required is the presence of a polynomial system in the dobldobl\n systems container and a solution in the dobldobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_quaddobl_multiplicity_structure", + py2c_quaddobl_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in quad double precision.\n Required is the presence of a polynomial system in the quaddobl\n systems container and a solution in the quaddobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_numbtrop_standard_initialize", + py2c_numbtrop_standard_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in standard double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_dobldobl_initialize", + py2c_numbtrop_dobldobl_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in double double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_quaddobl_initialize", + py2c_numbtrop_quaddobl_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in quad double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_standard_retrieve", + py2c_numbtrop_standard_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in standard double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_dobldobl_retrieve", + py2c_numbtrop_dobldobl_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in double double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_quaddobl_retrieve", + py2c_numbtrop_quaddobl_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in quad double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_standard_size", py2c_numbtrop_standard_size, METH_VARARGS, + "Returns the number of tropisms, stored in standard double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_dobldobl_size", py2c_numbtrop_dobldobl_size, METH_VARARGS, + "Returns the number of tropisms, stored in double double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_quaddobl_size", py2c_numbtrop_quaddobl_size, METH_VARARGS, + "Returns the number of tropisms, stored in quad double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_standard_dimension", + py2c_numbtrop_standard_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in standard double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_dobldobl_dimension", + py2c_numbtrop_dobldobl_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in double double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_quaddobl_dimension", + py2c_numbtrop_quaddobl_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in quad double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_store_standard_tropism", + py2c_numbtrop_store_standard_tropism, METH_VARARGS, + "Stores a tropism given in standard double precision.\n The first three input parmeters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by standard_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are given in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_store_dobldobl_tropism", + py2c_numbtrop_store_dobldobl_tropism, METH_VARARGS, + "Stores a tropism given in double double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by dobldobl_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are given in one string,\n the string representatin of a list of doubles."}, + {"py2c_numbtrop_store_quaddobl_tropism", + py2c_numbtrop_store_quaddobl_tropism, METH_VARARGS, + "Stores a tropism given in quad double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by quaddobl_size;\n The other input parameters are of type double:\n wnd : estimated winding number;\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four double\n All 4*dim+4 doubles are given in one string,\n the string representatin of a list of doubles."}, + {"py2c_numbtrop_standard_retrieve_tropism", + py2c_numbtrop_standard_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in standard double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_standard_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_dobldobl_retrieve_tropism", + py2c_numbtrop_dobldobl_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in double double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_dobldobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_quaddobl_retrieve_tropism", + py2c_numbtrop_quaddobl_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in quad double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_quaddobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four doubles.\n All 4*dim+4 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_standard_clear", py2c_numbtrop_standard_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in standard double precision."}, + {"py2c_numbtrop_dobldobl_clear", py2c_numbtrop_dobldobl_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in double double precision."}, + {"py2c_numbtrop_quaddobl_clear", py2c_numbtrop_quaddobl_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in quad double precision."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system in the container with its embedding of dimension d.\n The dimension d is given as the first integer parameter on input.\n The second integer parameter indicates the precision, either 0, 1, or 2,\n respectively for double, double double, or quad double precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_standard_system", py2c_embed_standard_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_dobldobl_system", py2c_embed_dobldobl_system, METH_VARARGS, + "Replaces the system with coefficients in double double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_quaddobl_system", py2c_embed_quaddobl_system, METH_VARARGS, + "Replaces the system with coefficients in quad double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_standard_Laurent_system", + py2c_embed_standard_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in standard double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_dobldobl_Laurent_system", + py2c_embed_dobldobl_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in double double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_quaddobl_Laurent_system", + py2c_embed_quaddobl_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in quad double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_swap_symbols_for_standard_witness_set", + py2c_swap_symbols_for_standard_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_dobldobl_witness_set", + py2c_swap_symbols_for_dobldobl_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_quaddobl_witness_set", + py2c_swap_symbols_for_quaddobl_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_standard_Laurent_witness_set", + py2c_swap_symbols_for_standard_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_dobldobl_Laurent_witness_set", + py2c_swap_symbols_for_dobldobl_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_quaddobl_Laurent_witness_set", + py2c_swap_symbols_for_quaddobl_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Laurent_cascade_homotopy", + py2c_standard_Laurent_cascade_homotopy, METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Laurent_cascade_homotopy", + py2c_dobldobl_Laurent_cascade_homotopy, METH_VARARGS, + " Creates a homotopy in double double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Laurent_cascade_homotopy", + py2c_quaddobl_Laurent_cascade_homotopy, METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_standard_to_mute", + py2c_factor_set_standard_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in standard double\n precision to silent."}, + {"py2c_factor_set_dobldobl_to_mute", + py2c_factor_set_dobldobl_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in double double\n precision to silent."}, + {"py2c_factor_set_quaddobl_to_mute", + py2c_factor_set_quaddobl_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in quad double\n precision to silent."}, + {"py2c_factor_set_standard_to_verbose", + py2c_factor_set_standard_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in standard double\n precision to verbose."}, + {"py2c_factor_set_dobldobl_to_verbose", + py2c_factor_set_dobldobl_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in double double\n precision to verbose."}, + {"py2c_factor_set_quaddobl_to_verbose", + py2c_factor_set_quaddobl_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in quad double\n precision to verbose."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_standard_assign_labels", + py2c_factor_standard_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_dobldobl_assign_labels", + py2c_factor_dobldobl_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in double double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_quaddobl_assign_labels", + py2c_factor_quaddobl_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in quad double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_standard_sampler", + py2c_factor_initialize_standard_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in standard double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_dobldobl_sampler", + py2c_factor_initialize_dobldobl_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in double double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_quaddobl_sampler", + py2c_factor_initialize_quaddobl_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in quad double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_standard_Laurent_sampler", + py2c_factor_initialize_standard_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in standard double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_dobldobl_Laurent_sampler", + py2c_factor_initialize_dobldobl_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in double double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_quaddobl_Laurent_sampler", + py2c_factor_initialize_quaddobl_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in quad double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_standard_monodromy", + py2c_factor_initialize_standard_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in standard double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_initialize_dobldobl_monodromy", + py2c_factor_initialize_dobldobl_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in double double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_initialize_quaddobl_monodromy", + py2c_factor_initialize_quaddobl_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in quad double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_standard_trace_grid_diagnostics", + py2c_factor_standard_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in standard double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_dobldobl_trace_grid_diagnostics", + py2c_factor_dobldobl_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in double double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_quaddobl_trace_grid_diagnostics", + py2c_factor_quaddobl_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in quad double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_store_standard_solutions", + py2c_factor_store_standard_solutions, METH_VARARGS, + "Stores the solutions in the container, in standard double precision,\n to the data for monodromy loops."}, + {"py2c_factor_store_dobldobl_solutions", + py2c_factor_store_dobldobl_solutions, METH_VARARGS, + "Stores the solutions in the container, in double double precision,\n to the data for monodromy loops."}, + {"py2c_factor_store_quaddobl_solutions", + py2c_factor_store_quaddobl_solutions, METH_VARARGS, + "Stores the solutions in the container, in quad double precision,\n to the data for monodromy loops."}, + {"py2c_factor_restore_standard_solutions", + py2c_factor_restore_standard_solutions, METH_VARARGS, + "Restores the first initialized solutions, in standard double precision,\n from sampler to the container."}, + {"py2c_factor_restore_dobldobl_solutions", + py2c_factor_restore_dobldobl_solutions, METH_VARARGS, + "Restores the first initialized solutions, in double double precision,\n from sampler to the container."}, + {"py2c_factor_restore_quaddobl_solutions", + py2c_factor_restore_quaddobl_solutions, METH_VARARGS, + "Restores the first initialized solutions, in quad double precision,\n from sampler to the container."}, + {"py2c_factor_standard_track_paths", + py2c_factor_standard_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in standard double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_dobldobl_track_paths", + py2c_factor_dobldobl_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in double double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_quaddobl_track_paths", + py2c_factor_quaddobl_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in quad double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_standard_slices", + py2c_factor_swap_standard_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in standard double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_dobldobl_slices", + py2c_factor_swap_dobldobl_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in double double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_quaddobl_slices", + py2c_factor_swap_quaddobl_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in quad double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_standard_slices", + py2c_factor_new_standard_slices, METH_VARARGS, + "Generates k random slides in n-space, in standard double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_dobldobl_slices", + py2c_factor_new_dobldobl_slices, METH_VARARGS, + "Generates k random slides in n-space, in double double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_quaddobl_slices", + py2c_factor_new_quaddobl_slices, METH_VARARGS, + "Generates k random slides in n-space, in quad double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_standard_trace_slice", + py2c_factor_set_standard_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in standard double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_set_dobldobl_trace_slice", + py2c_factor_set_dobldobl_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in double double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_set_quaddobl_trace_slice", + py2c_factor_set_quaddobl_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in quad double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_standard_gammas", + py2c_factor_store_standard_gammas, METH_VARARGS, + "Stores the gamma constants in standard double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_dobldobl_gammas", + py2c_factor_store_dobldobl_gammas, METH_VARARGS, + "Stores the gamma constants in double double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_quaddobl_gammas", + py2c_factor_store_quaddobl_gammas, METH_VARARGS, + "Stores the gamma constants in quad double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_standard_loop", + py2c_factor_permutation_after_standard_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in standard double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_permutation_after_dobldobl_loop", + py2c_factor_permutation_after_dobldobl_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in double double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_permutation_after_quaddobl_loop", + py2c_factor_permutation_after_quaddobl_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in quad double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_standard_decomposition", + py2c_factor_update_standard_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in standard double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_update_dobldobl_decomposition", + py2c_factor_update_dobldobl_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in double double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_update_quaddobl_decomposition", + py2c_factor_update_quaddobl_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in quad double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_standard_components", + py2c_factor_number_of_standard_components, METH_VARARGS, + "Returns the number of irreducible factors in the current standard double\n precision decomposition of the witness set."}, + {"py2c_factor_number_of_dobldobl_components", + py2c_factor_number_of_dobldobl_components, METH_VARARGS, + "Returns the number of irreducible factors in the current double double\n precision decomposition of the witness set."}, + {"py2c_factor_number_of_quaddobl_components", + py2c_factor_number_of_quaddobl_components, METH_VARARGS, + "Returns the number of irreducible factors in the current quad double\n precision decomposition of the witness set."}, + {"py2c_factor_witness_points_of_standard_component", + py2c_factor_witness_points_of_standard_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in standard double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_witness_points_of_dobldobl_component", + py2c_factor_witness_points_of_dobldobl_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in double double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_witness_points_of_quaddobl_component", + py2c_factor_witness_points_of_quaddobl_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in quad double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_standard_trace_sum_difference", + py2c_factor_standard_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in standard double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_factor_dobldobl_trace_sum_difference", + py2c_factor_dobldobl_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in double double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_factor_quaddobl_trace_sum_difference", + py2c_factor_quaddobl_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in quad double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witset_standard_membertest", + py2c_witset_standard_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_membertest", + py2c_witset_dobldobl_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_membertest", + py2c_witset_quaddobl_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_Laurent_membertest", + py2c_witset_standard_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_Laurent_membertest", + py2c_witset_dobldobl_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_Laurent_membertest", + py2c_witset_quaddobl_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_ismember", + py2c_witset_standard_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_ismember", + py2c_witset_dobldobl_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_ismember", + py2c_witset_quaddobl_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_Laurent_ismember", + py2c_witset_standard_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_Laurent_ismember", + py2c_witset_dobldobl_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_Laurent_ismember", + py2c_witset_quaddobl_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_standard_witset_of_hypersurface", + py2c_standard_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_witset_of_hypersurface", + py2c_dobldobl_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_witset_of_hypersurface", + py2c_quaddobl_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_witset_of_Laurent_hypersurface", + py2c_standard_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_witset_of_Laurent_hypersurface", + py2c_dobldobl_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_witset_of_Laurent_hypersurface", + py2c_quaddobl_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_diagonal_homotopy", py2c_standard_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in standard double precision, define the witness sets for\n these two solution sets."}, + {"py2c_dobldobl_diagonal_homotopy", py2c_dobldobl_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in double double precision, define the witness sets for\n these two solution sets."}, + {"py2c_quaddobl_diagonal_homotopy", py2c_quaddobl_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in quad double precision, define the witness sets for\n these two solution sets."}, + {"py2c_standard_diagonal_cascade_solutions", + py2c_standard_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in standard double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_dobldobl_diagonal_cascade_solutions", + py2c_dobldobl_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in double double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_quaddobl_diagonal_cascade_solutions", + py2c_quaddobl_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in quad double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_diagonal_symbols_doubler", + py2c_diagonal_symbols_doubler, METH_VARARGS, + "Doubles the number of symbols in the symbol table to enable the\n writing of the target system to string properly when starting the\n cascade of a diagonal homotopy in extrinsic coordinates.\n On input are three integers, n, d, nc, and one string s.\n On input are n, the ambient dimension = #variables before the embedding,\n d is the number of slack variables, or the dimension of the first set,\n and in s (nc characters) are the symbols for the first witness set.\n This function takes the symbols in s and combines those symbols with\n those in the current symbol table for the second witness set stored\n in the standard systems container. On return, the symbol table\n contains then all symbols to write the top system in the cascade\n to start the diagonal homotopy."}, + {"py2c_standard_collapse_diagonal", + py2c_standard_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for standard doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_collapse_diagonal", + py2c_dobldobl_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for double doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_collapse_diagonal", + py2c_quaddobl_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for quad doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_polysys_solve", + py2c_standard_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_standard_laursys_solve", + py2c_standard_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_dobldobl_polysys_solve", + py2c_dobldobl_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_dobldobl_laursys_solve", + py2c_dobldobl_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_quaddobl_polysys_solve", + py2c_quaddobl_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_quaddobl_laursys_solve", + py2c_quaddobl_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_copy_standard_polysys_witset", + py2c_copy_standard_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_standard_laursys_witset", + py2c_copy_standard_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_dobldobl_polysys_witset", + py2c_copy_dobldobl_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_dobldobl_laursys_witset", + py2c_copy_dobldobl_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_quaddobl_polysys_witset", + py2c_copy_quaddobl_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_quaddobl_laursys_witset", + py2c_copy_quaddobl_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_clear_standard_witsols", + py2c_clear_standard_witsols, METH_VARARGS, + "Clears the witness solutions in standard double precision."}, + {"py2c_clear_dobldobl_witsols", + py2c_clear_dobldobl_witsols, METH_VARARGS, + "Clears the witness solutions in double double precision."}, + {"py2c_clear_quaddobl_witsols", + py2c_clear_quaddobl_witsols, METH_VARARGS, + "Clears the witness solutions in quad double precision."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_standard_littlewood_richardson_homotopies", + py2c_schubert_standard_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in standard double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_dobldobl_littlewood_richardson_homotopies", + py2c_schubert_dobldobl_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in double double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in double double precision and the\n corresponding solutions are in the dobldobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_quaddobl_littlewood_richardson_homotopies", + py2c_schubert_quaddobl_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in quad double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in quad double precision and the\n corresponding solutions are in the quaddobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_standard_Newton_series", py2c_standard_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the standard systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_series", py2c_dobldobl_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the dobldobl systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_series", py2c_quaddobl_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the quaddobl systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_power_series", + py2c_standard_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the standard systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the standard systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_power_series", + py2c_dobldobl_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the dobldobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are stored in the dobldobl systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_power_series", + py2c_quaddobl_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the quaddobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The solution series are store in the quaddobl systems pool.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Pade_approximant", + py2c_standard_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the standard systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Pade_approximant", + py2c_dobldobl_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in double double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the dobldobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Pade_approximant", + py2c_quaddobl_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in quad double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the quaddobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_padcon_set_default_parameters", + py2c_padcon_set_default_parameters, METH_VARARGS, + "Sets the default values of the homotopy continuation parameters."}, + {"py2c_padcon_clear_parameters", + py2c_padcon_clear_parameters, METH_VARARGS, + "Deallocates the allocated space for the parameters."}, + {"py2c_padcon_get_homotopy_continuation_parameter", + py2c_padcon_get_homotopy_continuation_parameter, METH_VARARGS, + "Returns the value of the k-th continuation parameter,\n if k ranges between 1 and 13. The integer k is given on entry."}, + {"py2c_padcon_set_homotopy_continuation_gamma", + py2c_padcon_set_homotopy_continuation_gamma, METH_VARARGS, + "The gamma constant is the first homotopy continuation parameter.\n The gamma is a complex number and it should be given as two\n doubles, as its real and imaginary part respectively."}, + {"py2c_padcon_set_homotopy_continuation_parameter", + py2c_padcon_set_homotopy_continuation_parameter, METH_VARARGS, + "Sets the value of the k-th continuation parameter to the given value.\n The first parameter k is an integer number between 2 and 13.\n The second parameter is the value of the k-th parameter,\n parsed as a floating point number."}, + {"py2c_padcon_standard_track", + py2c_padcon_standard_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in standard double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_dobldobl_track", + py2c_padcon_dobldobl_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in double double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_quaddobl_track", + py2c_padcon_quaddobl_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in quad double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_standard_initialize_homotopy", + py2c_padcon_standard_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in standard double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_initialize_homotopy", + py2c_padcon_dobldobl_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in double double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_initialize_homotopy", + py2c_padcon_quaddobl_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in quad double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_initialize_parameter_homotopy", + py2c_padcon_standard_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n standard double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_initialize_parameter_homotopy", + py2c_padcon_dobldobl_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n double double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_initialize_parameter_homotopy", + py2c_padcon_quaddobl_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n quad double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_standard_solution", + py2c_padcon_initialize_standard_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n standard double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_dobldobl_solution", + py2c_padcon_initialize_dobldobl_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n double double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_quaddobl_solution", + py2c_padcon_initialize_quaddobl_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n quad double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_predict_correct", + py2c_padcon_standard_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in standard double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_predict_correct", + py2c_padcon_dobldobl_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in double double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_predict_correct", + py2c_padcon_quaddobl_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in quad double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_standard_solution", + py2c_padcon_get_standard_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in standard double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_dobldobl_solution", + py2c_padcon_get_dobldobl_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in double double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_quaddobl_solution", + py2c_padcon_get_quaddobl_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in quad double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_pole_radius", + py2c_padcon_standard_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in standard double precision."}, + {"py2c_padcon_dobldobl_pole_radius", + py2c_padcon_dobldobl_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in double double precision.\n The returned number is the high part of the double double number."}, + {"py2c_padcon_quaddobl_pole_radius", + py2c_padcon_quaddobl_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in quad double precision.\n The returned number is the highest part of the quad double number."}, + {"py2c_padcon_standard_closest_pole", + py2c_padcon_standard_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in standard double precision.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_dobldobl_closest_pole", + py2c_padcon_dobldobl_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in double double precision.\n The returned numbers are the high parts of the double doubles.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_quaddobl_closest_pole", + py2c_padcon_quaddobl_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in quad double precision.\n The returned numbers are the highest parts of the quad doubles.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_standard_t_value", + py2c_padcon_standard_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in standard double precision."}, + {"py2c_padcon_dobldobl_t_value", + py2c_padcon_dobldobl_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in double double precision."}, + {"py2c_padcon_quaddobl_t_value", + py2c_padcon_quaddobl_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in quad double precision."}, + {"py2c_padcon_standard_step_size", + py2c_padcon_standard_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in standard double precision."}, + {"py2c_padcon_dobldobl_step_size", + py2c_padcon_dobldobl_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in double double precision."}, + {"py2c_padcon_quaddobl_step_size", + py2c_padcon_quaddobl_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in quad double precision."}, + {"py2c_padcon_standard_series_step", + py2c_padcon_standard_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_series_step", + py2c_padcon_dobldobl_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_series_step", + py2c_padcon_quaddobl_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_pole_step", + py2c_padcon_standard_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_pole_step", + py2c_padcon_dobldobl_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_pole_step", + py2c_padcon_quaddobl_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_estimated_distance", + py2c_padcon_standard_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_estimated_distance", + py2c_padcon_dobldobl_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_estimated_distance", + py2c_padcon_quaddobl_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_hessian_step", + py2c_padcon_standard_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_hessian_step", + py2c_padcon_dobldobl_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_hessian_step", + py2c_padcon_quaddobl_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_series_coefficient", + py2c_padcon_standard_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx,\n of the series computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_series_coefficient", + py2c_padcon_dobldobl_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_series_coefficient", + py2c_padcon_quaddobl_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_numerator_coefficient", + py2c_padcon_standard_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_numerator_coefficient", + py2c_padcon_dobldobl_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_numerator_coefficient", + py2c_padcon_quaddobl_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_denominator_coefficient", + py2c_padcon_standard_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_denominator_coefficient", + py2c_padcon_dobldobl_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_denominator_coefficient", + py2c_padcon_quaddobl_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_pole", py2c_padcon_standard_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_pole", py2c_padcon_dobldobl_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the double doubles."}, + {"py2c_padcon_quaddobl_pole", py2c_padcon_quaddobl_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in quad double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the quad doubles."}, + {"py2c_padcon_clear_standard_data", + py2c_padcon_clear_standard_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in double precision."}, + {"py2c_padcon_clear_dobldobl_data", + py2c_padcon_clear_dobldobl_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in double double precision."}, + {"py2c_padcon_clear_quaddobl_data", + py2c_padcon_clear_quaddobl_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in quad double precision."}, + {"py2c_syspool_standard_init", py2c_syspool_standard_init, METH_VARARGS, + "Initializes the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_init", py2c_syspool_dobldobl_init, METH_VARARGS, + "Initializes the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_init", py2c_syspool_quaddobl_init, METH_VARARGS, + "Initializes the pool for systems in quad double precision."}, + {"py2c_syspool_standard_size", py2c_syspool_standard_size, METH_VARARGS, + "Returns the size of the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_size", py2c_syspool_dobldobl_size, METH_VARARGS, + "Returns the size of the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_size", py2c_syspool_quaddobl_size, METH_VARARGS, + "Returns the size of the pool for systems in quad double precision."}, + {"py2c_syspool_standard_create", + py2c_syspool_standard_create, METH_VARARGS, + "Defines the k-th system in the standard system pool,\n using the system in the standard container."}, + {"py2c_syspool_dobldobl_create", + py2c_syspool_dobldobl_create, METH_VARARGS, + "Defines the k-th system in the dobldobl system pool,\n using the system in the dobldobl container."}, + {"py2c_syspool_quaddobl_create", + py2c_syspool_quaddobl_create, METH_VARARGS, + "Defines the k-th system in the quaddobl system pool,\n using the system in the quaddobl container."}, + {"py2c_syspool_copy_to_standard_container", + py2c_syspool_copy_to_standard_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in standard double\n precision to the standard systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_copy_to_dobldobl_container", + py2c_syspool_copy_to_dobldobl_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in double double\n precision to the dobldobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_copy_to_quaddobl_container", + py2c_syspool_copy_to_quaddobl_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in quad double\n precision to the quaddobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_standard_clear", py2c_syspool_standard_clear, METH_VARARGS, + "Clears the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_clear", py2c_syspool_dobldobl_clear, METH_VARARGS, + "Clears the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_clear", py2c_syspool_quaddobl_clear, METH_VARARGS, + "Clears the pool for systems in quad double precision."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_get_default_path_parameters", + py2c_get_default_path_parameters, METH_VARARGS, + "Given the working precision (16, 32, or 64), returns the default values\n of the path parameters, for the path trackers with algorithmic differentiation."}, + {"py2c_ade_manypaths_d_pars", + py2c_ade_manypaths_d_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_dd_pars", + py2c_ade_manypaths_dd_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_qd_pars", + py2c_ade_manypaths_qd_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +PyMODINIT_FUNC initphcpy2c2(void) +{ + Py_InitModule("phcpy2c2", phcpy2c_methods); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2c3.c phcpack-2.4.85/src/Mod/phcpy2c3.c --- phcpack-2.4.84/src/Mod/phcpy2c3.c 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2c3.c 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,11880 @@ +/* This file contains the definitions of the prototypes in phcpy2c.h, + for use in version 3.5 (and higher) of Python. */ + +#include +#include +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "tabform.h" +#include "syspool.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "intcelcon.h" +#include "scalers.h" +#include "reducers.h" +#include "sweep.h" +#include "multiplicity.h" +#include "numbtrop.h" +#include "witset.h" +#include "witsols.h" +#include "mapcon.h" +#include "series.h" +#include "padcon.h" +#include "jump_track.h" +#include "next_track.h" +// #include "lib2path.h" +#include "structmember.h" + +#ifdef compilewgpp +extern "C" void adainit( void ); +extern "C" void adafinal( void ); +#else +extern void adainit( void ); +extern void adafinal( void ); +#endif + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +static PyObject *py2c_corecount + ( PyObject *self, PyObject *args ) +{ + if(!PyArg_ParseTuple(args,"")) return NULL; + + int number_of_cores = sysconf(_SC_NPROCESSORS_ONLN); + + return Py_BuildValue("i", number_of_cores); +} + +/* The wrapping of functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed + ( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed + ( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_dobldobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_start_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_quaddobl_target_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of copying systems from and to containers starts here. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_standard_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_Laurent_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail,pwt; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"ddi",&g_re,&g_im,&pwt)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im,pwt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_value_of_continuation_parameter + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + double val; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = get_value_of_continuation_parameter(idx,&val); + + return Py_BuildValue("d",val); +} + +static PyObject *py2c_set_value_of_continuation_parameter + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + double val; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&idx,&val)) return NULL; + fail = set_value_of_continuation_parameter(idx,&val); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_Laurent_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_operations_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_standard_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_Laurent_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_Laurent_data(); + + return Py_BuildValue("i",fail); +} + +/* Wrapping of crude path trackers of the jumpstart library starts here. */ + +static PyObject *py2c_standard_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = standard_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = dobldobl_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_crude_tracker + ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = quaddobl_crude_tracker(verbose); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of copying solutions from and to containers starts here. */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,vrb,nbtasks,mvfocus = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) + return NULL; + fail = solve_standard_system(&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_scan_for_symbols + ( PyObject *self, PyObject *args ) +{ + int fail,nbc,dim; + char *polsys; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc,&polsys)) return NULL; + + fail = scan_number_of_variables(nbc,polsys,&dim); + + return Py_BuildValue("i",dim); +} + +static PyObject *py2c_solve_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_dobldobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,rc,nrc,silent,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_quaddobl_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,nbtasks,mvfocus,vrb = 0; + char rocos[1024]; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&silent,&nbtasks,&mvfocus,&vrb)) + return NULL; + fail = solve_standard_Laurent_system + (&rc,silent,&nrc,rocos,nbtasks,mvfocus,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_dobldobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_solve_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nrc,nbtasks,vrb = 0; + char rocos[1024]; + + initialize(); + if (!PyArg_ParseTuple(args,"iii",&silent,&nbtasks,&vrb)) return NULL; + fail = solve_quaddobl_Laurent_system(&rc,silent,&nrc,rocos,nbtasks,vrb); + if(silent == 1) + return Py_BuildValue("i",rc); + else + return Py_BuildValue("(i,s)",rc,rocos); +} + +static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ) +{ + int fail,prc,vrb; + double regm,imgm; + + initialize(); + if (!PyArg_ParseTuple(args,"ddii",®m,&imgm,&prc,&vrb)) return NULL; + fail = set_gamma_constant(regm,imgm,prc,vrb); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ) +{ + int fail,prc,vrb; + double regm,imgm; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&prc,&vrb)) return NULL; + fail = get_gamma_constant(®m,&imgm,prc,vrb); + + return Py_BuildValue("(d,d)",regm,imgm); +} + +static PyObject *py2c_mixed_volume + ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_mixed_volume_by_demics + ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume_by_demics(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume_by_demics(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = standard_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = dobldobl_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate + ( PyObject *self, PyObject *args ) +{ + int mxit,mxdf; + double terr,tres,trnk; + + initialize(); + if(!PyArg_ParseTuple(args,"iiddd",&mxit,&mxdf,&terr,&tres,&trnk)) + return NULL; + { + int fail = quaddobl_deflate(mxit,mxdf,terr,tres,trnk); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_condition_report + ( PyObject *self, PyObject *args ) +{ + int fail,maxit,verbose; + double tolres,tolerr,tolsing; + char *name; + int cntfail,cntreal,cntcmplx,cntregu,cntsing,cntclus,nbc; + int t_err[16]; + int t_rco[16]; + int t_res[16]; + char st_err[256]; + char st_rco[256]; + char st_res[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"idddsi", + &maxit,&tolres,&tolerr,&tolsing,&name,&verbose)) + return NULL; + + nbc = strlen(name); + + if(verbose == 1) + { + if(nbc == 0) + printf("Writing the output to screen.\n"); + else + printf("Writing the output to file %s.\n", name); + } + fail = standard_condition_report + (maxit,tolres,tolerr,tolsing,nbc,name, + &cntfail,&cntreal,&cntcmplx,&cntregu,&cntsing,&cntclus, + t_err,t_rco,t_res,verbose); + + intlist2str(16, t_err, st_err); + intlist2str(16, t_rco, st_rco); + intlist2str(16, t_res, st_res); + + return Py_BuildValue("(i, i, i, i, i, i, i, s, s, s)", fail, + cntregu, cntsing, cntreal, cntcmplx, cntclus, cntfail, + st_err, st_res, st_rco); +} + +/* The wrapping of the functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl + ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec + ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* The wrapping of the functions in giftwrappers.h starts from here. */ + +static PyObject *py2c_giftwrap_planar + ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull + ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int idx,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + nbr = support_size(idx); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions in syscon.h starts from here. */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_dobldobl_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_random_system + ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c,neq; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiii",&n,&m,&d,&c,&neq)) return NULL; + fail = syscon_quaddobl_random_system(n,m,d,c,neq); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_standard_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_standard_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_standard_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_standard_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_standard_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_standard_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_standard_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_standard_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_standard_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term + ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_standard_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free(exp); + free(c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_standard_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_standard_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_multprec_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_standard_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k,szl; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_multprec_Laurent_size_limit(k,&szl); + { + char p[szl]; + + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); + } +} + +static PyObject *py2c_syscon_total_degree + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_Laurent_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_Laurent_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_standard_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_dobldobl_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_one_homogenization + ( PyObject *self, PyObject *args ) +{ + int fail,lintype; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&lintype)) return NULL; + + fail = syscon_quaddobl_one_homogenization(lintype); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_add_symbol + ( PyObject *self, PyObject *args ) +{ + int fail,nbc; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc,&name)) return NULL; + + fail = syscon_add_symbol(nbc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_standard_one_affinization(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_dobldobl_one_affinization(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_one_affinization + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + + fail = syscon_quaddobl_one_affinization(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions in tabform.h starts from here */ + +static PyObject *py2c_tabform_store_standard_tableau + ( PyObject *self, PyObject *args ) +{ + int fail,neq,nvr,nc1,nc2,nc3,verbose; + char *nbt,*cff,*xpc; + + initialize(); + if(!PyArg_ParseTuple(args,"iiisisisi",&neq,&nvr,&nc1,&nbt,&nc2,&cff, + &nc3,&xpc,&verbose)) return NULL; + { + if(verbose > 0) + { + printf("the string of terms : %s\n", nbt); + printf("the string of coefficients : %s\n", cff); + printf("the string of exponents : %s\n", xpc); + } + int ic1 = itemcount(nbt); + int ic2 = itemcount(xpc); + int ic3 = itemcount(cff); + + if(verbose > 0) + { + printf("number of items in nbt : %d\n", ic1); + printf("number of items in xpc : %d\n", ic2); + printf("number of items in cff : %d\n", ic3); + } + int nbterms[ic1]; + int exponents[ic2]; + double coefficients[ic3]; + + str2intlist(ic1,nbt,nbterms); + str2intlist(ic2,xpc,exponents); + str2dbllist(ic3,cff,coefficients); + + if(verbose > 0) + { + int idx; + + printf("the number of terms : "); + for(idx=0; idx 0) + { + printf("the number of equations : %d\n", neq); + printf("the number of variables : %d\n", nvr); + printf("total number of terms : %d\n", nbt); + } + { + int nbterms[neq]; + const int nbexp = nvr*nbt; + const int nbcff = 2*nbt; + int exponents[nbexp]; + double coefficients[nbcff]; + char strnbt[neq*8]; + char strxps[nbexp*8]; + char strcff[nbcff*26]; + + fail = number_of_standard_terms(neq,nbterms,&nbt,verbose); + fail = standard_tableau_form + (neq,nvr,nbterms,coefficients,exponents,verbose); + + intlist2str(neq, nbterms, strnbt); + intlist2str(nbexp, exponents, strxps); + dbllist2str(nbcff, coefficients, strcff); + if(verbose > 0) + { + int idx; + printf("the number of terms : "); + for(idx=0; idx 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* The wrapping of the functions with prototypes in reducers.h starts here. */ + +static PyObject *py2c_linear_reduce_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = standard_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_linear_reduce_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = dobldobl_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_linear_reduce_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,diag; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&diag)) return NULL; + + fail = quaddobl_row_reduce_system(diag); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_nonlinear_reduce_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,eqmax,spmax,rpmax,eqcnt,spcnt,rpcnt; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&eqmax,&spmax,&rpmax)) return NULL; + + fail = standard_nonlinear_reduce_system + (eqmax,spmax,rpmax,&eqcnt,&spcnt,&rpcnt); + + return Py_BuildValue("(i,i,i)",eqcnt,spcnt,rpcnt); +} + +/* The wrapping of the functions with prototypes in sweep.h starts here. */ + +static PyObject *py2c_sweep_define_parameters_numerically + ( PyObject *self, PyObject *args ) +{ + int fail,nq,nv,np,cnt; + char *strpars; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nq,&nv,&np,&strpars)) return NULL; + + cnt = itemcount(strpars); + { + int pars[cnt]; + + str2intlist(cnt,strpars,pars); + fail = sweep_define_parameters_numerically(nq,nv,np,pars); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_define_parameters_symbolically + ( PyObject *self, PyObject *args ) +{ + int fail,nq,nv,np,nc; + char *pars; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nq,&nv,&np,&nc,&pars)) return NULL; + + fail = sweep_define_parameters_symbolically(nq,nv,np,nc,pars); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_get_number_of_equations + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_equations(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_number_of_variables + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_variables(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_number_of_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_sweep_get_indices_numerically + ( PyObject *self, PyObject *args ) +{ + int fail,np,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&np); + { + int idx[np]; + char stridx[np*10]; + + fail = sweep_get_indices_numerically(idx); + + nc = intlist2str(np,idx,stridx); + + return Py_BuildValue("s",stridx); + } +} + +static PyObject *py2c_sweep_get_indices_symbolically + ( PyObject *self, PyObject *args ) +{ + int fail,np,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = sweep_get_number_of_parameters(&np); + { + char buf[np*20]; /* assumes no more than 20 characters per symbol */ + + fail = sweep_get_indices_symbolically(&nc,buf); + + buf[nc] = '\0'; + + return Py_BuildValue("s",buf); + } +} + +static PyObject *py2c_sweep_clear_definitions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_clear_definitions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_standard_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 2*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_standard_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_standard_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 2*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_standard_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_dobldobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 4*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_dobldobl_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_dobldobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 4*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_dobldobl_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_quaddobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 8*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_quaddobl_start(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_set_quaddobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,m; + char *strvals; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&m,&strvals)) return NULL; + { + const int n = 8*m; + double vals[n]; + + str2dbllist(n,strvals,vals); + + fail = sweep_set_quaddobl_target(n,vals); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_get_standard_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_standard_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_standard_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_standard_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_dobldobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_dobldobl_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_dobldobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_dobldobl_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_quaddobl_start + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_quaddobl_start(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_get_quaddobl_target + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + { + double cff[n]; + char strcff[n*25]; + + fail = sweep_get_quaddobl_target(n,cff); + + nc = dbllist2str(n,cff,strcff); + + return Py_BuildValue("s",strcff); + } +} + +static PyObject *py2c_sweep_standard_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + + fail = sweep_standard_complex_run(choice,&g_re,&g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_dobldobl_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + { + if(choice < 2) + fail = sweep_dobldobl_complex_run(choice,&g_re,&g_im); + else + { + double regamma[2]; + double imgamma[2]; + regamma[0] = g_re; regamma[1] = 0.0; + imgamma[0] = g_im; imgamma[1] = 0.0; + fail = sweep_dobldobl_complex_run(choice,regamma,imgamma); + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_quaddobl_complex_run + ( PyObject *self, PyObject *args ) +{ + int fail,choice; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&choice,&g_re,&g_im)) return NULL; + { + if(choice < 2) + fail = sweep_quaddobl_complex_run(choice,&g_re,&g_im); + else + { + double regamma[4]; + double imgamma[4]; + regamma[0] = g_re; regamma[1] = 0.0; + regamma[2] = 0.0; regamma[3] = 0.0; + imgamma[0] = g_im; imgamma[1] = 0.0; + imgamma[2] = 0.0; imgamma[3] = 0.0; + fail = sweep_quaddobl_complex_run(choice,regamma,imgamma); + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_standard_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_standard_real_run(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_dobldobl_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_dobldobl_real_run(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_sweep_quaddobl_real_run + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = sweep_quaddobl_real_run(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping for the multiplicity structure starts here. */ + +static PyObject *py2c_standard_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose,mult; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = standard_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +static PyObject *py2c_dobldobl_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose,mult; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = dobldobl_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +static PyObject *py2c_quaddobl_multiplicity_structure + ( PyObject *self, PyObject *args ) +{ + int fail,order,verbose,mult; + double tol; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&order,&verbose,&tol)) return NULL; + { + int nbc,mult; + int hilb[order+1]; + char strhilb[4*(order+1)]; + + fail = quaddobl_multiplicity_structure(order,verbose,tol,&mult,hilb); + nbc = intlist2str(order+1,hilb,strhilb); + + return Py_BuildValue("(i,s)",mult,strhilb); + } +} + +/* The wrapping of the numerical tropisms container starts here. */ + +static PyObject *py2c_numbtrop_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail,nbt,dim,k; + char *data; /* all numbers come in one long string */ + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&nbt,&dim,&data)) return NULL; + { + const int lendata = nbt*(dim+2); + double numbers[lendata]; + int wnd[nbt]; + double dir[nbt*dim]; + double err[nbt]; + + str2dbllist(lendata,data,numbers); + + for(k=0; k %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_update_dobldobl_decomposition + ( PyObject *self, PyObject *args ) +{ + int fail,i,d,nc; + char *permutation; + int done = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; + { + int nb,perm[d],nf[2]; + + /* printf("updating with "); + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_update_quaddobl_decomposition + ( PyObject *self, PyObject *args ) +{ + int fail,i,d,nc; + char *permutation; + int done = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&d,&nc,&permutation)) return NULL; + { + int nb,perm[d],nf[2]; + + /* printf("updating with "); + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_standard_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_standard_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_number_of_dobldobl_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_dobldobl_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_number_of_quaddobl_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_quaddobl_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_standard_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_standard_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,vrf,mrp,sqr,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiisiiiiis", + &n,&k,&nbc,&nc,&cond,&vrb,&vrf,&mrp,&sqr,&szn,&name)) + return NULL; +/* + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = standard_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 4*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = dobldobl_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 8*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = quaddobl_Littlewood_Richardson_homotopies + (n,k,nbc,cds,vrb,vrf,mrp,sqr,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_standard_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_track + ( PyObject *self, PyObject *args ) +{ + int nbc,fail,localfile,verbose,mhom,nvr,*idz; + char *name; + char *stridz; + + initialize(); + if(!PyArg_ParseTuple(args,"isiiiis", + &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; + + if(mhom == 1) + padcon_dobldobl_projective_transformation(); + else if(mhom > 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_dobldobl_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_track + ( PyObject *self, PyObject *args ) +{ + int nbc,fail,localfile,verbose,mhom,nvr,*idz; + char *name; + char *stridz; + + initialize(); + if(!PyArg_ParseTuple(args,"isiiiis", + &nbc,&name,&localfile,&verbose,&mhom,&nvr,&stridz)) return NULL; + + if(mhom == 1) + padcon_quaddobl_projective_transformation(); + else if(mhom > 1) + { + int ic = itemcount(stridz); + idz = (int*)calloc(ic,sizeof(int)); + str2intlist(ic,stridz,idz); + if(verbose > 0) + { + printf("mhom : %d", mhom); + printf(" partition :"); + for(int k=0; k 1) + fail = solcon_quaddobl_multi_affinization(nvr,mhom,idz); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_standard_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_dobldobl_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_initialize_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,verbose,homogeneous; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&verbose,&homogeneous)) return NULL; + fail = padcon_quaddobl_initialize_homotopy(verbose,homogeneous); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_standard_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_dobldobl_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_quaddobl_initialize_parameter_homotopy(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_standard_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_dobldobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_initialize_quaddobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_standard_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_dobldobl_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_dobldobl_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_quaddobl_predict_correct + ( PyObject *self, PyObject *args ) +{ + int fail,precorfail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = padcon_quaddobl_predict_correct(&precorfail,verbose); + return Py_BuildValue("i",precorfail); +} + +static PyObject *py2c_padcon_get_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_standard_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_get_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_dobldobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_get_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,index,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&index,&verbose)) return NULL; + fail = padcon_get_quaddobl_solution(index,verbose); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_standard_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_dobldobl_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_quaddobl_pole_radius + ( PyObject *self, PyObject *args ) +{ + int fail; + double frp; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_pole_radius(&frp); + + return Py_BuildValue("d",frp); +} + +static PyObject *py2c_padcon_standard_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_dobldobl_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_quaddobl_closest_pole + ( PyObject *self, PyObject *args ) +{ + int fail; + double repole,impole; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_closest_pole(&repole,&impole); + + return Py_BuildValue("(d,d)",repole,impole); +} + +static PyObject *py2c_padcon_standard_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_dobldobl_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_quaddobl_t_value + ( PyObject *self, PyObject *args ) +{ + int fail; + double tval; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_t_value(&tval); + + return Py_BuildValue("d",tval); +} + +static PyObject *py2c_padcon_standard_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_step_size + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_step_size(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_series_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_series_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_pole_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_pole_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_estimated_distance + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_estimated_distance(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_standard_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_dobldobl_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_dobldobl_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_quaddobl_hessian_step + ( PyObject *self, PyObject *args ) +{ + int fail; + double step; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_get_quaddobl_hessian_step(&step); + + return Py_BuildValue("d",step); +} + +static PyObject *py2c_padcon_standard_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_series_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_series_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_numerator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_numerator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_denominator_coefficient + ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_denominator_coefficient(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_standard_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_dobldobl_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ) +{ + int fail,lead,idx,vrb; + double cre,cim; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&lead,&idx,&vrb)) return NULL; + fail = padcon_get_quaddobl_pole(lead,idx,vrb,&cre,&cim); + + return Py_BuildValue("(d,d)",cre,cim); +} + +static PyObject *py2c_padcon_clear_standard_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_standard_data(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_clear_dobldobl_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_dobldobl_data(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_padcon_clear_quaddobl_data + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = padcon_clear_quaddobl_data(); + return Py_BuildValue("i",fail); +} + +/* The wrapping of functions with prototypes in syspool.h starts below. */ + +static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_standard_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_dobldobl_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = syspool_quaddobl_initialize(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_standard_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_dobldobl_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_quaddobl_size(&nbr); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_syspool_standard_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_standard_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_dobldobl_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_create + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_quaddobl_create(idx); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_standard_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_standard_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_dobldobl_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_dobldobl_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_copy_to_quaddobl_container + ( PyObject *self, PyObject *args ) +{ + int fail,idx; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&idx)) return NULL; + fail = syspool_copy_to_quaddobl_container(idx); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_standard_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_standard_clear(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_dobldobl_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_dobldobl_clear(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syspool_quaddobl_clear ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syspool_quaddobl_clear(); + + return Py_BuildValue("i",fail); +} + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_standard_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_dobldobl_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed; + double regamma,imgamma; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&fixed,®amma,&imgamma)) return NULL; + fail = initialize_quaddobl_homotopy(fixed,regamma,imgamma); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,deci,fixed; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&fixed,&deci)) return NULL; + fail = initialize_multprec_homotopy(fixed,deci); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_varbprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail,fixed,nctgt,ncstr; + char *tgt; + char *str; + + initialize(); + if(!PyArg_ParseTuple(args,"iisis",&fixed,&nctgt,&tgt,&ncstr,&str)) + return NULL; + fail = initialize_varbprec_homotopy(fixed,nctgt,tgt,ncstr,str); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_standard_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_dobldobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_quaddobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = initialize_multprec_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,nv,nc; + char *sol; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&nv,&nc,&sol)) return NULL; + fail = initialize_varbprec_solution(nv,nc,sol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_standard_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_dobldobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_quaddobl_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,indsol; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&indsol)) return NULL; + fail = next_multprec_solution(indsol); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ) +{ + int fail,want,mxpr,mxit,verb,nc; + char *sol; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&want,&mxpr,&mxit,&verb)) return NULL; + sol = next_varbprec_solution(want,mxpr,mxit,verb,&nc,&fail); + + return Py_BuildValue("(i,s)",fail,sol); +} + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_standard_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_tracker(); + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_varbprec_tracker(); + return Py_BuildValue("i",fail); +} + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in lib2path.h, starts here. */ + +// For the separate compilation of lib2path, extern declarations are needed. + +extern int standard_ade_newton ( int verbose ); +extern int standard_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int standard_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +extern int dobldobl_ade_newton ( int verbose ); +extern int dobldobl_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int dobldobl_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +extern int quaddobl_ade_newton ( int verbose ); +extern int quaddobl_ade_onepath + ( int verbose, double regamma, double imgamma ); +extern int quaddobl_ade_manypaths + ( int verbose, double regamma, double imgamma ); + +static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = standard_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = dobldobl_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&verbose)) return NULL; + fail = quaddobl_ade_newton(verbose); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = standard_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = dobldobl_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = quaddobl_ade_onepath(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = standard_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = dobldobl_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ) +{ + int fail,verbose; + double reg,img; + + initialize(); + if(!PyArg_ParseTuple(args,"idd",&verbose,®,&img)) return NULL; + fail = quaddobl_ade_manypaths(verbose,reg,img); + + return Py_BuildValue("i",fail); +} + +/* For the parameter tuning we need the default path parameters, + * provided by the lib2path function below, + * see lib2path.h for its specification. */ + +extern int get_default_path_parameters + ( int precision, int* max_step, int* n_predictor, + double* step_increase, double* step_decrease, + double* max_delta_t, double* max_delta_t_end, double* min_delta_t, + double* err_max_res, double* err_max_delta_x, double* err_max_first_delta_x, + int* max_it, double* err_min_round_off, + int* max_it_refine, double* err_min_round_off_refine ); + +static PyObject *py2c_get_default_path_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,precision,max_step,n_predictor,max_it,max_it_refine; + double step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&precision)) return NULL; + fail = get_default_path_parameters(precision,&max_step,&n_predictor, + &step_increase,&step_decrease,&max_delta_t,&max_delta_t_end,&min_delta_t, + &err_max_res,&err_max_delta_x,&err_max_first_delta_x, + &max_it,&err_min_round_off,&max_it_refine,&err_min_round_off_refine); + + return Py_BuildValue("(i,i,d,d,d,d,d,d,d,d,i,d,i,d)", + max_step,n_predictor,step_increase, + step_decrease,max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); +} + +// for separate compilation, extern declarations are needed, as below + +extern int standard_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +extern int dobldobl_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +extern int quaddobl_ademanypaths_with_parameters + ( int verbose, double regamma, double imgamma, + int max_step, int n_predictor, + double step_increase, double step_decrease, + double max_delta_t, double max_delta_t_end, double min_delta_t, + double err_max_res, double err_max_delta_x, double err_max_first_delta_x, + int max_it, double err_min_round_off, + int max_it_refine, double err_min_round_off_refine ); + +static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = standard_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = dobldobl_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ) +{ + int fail,verbose,max_step,n_predictor,max_it,max_it_refine; + double reg,img,step_increase,step_decrease; + double max_delta_t,max_delta_t_end,min_delta_t; + double err_max_res,err_max_delta_x,err_max_first_delta_x; + double err_min_round_off,err_min_round_off_refine; + + initialize(); + if(!PyArg_ParseTuple(args,"iddiiddddddddidid",&verbose,®,&img, + &max_step,&n_predictor,&step_increase,&step_decrease, + &max_delta_t,&max_delta_t_end,&min_delta_t,&err_max_res, + &err_max_delta_x,&err_max_first_delta_x,&max_it,&err_min_round_off, + &max_it_refine,&err_min_round_off_refine)) return NULL; + + fail = quaddobl_ademanypaths_with_parameters(verbose,reg,img, + max_step,n_predictor,step_increase,step_decrease, + max_delta_t,max_delta_t_end,min_delta_t,err_max_res, + err_max_delta_x,err_max_first_delta_x,max_it,err_min_round_off, + max_it_refine,err_min_round_off_refine); + + return Py_BuildValue("i",fail); +} + +static PyMethodDef phcpy2c3_methods[] = +{ + {"py2c_corecount", py2c_corecount, METH_VARARGS, + "Returns the number of cores available for multithreading."}, + {"py2c_PHCpack_version_string", py2c_PHCpack_version_string, METH_VARARGS, + "Returns the version string of PHCpack.\n The version string is 40 characters long."}, + {"py2c_set_seed", py2c_set_seed, METH_VARARGS, + "Takes the value of the integer given on input\n and sets the seed for the random number generators.\n This fixing of the seed enables reproducible runs." }, + {"py2c_get_seed", py2c_get_seed, METH_VARARGS, + "Returns the current value of the seed.\n Using this value in py2c_set_seed will ensure that the\n results of previous runs can be reproduced."}, + {"py2c_read_standard_target_system", py2c_read_standard_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_target_system_from_file", + py2c_read_standard_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_start_system", py2c_read_standard_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_standard_start_system_from_file", + py2c_read_standard_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in standard double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_target_system", py2c_read_dobldobl_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_target_system_from_file", + py2c_read_dobldobl_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_start_system", py2c_read_dobldobl_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_dobldobl_start_system_from_file", + py2c_read_dobldobl_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in double double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_target_system", py2c_read_quaddobl_target_system, + METH_VARARGS, + "Prompts the user to enter a target system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_target_system_from_file", + py2c_read_quaddobl_target_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a target system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_start_system", py2c_read_quaddobl_start_system, + METH_VARARGS, + "Prompts the user to enter a start system that will\n be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_read_quaddobl_start_system_from_file", + py2c_read_quaddobl_start_system_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a start system to be parsed in quad double precision.\n The failure code is returned, which is zero if all went well."}, + {"py2c_define_output_file", py2c_define_output_file, METH_VARARGS, + "Prompts the user to define the output file.\n On return is the failure code, which is zero if all went well."}, + {"py2c_write_standard_target_system", + py2c_write_standard_target_system, METH_VARARGS, + "Writes the target system as stored in standard double precision\n to screen or to the defined output file."}, + {"py2c_write_dobldobl_target_system", + py2c_write_dobldobl_target_system, METH_VARARGS, + "Writes the target system as stored in double double precision\n to screen or to the defined output file."}, + {"py2c_write_quaddobl_target_system", + py2c_write_quaddobl_target_system, METH_VARARGS, + "Writes the target system as stored in quad double precision\n to screen or to the defined output file."}, + {"py2c_write_standard_start_system", + py2c_write_standard_start_system, METH_VARARGS, + "Writes the start system as stored in standard double precision\n to screen or to the defined output file."}, + {"py2c_write_dobldobl_start_system", + py2c_write_dobldobl_start_system, METH_VARARGS, + "Writes the start system as stored in double double precision\n to screen or to the defined output file."}, + {"py2c_write_quaddobl_start_system", + py2c_write_quaddobl_start_system, METH_VARARGS, + "Writes the start system as stored in quad double precision\n to screen or to the defined output file."}, + {"py2c_read_standard_start_Laurent_system", + py2c_read_standard_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_standard_start_Laurent_system", + py2c_write_standard_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in standard double precision."}, + {"py2c_read_standard_target_Laurent_system", + py2c_read_standard_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in standard double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_standard_target_Laurent_system", + py2c_write_standard_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in standard double precision."}, + {"py2c_read_dobldobl_start_Laurent_system", + py2c_read_dobldobl_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_dobldobl_start_Laurent_system", + py2c_write_dobldobl_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in double double precision."}, + {"py2c_read_dobldobl_target_Laurent_system", + py2c_read_dobldobl_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in double double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_dobldobl_target_Laurent_system", + py2c_write_dobldobl_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in double double precision."}, + {"py2c_read_quaddobl_start_Laurent_system", + py2c_read_quaddobl_start_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the start system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_quaddobl_start_Laurent_system", + py2c_write_quaddobl_start_Laurent_system, METH_VARARGS, + "Writes the start Laurent system in quad double precision."}, + {"py2c_read_quaddobl_target_Laurent_system", + py2c_read_quaddobl_target_Laurent_system, METH_VARARGS, + "Prompts the user for a file name and reads the target system from file,\n in quad double precision.\n If available on file, also its solutions will be read and stored."}, + {"py2c_write_quaddobl_target_Laurent_system", + py2c_write_quaddobl_target_Laurent_system, METH_VARARGS, + "Writes the target Laurent system in quad double precision."}, + {"py2c_write_start_solutions", py2c_write_start_solutions, METH_VARARGS, + "Writes the start solutions in standard double precision either to\n the screen (standard output) or to the defined output file.\n On return is the failure code, which is zero if all is well."}, + {"py2c_copy_standard_target_system_to_container", + py2c_copy_standard_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in standard double precision."}, + {"py2c_copy_dobldobl_target_system_to_container", + py2c_copy_dobldobl_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in double double precision."}, + {"py2c_copy_quaddobl_target_system_to_container", + py2c_copy_quaddobl_target_system_to_container, METH_VARARGS, + "Copies the target system to the container for systems\n with coefficients in quad double precision."}, + {"py2c_copy_multprec_target_system_to_container", + py2c_copy_multprec_target_system_to_container, METH_VARARGS, + "copies multiprecision target system to container"}, + {"py2c_copy_standard_container_to_target_system", + py2c_copy_standard_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in standard double precision to the target system."}, + {"py2c_copy_dobldobl_container_to_target_system", + py2c_copy_dobldobl_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in double double precision to the target system."}, + {"py2c_copy_quaddobl_container_to_target_system", + py2c_copy_quaddobl_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in quad double precision to the target system."}, + {"py2c_copy_multprec_container_to_target_system", + py2c_copy_multprec_container_to_target_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the target system."}, + {"py2c_copy_start_system_to_container", + py2c_copy_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in standard double precision."}, + {"py2c_copy_dobldobl_start_system_to_container", + py2c_copy_dobldobl_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in double double precision."}, + {"py2c_copy_quaddobl_start_system_to_container", + py2c_copy_quaddobl_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in quad double precision."}, + {"py2c_copy_multprec_start_system_to_container", + py2c_copy_multprec_start_system_to_container, METH_VARARGS, + "Copies the start system to the container for systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_start_system", + py2c_copy_standard_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in standard double precision to the start system."}, + {"py2c_copy_dobldobl_container_to_start_system", + py2c_copy_dobldobl_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in double double precision to the start system."}, + {"py2c_copy_quaddobl_container_to_start_system", + py2c_copy_quaddobl_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in quad double precision to the start system."}, + {"py2c_copy_multprec_container_to_start_system", + py2c_copy_multprec_container_to_start_system, METH_VARARGS, + "Copies the system in the container for systems with coefficients\n in arbitrary multiprecision to the start system."}, + {"py2c_copy_standard_Laurent_container_to_start_system", + py2c_copy_standard_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in standard double precision\n from the container to the start system."}, + {"py2c_copy_dobldobl_Laurent_container_to_start_system", + py2c_copy_dobldobl_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in double double precision\n from the container to the start system."}, + {"py2c_copy_quaddobl_Laurent_container_to_start_system", + py2c_copy_quaddobl_Laurent_container_to_start_system, METH_VARARGS, + "Copies the Laurent system in quad double precision\n from the container to the start system."}, + {"py2c_copy_standard_Laurent_container_to_target_system", + py2c_copy_standard_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in standard double precision\n from the container to the target system."}, + {"py2c_copy_dobldobl_Laurent_container_to_target_system", + py2c_copy_dobldobl_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in double double precision\n from the container to the target system."}, + {"py2c_copy_quaddobl_Laurent_container_to_target_system", + py2c_copy_quaddobl_Laurent_container_to_target_system, METH_VARARGS, + "Copies the Laurent system in quad double precision\n from the container to the target system."}, + {"py2c_copy_standard_Laurent_start_system_to_container", + py2c_copy_standard_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in standard double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_dobldobl_Laurent_start_system_to_container", + py2c_copy_dobldobl_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in double double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_quaddobl_Laurent_start_system_to_container", + py2c_copy_quaddobl_Laurent_start_system_to_container, METH_VARARGS, + "Copies the start Laurent system in quad double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_standard_Laurent_target_system_to_container", + py2c_copy_standard_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in standard double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_dobldobl_Laurent_target_system_to_container", + py2c_copy_dobldobl_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in double double precision\n to the systems container for Laurent systems."}, + {"py2c_copy_quaddobl_Laurent_target_system_to_container", + py2c_copy_quaddobl_Laurent_target_system_to_container, METH_VARARGS, + "Copies the target Laurent system in quad double precision\n to the systems container for Laurent systems."}, + {"py2c_create_standard_homotopy", py2c_create_standard_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in standard double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_standard_homotopy_with_gamma", + py2c_create_standard_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in standard double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_dobldobl_homotopy", py2c_create_dobldobl_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in double double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_dobldobl_homotopy_with_gamma", + py2c_create_dobldobl_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in double double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_quaddobl_homotopy", py2c_create_quaddobl_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in quad double precision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_quaddobl_homotopy_with_gamma", + py2c_create_quaddobl_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in quad double precision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_multprec_homotopy", py2c_create_multprec_homotopy, + METH_VARARGS, + "Initializes the data for a homotopy in arbitrary multiprecision.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_create_multprec_homotopy_with_gamma", + py2c_create_multprec_homotopy_with_gamma, METH_VARARGS, + "Initializes the data for a homotopy in arbitrary multiprecision.\n On input are two doubles and one positive integer:\n (1) the real and imaginary part of the gamma constant;\n (2) the power of t in the homotopy.\n The failure code is returned, which is zero when all goes well."}, + {"py2c_clear_standard_homotopy", py2c_clear_standard_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in standard double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_dobldobl_homotopy", py2c_clear_dobldobl_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in double double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_quaddobl_homotopy", py2c_clear_quaddobl_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in quad double precision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_clear_multprec_homotopy", py2c_clear_multprec_homotopy, METH_VARARGS, + "Deallocation of the homotopy stored in arbitrary multiprecision.\n On return is the failure code, which equals zero if all is well."}, + {"py2c_tune_continuation_parameters", py2c_tune_continuation_parameters, + METH_VARARGS, + "Interactive procedure to tune the continuation parameters."}, + {"py2c_show_continuation_parameters", py2c_show_continuation_parameters, + METH_VARARGS, + "Shows the current values of the continuation parameters."}, + {"py2c_autotune_continuation_parameters", + py2c_autotune_continuation_parameters, METH_VARARGS, + "Tunes the values of the continuation parameters.\n On input are two integers:\n 1) the difficulty level of the solution paths; and\n 2) the number of decimal places in the precision."}, + {"py2c_get_value_of_continuation_parameter", + py2c_get_value_of_continuation_parameter, METH_VARARGS, + "Returns the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34.\n On return is a double with the value of the corresponding parameter."}, + {"py2c_set_value_of_continuation_parameter", + py2c_set_value_of_continuation_parameter, METH_VARARGS, + "Sets the value of a continuation parameter.\n On input is the index of this continuation parameter, an integer ranging from 1 to 34;\n and the new value for the continuation parameter.\n On return is a double with the value of the corresponding parameter."}, + {"py2c_determine_output_during_continuation", + py2c_determine_output_during_continuation, METH_VARARGS, + "Interactive procedure to determine the level of output during the path tracking."}, + {"py2c_solve_by_standard_homotopy_continuation", + py2c_solve_by_standard_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in standard double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_dobldobl_homotopy_continuation", + py2c_solve_by_dobldobl_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in double double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_quaddobl_homotopy_continuation", + py2c_solve_by_quaddobl_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in quad double precision.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_multprec_homotopy_continuation", + py2c_solve_by_multprec_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in arbitrary multiprecision.\n On input is one integer: the number of decimal places in the precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_standard_Laurent_homotopy_continuation", + py2c_solve_by_standard_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in standard double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_dobldobl_Laurent_homotopy_continuation", + py2c_solve_by_dobldobl_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in double double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_solve_by_quaddobl_Laurent_homotopy_continuation", + py2c_solve_by_quaddobl_Laurent_homotopy_continuation, METH_VARARGS, + "Tracks the paths defined by the homotopy in quad double precision\n to solve a Laurent system stored in the systems container,\n starting at the solutions of a stored Laurent start system.\n On input is one integer: the number of tasks for path tracking.\n If that input number is zero, then no multitasking is applied.\n On return is the failure code, which is zero when all went well."}, + {"py2c_clear_standard_operations_data", + py2c_clear_standard_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_standard_homotopy_continuation."}, + {"py2c_clear_dobldobl_operations_data", + py2c_clear_dobldobl_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_dobldobl_homotopy_continuation."}, + {"py2c_clear_quaddobl_operations_data", + py2c_clear_quaddobl_operations_data, METH_VARARGS, + "Deallocates the data used by solve_by_quaddobl_homotopy_continuation."}, + {"py2c_clear_standard_Laurent_data", + py2c_clear_standard_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in standard double precision."}, + {"py2c_clear_dobldobl_Laurent_data", + py2c_clear_dobldobl_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in double double precision."}, + {"py2c_clear_quaddobl_Laurent_data", + py2c_clear_quaddobl_Laurent_data, METH_VARARGS, + "Deallocates data used to solve Laurent systems by homotopy continuation\n in quad double precision."}, + {"py2c_standard_crude_tracker", py2c_standard_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in standard double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in standard\n double precision have been initialized in the containers."}, + {"py2c_dobldobl_crude_tracker", py2c_dobldobl_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in double double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in double\n double precision have been initialized in the containers."}, + {"py2c_quaddobl_crude_tracker", py2c_quaddobl_crude_tracker, METH_VARARGS, + "A crude tracker appends the end point of a path directly to\n the solutions container, without refinement or postprocessing.\n Tracking happens in quad double precision.\n On entry is the verbose parameter which is 1 or 0.\n If 1, then the solution vectors are written to screen, otherwise\n the crude tracker stays mute.\n On return is the failure code, which is zero when all went well.\n The requirement is that\n the target system, start system, and start solutions in quad\n double precision have been initialized in the containers."}, + {"py2c_copy_standard_target_solutions_to_container", + py2c_copy_standard_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in standard double precision to the\n container for solutions in standard double precision."}, + {"py2c_copy_dobldobl_target_solutions_to_container", + py2c_copy_dobldobl_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in double double precision to the\n container for solutions in double double precision."}, + {"py2c_copy_quaddobl_target_solutions_to_container", + py2c_copy_quaddobl_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in quad double precision to the\n container for solutions in quad double precision."}, + {"py2c_copy_multprec_target_solutions_to_container", + py2c_copy_multprec_target_solutions_to_container, METH_VARARGS, + "Copies the target solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_target_solutions", + py2c_copy_standard_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in standard double precision from the\n container to the target solutions in standard double precision."}, + {"py2c_copy_dobldobl_container_to_target_solutions", + py2c_copy_dobldobl_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in double double precision from the\n container to the target solutions in double double precision."}, + {"py2c_copy_quaddobl_container_to_target_solutions", + py2c_copy_quaddobl_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in quad double precision from the\n container to the target solutions in quad double precision."}, + {"py2c_copy_multprec_container_to_target_solutions", + py2c_copy_multprec_container_to_target_solutions, METH_VARARGS, + "Copies the solutions in arbitrary multiprecision from the\n container to the target solutions in arbitrary multiprecision."}, + {"py2c_copy_start_solutions_to_container", + py2c_copy_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in standard double precision to the\n container for solutions in standard double precision."}, + {"py2c_copy_dobldobl_start_solutions_to_container", + py2c_copy_dobldobl_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in double double precision to the\n container for solutions in double double precision."}, + {"py2c_copy_quaddobl_start_solutions_to_container", + py2c_copy_quaddobl_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in quad double precision to the\n container for solutions in quad double precision."}, + {"py2c_copy_multprec_start_solutions_to_container", + py2c_copy_multprec_start_solutions_to_container, METH_VARARGS, + "Copies the start solutions in arbitrary multiprecision to the\n container for solutions in arbitrary multiprecision."}, + {"py2c_copy_standard_container_to_start_solutions", + py2c_copy_standard_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in standard double precision from the\n container to the start solutions in standard double precision."}, + {"py2c_copy_dobldobl_container_to_start_solutions", + py2c_copy_dobldobl_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in double double precision from the\n container to the start solutions in double double precision."}, + {"py2c_copy_quaddobl_container_to_start_solutions", + py2c_copy_quaddobl_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in quad double precision from the\n container to the start solutions in quad double precision."}, + {"py2c_copy_multprec_container_to_start_solutions", + py2c_copy_multprec_container_to_start_solutions, METH_VARARGS, + "Copies the solutions in arbitrary multiprecision from the\n container to the start solutions in arbitrary multiprecision."}, + {"py2c_solve_standard_system", py2c_solve_standard_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, then no degree bounds will be computed; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard systems container."}, + {"py2c_scan_for_symbols", py2c_scan_for_symbols, METH_VARARGS, + "Given on input are two arguments: a number and a string.\n The string holds the string representation of a polynomial system,\n where each polynomial is terminated by a semi colon.\n The first argument on input is the number of characters in the string.\n On return is the number of symbols used as variables in the system.\n This function helps to determine whether a system is square or not."}, + {"py2c_solve_dobldobl_system", py2c_solve_dobldobl_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level. \n On return, the container for solutions in double double precision\n contains the solutions to the system in the dobldobl systems container."}, + {"py2c_solve_quaddobl_system", py2c_solve_quaddobl_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n systems with coefficients in quad double precision.\n Threee integers are expected on input:\n 1) a boolean flag if silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose;\n 2) the number of tasks.\n If that number is zero, then no multitasking is applied; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quaddobl systems container."}, + {"py2c_solve_standard_Laurent_system", + py2c_solve_standard_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in standard double precision.\n Four integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run;\n 3) a flag to focus on mixed volumes and polyhedral homotopies,\n if 1, the no degree bounds will be computed, as when\n the system is genuinely Laurent with negative exponents; and\n 4) the verbose level.\n On return, the container for solutions in standard double precision\n contains the solutions to the system in the standard Laurent systems\n container."}, + {"py2c_solve_dobldobl_Laurent_system", + py2c_solve_dobldobl_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in double double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in double double precision\n contains the solutions to the system in the double double Laurent systems\n container."}, + {"py2c_solve_quaddobl_Laurent_system", + py2c_solve_quaddobl_Laurent_system, METH_VARARGS, + "Calls the blackbox solver on the system stored in the container for\n Laurent systems with coefficients in quad double precision.\n Three integers are expected on input:\n 1) a boolean flag silent: if 1, then no intermediate output about\n the root counts is printed, if 0, then the solver is verbose; \n 2) the number of tasks: if 0, then no multitasking is applied,\n otherwise as many tasks as the number will run; and\n 3) the verbose level.\n On return, the container for solutions in quad double precision\n contains the solutions to the system in the quad double Laurent systems\n container."}, + {"py2c_set_gamma_constant", py2c_set_gamma_constant, METH_VARARGS, + "Stores the gamma constant for later retrieval.\n Four parameters are expected on input, two doubles and two integers.\n The two doubles are the real and imaginary parts of the gamma.\n The two integers are the precision, 1, 2, or 4, respectively for\n double, double double, or quad double; and the verbose level."}, + {"py2c_get_gamma_constant", py2c_get_gamma_constant, METH_VARARGS, + "Returns the gamma constant used by the solve functions.\n Two integer parameters are expected on input:\n (1) for the precision, 1, 2, or 4, respectively for double,\n double double, or quad double precision; and\n (2) the verbose level.\n The function returns a tuple of two doubles,\n for the real and imaginary part of the gamma constant."}, + {"py2c_mixed_volume", py2c_mixed_volume, METH_VARARGS, + "Computes the mixed volume, and the stable mixed volume as well if\n the input parameter equals 1. On return is the mixed volume, or\n a tuple with the mixed volume and the stable mixed volume."}, + {"py2c_mixed_volume_by_demics", py2c_mixed_volume_by_demics, METH_VARARGS, + "Calls DEMiCs to compute the mixed volume of the system in the\n standard systems container. If the standard systems container\n is empty, then the system in the standard Laurent systems\n container is taken as input.\n The integer in mv on return equals the mixed volume.\n The regular mixed-cell configuration is in the cells container.\n The above is for the case if the input parameter equals 0.\n If the input parameter equals 1, then on return is a tuple,\n which contains the mixed volume and the stable mixed volume."}, + {"py2c_standard_deflate", py2c_standard_deflate, METH_VARARGS, + "Applies deflation in standard double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_deflate", py2c_dobldobl_deflate, METH_VARARGS, + "Applies deflation in double double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_deflate", py2c_quaddobl_deflate, METH_VARARGS, + "Applies deflation in quad double precision to the system and\n the solutions stored in the containers.\n There are five input parameters, two integers and three doubles:\n (1) maxitr : the maximum number of iterations per root,\n (2) maxdef : the maximum number of deflations per root,\n (3) tolerr : tolerance on the forward error on each root,\n (4) tolres : tolerance on the backward error on each root,\n (5) tolres : tolerance on the numerical rank of the Jacobian matrices.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_step", py2c_standard_Newton_step, METH_VARARGS, + "Applies one Newton step in standard double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_step", py2c_dobldobl_Newton_step, METH_VARARGS, + "Applies one Newton step in double double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_step", py2c_quaddobl_Newton_step, METH_VARARGS, + "Applies one Newton step in quad double precision to the system in\n the standard systems container and to the solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_multprec_Newton_step", py2c_multprec_Newton_step, METH_VARARGS, + "Applies one Newton step in arbitrary multiprecision to the system in\n the multprec systems container and to the solutions in the container.\n On input is an integer, the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_Laurent_step", py2c_standard_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in standard double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_Laurent_step", py2c_dobldobl_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in double double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_Laurent_step", py2c_quaddobl_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in quad double precision to the Laurent\n system in the standard Laurent systems container and to the solutions\n in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_multprec_Newton_Laurent_step", py2c_multprec_Newton_Laurent_step, + METH_VARARGS, + "Applies one Newton step in arbitrary multiprecision to the Laurent\n system in the multprec Laurent systems container and to the solutions\n in the container.\n On input is an integer: the number of decimal places in the precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_varbprec_Newton_Laurent_steps", py2c_varbprec_Newton_Laurent_steps, + METH_VARARGS, + "Applies Newton's method in variable precision.\n There are six input parameters:\n 1) the dimension: the number of variables and equations;\n 2) the accuracy, expressed as the correct number of decimal places;\n 3) the maximum number of iterations in Newton's method;\n 4) an upper bound on the number of decimal places in the precision;\n 5) a string, with the representation of the polynomials in the system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_condition_report", py2c_standard_condition_report, + METH_VARARGS, + "For the system and solutions in the containers in double precision,\n computes a condition report. On input are the following:\n 1) maximum number of Newton iterations per solution;\n 2) tolerance on the residual;\n 3) tolerance on the forward error;\n 4) tolerance on the inverse condition number for singularities;\n 5) a string with the name of the output file,\n this string may be empty if no output to file is needed;\n 6) a verbose flag, either 1 or 0.\n On return are the counts of number of solutions that are\n regular, singular, real, complex, clustered, or failures;\n along with the frequency tables for the forward errors,\n residuals and estimates for the inverse condition numbers."}, + {"py2c_usolve_standard", py2c_usolve_standard, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with standard double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the standard systems container. After the call of this function,\n the standard solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_dobldobl", py2c_usolve_dobldobl, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with double double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the dobldobl systems container. After the call of this function,\n the dobldobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_quaddobl", py2c_usolve_quaddobl, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with quad double precision arithmetic.\n On input are two numbers:\n 1) the maximum number of iterations in the method of Weierstrass; and\n 2) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the quaddobl systems container. After the call of this function,\n the quaddobl solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_usolve_multprec", py2c_usolve_multprec, METH_VARARGS, + "Applies the method of Weierstrass to compute all roots of a\n polynomial in one variable with arbitrary multiprecision arithmetic.\n On input are three numbers:\n 1) the number of decimal places in the working precision;\n 2) the maximum number of iterations in the method of Weierstrass; and\n 3) the epsilon requirement on the accuracy of the roots.\n Before calling this function, the polynomial should be stored in\n the multprec systems container. After the call of this function,\n the multprec solutions container contains the roots of the polynomial.\n On return is the number of iterations done by the solver."}, + {"py2c_giftwrap_planar", py2c_giftwrap_planar, METH_VARARGS, + "Applies the giftwrapping algorithm to a planar point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n On return is the string representation of the vertex points,\n sorted so that each two consecutive points define an edge."}, + {"py2c_giftwrap_convex_hull", py2c_giftwrap_convex_hull, METH_VARARGS, + "Applies the giftwrapping algorithm to a point configuration.\n On input are an integer and a string:\n 1) the number of points in the list;\n 2) the string representation of a Python list of tuples.\n When the function returns, the internal data structures\n to store the convex hull are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_giftwrap_number_of_facets", py2c_giftwrap_number_of_facets, + METH_VARARGS, + "Returns the number of facets of the given dimension.\n On input is an integer, the dimension of the facet."}, + {"py2c_giftwrap_retrieve_facet", py2c_giftwrap_retrieve_facet, METH_VARARGS, + "Returns the string representation of a facet.\n On input are two integer numbers:\n 1) the dimension of the facet;\n 2) the index of the facet."}, + {"py2c_giftwrap_clear_3d_facets", py2c_giftwrap_clear_3d_facets, + METH_VARARGS, + "Deallocates list of facets of convex hull stored in 3-space."}, + {"py2c_giftwrap_clear_4d_facets", py2c_giftwrap_clear_4d_facets, + METH_VARARGS, + "Deallocates list of facets of convex hull stored in 4-space."}, + {"py2c_giftwrap_support_size", py2c_giftwrap_support_size, METH_VARARGS, + "Returns the number of characters in the string representation of\n the support of the k-th Laurent polynomial in the container, k is given on input."}, + {"py2c_giftwrap_support_string", py2c_giftwrap_support_string, + METH_VARARGS, + "Returns the string representation of the support of a Laurent polynomial."}, + {"py2c_giftwrap_clear_support_string", py2c_giftwrap_clear_support_string, + METH_VARARGS, + "Deallocates the string representation of the support set\n that was stored internally by the call py2c_giftwrap_support_size."}, + {"py2c_giftwrap_initial_form", py2c_giftwrap_initial_form, METH_VARARGS, + "Replaces the system in the Laurent systems container by its initial form.\n There are three input parameters:\n 1) the dimension, number of coordinates in the inner normal;\n 2) the number of characters in the string representation for the normal;\n 3) the string representation of the inner normal.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_read_standard_system", + py2c_syscon_read_standard_system, METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in standard double precision.\n The system will be placed in the standard systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_standard_Laurent_system", + py2c_syscon_read_standard_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in standard double precision.\n The system will be placed in the standard Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_dobldobl_system", py2c_syscon_read_dobldobl_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in double double precision.\n The system will be placed in the dobldobl systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_dobldobl_Laurent_system", + py2c_syscon_read_dobldobl_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in double double precision.\n The system will be placed in the dobldobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_quaddobl_system", py2c_syscon_read_quaddobl_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in quad double precision.\n The system will be placed in the quaddobl systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_quaddobl_Laurent_system", + py2c_syscon_read_quaddobl_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in quad double precision.\n The system will be placed in the quaddobl Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_multprec_system", py2c_syscon_read_multprec_system, + METH_VARARGS, + "Interactive procedure to read a polynomial system with coefficients\n in arbitrary multiprecision. The one input parameter is an integer,\n the number of decimal places in the working precision.\n The system will be placed in the multprec systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_read_multprec_Laurent_system", + py2c_syscon_read_multprec_Laurent_system, METH_VARARGS, + "Interactive procedure to read a Laurent polynomial system with\n coefficients in arbitrary multiprecision. The one input parameter is\n an integer, the number of decimal places in the working precision.\n The system will be placed in the multprec Laurent systems container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_random_system", py2c_syscon_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in standard double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_dobldobl_random_system", + py2c_syscon_dobldobl_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in double double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_quaddobl_random_system", + py2c_syscon_quaddobl_random_system, METH_VARARGS, + "Places in the systems container a random polynomial system\n with coefficients in quad double precision.\n There are five integers as input parameters:\n 1) n, the number of polynomials and variables;\n 2) m, the number of monomials per equation;\n 3) d, the largest degree of each monomial;\n 4) c, the type of coefficient: 0 if on the complex unit circle,\n 1, if all coefficients are one, 2, if all coefficients are\n random floats in [-1,+1];\n 5) neq, the number of polynomials in the system."}, + {"py2c_syscon_write_standard_system", + py2c_syscon_write_standard_system, METH_VARARGS, + "Writes the polynomial system with standard double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_standard_Laurent_system", + py2c_syscon_write_standard_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with standard double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_dobldobl_system", + py2c_syscon_write_dobldobl_system, METH_VARARGS, + "Writes the polynomial system with double double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_dobldobl_Laurent_system", + py2c_syscon_write_dobldobl_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with double double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_quaddobl_system", + py2c_syscon_write_quaddobl_system, METH_VARARGS, + "Writes the polynomial system with quad double precision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_quaddobl_Laurent_system", + py2c_syscon_write_quaddobl_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with quad double precision\n coefficients that is stored in the container."}, + {"py2c_syscon_write_multprec_system", + py2c_syscon_write_multprec_system, METH_VARARGS, + "Writes the polynomial system with arbitrary multiprecision coefficients\n that is stored in the container."}, + {"py2c_syscon_write_multprec_Laurent_system", + py2c_syscon_write_multprec_Laurent_system, METH_VARARGS, + "Writes the Laurent polynomial system with arbitrary multiprecision\n coefficients that is stored in the container."}, + {"py2c_syscon_clear_standard_system", + py2c_syscon_clear_standard_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in standard double precision."}, + {"py2c_syscon_clear_standard_Laurent_system", + py2c_syscon_clear_standard_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in standard double precision."}, + {"py2c_syscon_clear_dobldobl_system", + py2c_syscon_clear_dobldobl_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in double double precision."}, + {"py2c_syscon_clear_dobldobl_Laurent_system", + py2c_syscon_clear_dobldobl_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in double double precision."}, + {"py2c_syscon_clear_quaddobl_system", + py2c_syscon_clear_quaddobl_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in quad double precision."}, + {"py2c_syscon_clear_quaddobl_Laurent_system", + py2c_syscon_clear_quaddobl_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in quad double precision."}, + {"py2c_syscon_clear_multprec_system", + py2c_syscon_clear_multprec_system, METH_VARARGS, + "Deallocates the container for polynomial systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_syscon_clear_multprec_Laurent_system", + py2c_syscon_clear_multprec_Laurent_system, METH_VARARGS, + "Deallocates the container for Laurent polynomial systems\n with coefficients in arbitrary multiprecision."}, + {"py2c_syscon_number_of_symbols", + py2c_syscon_number_of_symbols, METH_VARARGS, + "Returns the number of symbols in the symbol table."}, + {"py2c_syscon_write_symbols", py2c_syscon_write_symbols, METH_VARARGS, + "Writes the symbols in the symbol table to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_syscon_string_of_symbols", + py2c_syscon_string_of_symbols, METH_VARARGS, + "Returns a string that contains the symbols in the symbol table.\n The symbols are separate from each other by one space."}, + {"py2c_syscon_remove_symbol_name", py2c_syscon_remove_symbol_name, + METH_VARARGS, + "Removes a symbol, given by name, from the symbol table.\n On input are two arguments:\n 1) an integer, as the number of characters in the name;\n 2) a string of characters with the name of the symbol.\n The failure code is returned, which equals zero when all went well."}, + {"py2c_syscon_clear_symbol_table", py2c_syscon_clear_symbol_table, + METH_VARARGS, "Clears the symbol table."}, + {"py2c_solcon_read_standard_solutions", + py2c_solcon_read_standard_solutions, METH_VARARGS, + "Interactive function to read the solutions into the container,\n in standard double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_dobldobl_solutions", py2c_solcon_read_dobldobl_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in double double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_quaddobl_solutions", py2c_solcon_read_quaddobl_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in quad double precision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_multprec_solutions", py2c_solcon_read_multprec_solutions, + METH_VARARGS, + "Interactive function to read the solutions into the container,\n in arbitrary multiprecision.\n Returns the failure code, which is zero when all went well."}, + {"py2c_solcon_read_standard_solutions_from_file", + py2c_solcon_read_standard_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in standard double precision.\n Solutions are read from file and stored in the container for\n double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_read_dobldobl_solutions_from_file", + py2c_solcon_read_dobldobl_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in double double precision.\n Solutions are read from file and stored in the container for\n double double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_read_quaddobl_solutions_from_file", + py2c_solcon_read_quaddobl_solutions_from_file, METH_VARARGS, + "The two input arguments are a number and a string:\n 1) The number equals the number of characters in the string.\n 2) The string given on input is the name of a file which contains\n a solution list to be parsed in quad double precision.\n Solutions are read from file and stored in the container for\n quad double precision solutions.\n The failure code is returned, which is zero if all went well."}, + {"py2c_solcon_write_standard_solutions", + py2c_solcon_write_standard_solutions, METH_VARARGS, + "Writes the solutions in standard double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_dobldobl_solutions", + py2c_solcon_write_dobldobl_solutions, METH_VARARGS, + "Writes the solutions in double double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_quaddobl_solutions", + py2c_solcon_write_quaddobl_solutions, METH_VARARGS, + "Writes the solutions in quad double precision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_write_multprec_solutions", + py2c_solcon_write_multprec_solutions, METH_VARARGS, + "Writes the solutions in arbitrary multiprecision to screen.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_standard_solutions", + py2c_solcon_clear_standard_solutions, METH_VARARGS, + "Deallocates the container for solutions in standard double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_dobldobl_solutions", + py2c_solcon_clear_dobldobl_solutions, METH_VARARGS, + "Deallocates the container for solutions in double double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_quaddobl_solutions", + py2c_solcon_clear_quaddobl_solutions, METH_VARARGS, + "Deallocates the container for solutions in quad double precision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_clear_multprec_solutions", + py2c_solcon_clear_multprec_solutions, METH_VARARGS, + "Deallocates the container for solutions in arbitrary multiprecision.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_solcon_open_solution_input_file", + py2c_solcon_open_solution_input_file, METH_VARARGS, + "Prompts the user for the name of the input file for the solutions and\n opens the input file. All subsequent reading happens from this input.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_syscon_number_of_standard_polynomials", + py2c_syscon_number_of_standard_polynomials, + METH_VARARGS, + "Returns the number of polynomials with coefficients in standard\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_dobldobl_polynomials", + py2c_syscon_number_of_dobldobl_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in double\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_quaddobl_polynomials", + py2c_syscon_number_of_quaddobl_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in quad\n double precision as stored in the systems container."}, + {"py2c_syscon_number_of_multprec_polynomials", + py2c_syscon_number_of_multprec_polynomials, METH_VARARGS, + "Returns the number of polynomials with coefficients in arbitrary\n multiprecision as stored in the systems container."}, + {"py2c_syscon_number_of_standard_Laurentials", + py2c_syscon_number_of_standard_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n standard double precision as stored in the systems container."}, + {"py2c_syscon_number_of_dobldobl_Laurentials", + py2c_syscon_number_of_dobldobl_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n double double precision as stored in the systems container."}, + {"py2c_syscon_number_of_quaddobl_Laurentials", + py2c_syscon_number_of_quaddobl_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n quad double precision as stored in the systems container."}, + {"py2c_syscon_number_of_multprec_Laurentials", + py2c_syscon_number_of_multprec_Laurentials, METH_VARARGS, + "Returns the number of Laurent polynomials with coefficients in\n arbitrary multiprecision as stored in the systems container."}, + {"py2c_syscon_initialize_number_of_standard_polynomials", + py2c_syscon_initialize_number_of_standard_polynomials, METH_VARARGS, + "Initializes the container for polynomials with coefficients in\n standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_dobldobl_polynomials", + py2c_syscon_initialize_number_of_dobldobl_polynomials, METH_VARARGS, + "Initializes the container for polynomials with coefficients in\n double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_quaddobl_polynomials", + py2c_syscon_initialize_number_of_quaddobl_polynomials, METH_VARARGS, + "Initializes the container for polynomials with coefficients in\n quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_multprec_polynomials", + py2c_syscon_initialize_number_of_multprec_polynomials, METH_VARARGS, + "Initializes the container for polynomials with coefficients in\n arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_standard_Laurentials", + py2c_syscon_initialize_number_of_standard_Laurentials, METH_VARARGS, + "Initializes the container for Laurent polynomials with coefficients\n in standard double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_dobldobl_Laurentials", + py2c_syscon_initialize_number_of_dobldobl_Laurentials, METH_VARARGS, + "Initializes the container for Laurent polynomials with coefficients\n in double double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_quaddobl_Laurentials", + py2c_syscon_initialize_number_of_quaddobl_Laurentials, METH_VARARGS, + "Initializes the container for Laurent polynomials with coefficients\n in quad double precision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_initialize_number_of_multprec_Laurentials", + py2c_syscon_initialize_number_of_multprec_Laurentials, METH_VARARGS, + "Initializes the container for Laurent polynomials with coefficients\n in arbitrary multiprecision. The input argument is an integer,\n the number of polynomials in the container.\n The failure code is returned, which equals zero if all went well."}, + {"py2c_syscon_degree_of_standard_polynomial", + py2c_syscon_degree_of_standard_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in standard double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_dobldobl_polynomial", + py2c_syscon_degree_of_dobldobl_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in double double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_quaddobl_polynomial", + py2c_syscon_degree_of_quaddobl_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in quad double precision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_degree_of_multprec_polynomial", + py2c_syscon_degree_of_multprec_polynomial, METH_VARARGS, + "Returns the degree of the k-th polynomial in the container for\n polynomials with coefficients in arbitrary multiprecision.\n The index k of the polynomial is the one input argument."}, + {"py2c_syscon_number_of_terms", + py2c_syscon_number_of_terms, METH_VARARGS, + "Returns the number of terms in the k-th polynomial stored in the\n container for systems with coefficients in standard double precision.\n The input parameter k is the index of the polynomial k."}, + {"py2c_syscon_number_of_Laurent_terms", + py2c_syscon_number_of_Laurent_terms, METH_VARARGS, + "Returns the number of terms in the k-th Laurent polynomial stored\n in the container for Laurent polynomials systems with coefficients\n in standard double precision.\n The input parameter k is the index of the polynomial k."}, + {"py2c_syscon_retrieve_term", + py2c_syscon_retrieve_term, METH_VARARGS, + "Retrieves one term of a polynomial with coefficients in standard\n double precision, that is stored in the systems container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_store_standard_polynomial", + py2c_syscon_store_standard_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_Laurent_drop_variable_by_index", + py2c_syscon_standard_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_Laurent_drop_variable_by_name", + py2c_syscon_standard_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the standard double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_Laurent_drop_variable_by_index", + py2c_syscon_dobldobl_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the double double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_Laurent_drop_variable_by_name", + py2c_syscon_dobldobl_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the double double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_Laurent_drop_variable_by_index", + py2c_syscon_quaddobl_Laurent_drop_variable_by_index, METH_VARARGS, + "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that has its k-th variable dropped.\n The index k of the variable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_Laurent_drop_variable_by_name", + py2c_syscon_quaddobl_Laurent_drop_variable_by_name, METH_VARARGS, + "Replaces the Laurent system in the quad double precision container\n with the same Laurent system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_one_homogenization", + py2c_syscon_standard_one_homogenization, METH_VARARGS, + "Replaces the system in the standard double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_dobldobl_one_homogenization", + py2c_syscon_dobldobl_one_homogenization, METH_VARARGS, + "Replaces the system in the double double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_quaddobl_one_homogenization", + py2c_syscon_quaddobl_one_homogenization, METH_VARARGS, + "Replaces the system in the quad double precision container\n with its transformation in 1-homogeneous coordinates.\n There is one integer on input.\n If 0, then a random linear equation is added,\n otherwise, the linear equation z0 - 1 = 0 is added,\n where z0 is the extra homogeneous coordinate."}, + {"py2c_syscon_add_symbol", + py2c_syscon_add_symbol, METH_VARARGS, + "Adds a symbol to the table, with name given in the string,\n where the number of characters in the name equals the first\n integer argument. The second input parameter is the string.\n This symbol represents the last variable added in the homogeneous\n coordinate transformation."}, + {"py2c_syscon_standard_one_affinization", + py2c_syscon_standard_one_affinization, METH_VARARGS, + "Replaces the system in the standard double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_syscon_dobldobl_one_affinization", + py2c_syscon_dobldobl_one_affinization, METH_VARARGS, + "Replaces the system in the double double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_syscon_quaddobl_one_affinization", + py2c_syscon_quaddobl_one_affinization, METH_VARARGS, + "Replaces the system in the quad double precision container\n by its transformation to affine coordinates, substituting the\n value of the last coordinate by one and removing the last equation."}, + {"py2c_tabform_store_standard_tableau", + py2c_tabform_store_standard_tableau, METH_VARARGS, + "On input is the tableau form of a polynomial system, given by\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of characters in the 4-th string input,\n 4) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 5) the number of characters in the 6-th string input,\n 6) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 7) the number of characters in the 7-th string input,\n 8) the exponents of all terms, given as a string,\n the string representation of a list of integers.\n The tableau form is parsed and the container for systems with\n standard double precision coefficients is initialized."}, + {"py2c_tabform_load_standard_tableau", + py2c_tabform_load_standard_tableau, METH_VARARGS, + "Returns a 5-tuple with the tableau form of the system with\n standard double precision coefficients in the container.\n On input is the verbose flag, as an integer.\n The five items in the returned tuple are\n 1) the number of equations as an integer,\n 2) the number of equations as an integer,\n 3) the number of terms in each polynomial, given as a string,\n the string representation of a list of integers,\n 4) the coefficients of all terms, given as a string,\n the string representation of a list of doubles,\n each pair of consecutive doubles represents a complex coefficient,\n 5) the exponents of all terms, given as a string,\n the string representation of a list of integers."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_one_homogenization", + py2c_solcon_standard_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in standard double precision."}, + {"py2c_solcon_dobldobl_one_homogenization", + py2c_solcon_dobldobl_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, + {"py2c_solcon_quaddobl_one_homogenization", + py2c_solcon_quaddobl_one_homogenization, METH_VARARGS, + "Add one extra coordinate one to every solution in the container\n for solutions in double double precision."}, + {"py2c_solcon_standard_one_affinization", + py2c_solcon_standard_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in standard double precision."}, + {"py2c_solcon_dobldobl_one_affinization", + py2c_solcon_dobldobl_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in double double precision."}, + {"py2c_solcon_quaddobl_one_affinization", + py2c_solcon_quaddobl_one_affinization, METH_VARARGS, + "Divides every coordinate by the last coordinate of every solution\n in the container for solutions in quad double precision."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_is_stable", py2c_celcon_is_stable, + METH_VARARGS, "returns 1 if stable mixed cells were stored, 0 otherwise"}, + {"py2c_celcon_number_of_original_cells", + py2c_celcon_number_of_original_cells, + METH_VARARGS, "returns the number of original cells in the cell container"}, + {"py2c_celcon_number_of_stable_cells", + py2c_celcon_number_of_stable_cells, + METH_VARARGS, "returns the number of stable cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_stable_standard_start_system", + py2c_celcon_solve_stable_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_solve_stable_dobldobl_start_system", + py2c_celcon_solve_stable_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_solve_stable_quaddobl_start_system", + py2c_celcon_solve_stable_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th stable mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th stable mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_intcelcon_read_mixed_cell_configuration", + py2c_intcelcon_read_mixed_cell_configuration, METH_VARARGS, + "Reads a mixed-cell configuration"}, + {"py2c_intcelcon_write_mixed_cell_configuration", + py2c_intcelcon_write_mixed_cell_configuration, METH_VARARGS, + "Writes the mixed-cell configuration to screen."}, + {"py2c_intcelcon_number_of_cells", + py2c_intcelcon_number_of_cells, METH_VARARGS, + "Returns the number of cells in the mixed subdivision by integer lifting."}, + {"py2c_intcelcon_type_of_mixture", + py2c_intcelcon_type_of_mixture, METH_VARARGS, + "Returns the type of mixture for the integer cells container."}, + {"py2c_intcelcon_length_of_supports", + py2c_intcelcon_length_of_supports, METH_VARARGS, + "Returns a list of lengths of each support."}, + {"py2c_intcelcon_append_lifted_point", + py2c_intcelcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_intcelcon_get_lifted_point", + py2c_intcelcon_get_lifted_point, METH_VARARGS, + "Returns the string representation of the coordinates of a lifted point."}, + {"py2c_intcelcon_get_inner_normal", + py2c_intcelcon_get_inner_normal, METH_VARARGS, + "Given on input the dimension of the lifted points and the\n index of the mixed cell of interest, returns the string\n representation of the inner normal of the mixed cell."}, + {"py2c_intcelcon_number_of_points_in_cell", + py2c_intcelcon_number_of_points_in_cell, METH_VARARGS, + "Given are two integer numbers: the index to a cell\n (starting the count at one) and the number of different supports.\n On return is the string representation of the number of points\n which span each component of the mixed cell."}, + {"py2c_intcelcon_get_point_in_cell", + py2c_intcelcon_get_point_in_cell, METH_VARARGS, + "Returns the string representation of the n coordinates of\n the k-th point from the j-th list of the i-th cell.\n On input are the four integers: n, i, j, k, respectively\n the length of the lifted vectors in the supports,\n the index to a cell in the container,\n the index to a support of the i-th cell, and\n the index to a point in the j-th support of the i-th cell."}, + {"py2c_intcelcon_mixed_volume", + py2c_intcelcon_mixed_volume, METH_VARARGS, + "Returns the mixed volume of a mixed cell."}, + {"py2c_intcelcon_initialize_supports", + py2c_intcelcon_initialize_supports, METH_VARARGS, + "Initializes the supports with an integer valued lifting."}, + {"py2c_intcelcon_set_type_of_mixture", + py2c_intcelcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the tuple of supports."}, + {"py2c_intcelcon_make_subdivision", + py2c_intcelcon_make_subdivision, METH_VARARGS, + "Computes the cells in the regular subdivision induced by an integer\n valued lifting function."}, + {"py2c_intcelcon_clear_mixed_cell_configuration", + py2c_intcelcon_clear_mixed_cell_configuration, METH_VARARGS, + "Deallocates the data in the integer cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_linear_reduce_standard_system", + py2c_linear_reduce_standard_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for standard double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_linear_reduce_dobldobl_system", + py2c_linear_reduce_dobldobl_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for double double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_linear_reduce_quaddobl_system", + py2c_linear_reduce_quaddobl_system, METH_VARARGS, + "Applies linear reduction on the coefficient matrix of the system\n in the container for quad double precision.\n There is one integer parameter: whether to diagonalize or not."}, + {"py2c_nonlinear_reduce_standard_system", + py2c_nonlinear_reduce_standard_system, METH_VARARGS, + "Applies nonlinear reduction on the system in the container\n for standard double precision.\n Three integer numbers are expected on input:\n (1) the maximum number of equal degree replacements,\n (2) the maximum number of computed S-polynomials,\n (3) the maximum number of computed R-polynomials.\n The system in the standard container is replace by the reduced system.\n Three numbers are returned:\n (1) the number of equal degree replacements,\n (2) the number of computed S-polynomials,\n (3) the number of computed R-polynomials."}, + {"py2c_sweep_define_parameters_numerically", + py2c_sweep_define_parameters_numerically, METH_VARARGS, + "Defines the indices to the variables that serve as parameters\n numerically, that is: via integer indices.\n On entry are three integer numbers and a string.\n The string is a string representation of a Python list of integers,\n The three integers are the number of equations, the number of variables,\n and the number of parameters. The number of variables m includes the\n number of parameters. Then there should be as many as m indices in\n the list of integers to define which of the variables are parameters."}, + {"py2c_sweep_define_parameters_symbolically", + py2c_sweep_define_parameters_symbolically, METH_VARARGS, + "Defines the indices to the variables that serve as parameters\n symbolically, that is, as names of variables.\n For this to work, the symbol table must be initialized.\n On entry are four integer numbers and a string.\n The four integers are the number of equations, the number of variables,\n the number of parameters (the number of variables m includes the\n number of parameters), and the number of characters in the string.\n The string contains the names of the parameters, separated by one comma.\n For this to work, the symbol table must be initialized, e.g.:\n via the reading of a polynomial system."}, + {"py2c_sweep_get_number_of_equations", + py2c_sweep_get_number_of_equations, METH_VARARGS, + "Returns the number of equations in the sweep homotopy."}, + {"py2c_sweep_get_number_of_variables", + py2c_sweep_get_number_of_variables, METH_VARARGS, + "Returns the number of variables in the sweep homotopy."}, + {"py2c_sweep_get_number_of_parameters", + py2c_sweep_get_number_of_parameters, METH_VARARGS, + "Returns the number of parameters in the sweep homotopy."}, + {"py2c_sweep_get_indices_numerically", + py2c_sweep_get_indices_numerically, METH_VARARGS, + "Returns the indices of the variables that are parameters,\n as the string representation of a Python list of integers."}, + {"py2c_sweep_get_indices_symbolically", + py2c_sweep_get_indices_symbolically, METH_VARARGS, + "Returns a string with the names of the parameters,\n each separated by one space."}, + {"py2c_sweep_clear_definitions", + py2c_sweep_clear_definitions, METH_VARARGS, + "Clears the definitions in the sweep homotopy."}, + {"py2c_sweep_set_standard_start", + py2c_sweep_set_standard_start, METH_VARARGS, + "Sets the start values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters.\n The doubles are given in a string representation of a Python\n list of doubles."}, + {"py2c_sweep_set_standard_target", + py2c_sweep_set_standard_target, METH_VARARGS, + "Sets the target values for the m parameters in standard double precision,\n giving on input an integer m and 2*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_set_dobldobl_start", + py2c_sweep_set_dobldobl_start, METH_VARARGS, + "Sets the start values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, + {"py2c_sweep_set_dobldobl_target", + py2c_sweep_set_dobldobl_target, METH_VARARGS, + "Sets the target values for the m parameters in double double precision,\n giving on input an integer m and 4*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_set_quaddobl_start", + py2c_sweep_set_quaddobl_start, METH_VARARGS, + "Sets the start values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the start values of all m parameters."}, + {"py2c_sweep_set_quaddobl_target", + py2c_sweep_set_quaddobl_target, METH_VARARGS, + "Sets the target values for the m parameters in quad double precision,\n giving on input an integer m and 8*m doubles, with the consecutive\n real and imaginary parts for the target values of all m parameters."}, + {"py2c_sweep_get_standard_start", + py2c_sweep_get_standard_start, METH_VARARGS, + "Gets the start values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_standard_target", + py2c_sweep_get_standard_target, METH_VARARGS, + "Gets the target values for the parameters in standard double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_dobldobl_start", + py2c_sweep_get_dobldobl_start, METH_VARARGS, + "Gets the start values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_dobldobl_target", + py2c_sweep_get_dobldobl_target, METH_VARARGS, + "Gets the target values for the parameters in double double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_quaddobl_start", + py2c_sweep_get_quaddobl_start, METH_VARARGS, + "Gets the start values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the start values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_get_quaddobl_target", + py2c_sweep_get_quaddobl_target, METH_VARARGS, + "Returns the target values for the parameters in quad double precision,\n giving on input the number n of doubles that need to be returned.\n On return will be n doubles, for the consecutive real and imaginary\n parts for the target values of all parameters,\n stored in the string representation of a Python list of doubles."}, + {"py2c_sweep_standard_complex_run", + py2c_sweep_standard_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in standard double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in standard double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_dobldobl_complex_run", + py2c_sweep_dobldobl_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in double double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in double double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_quaddobl_complex_run", + py2c_sweep_quaddobl_complex_run, METH_VARARGS, + "Starts the trackers in a complex convex parameter homotopy,\n in quad double precision, where the indices to the parameters,\n start and target values are already defined. Moreover, the containers\n of systems and solutions in quad double precision have been\n initialized with a parametric systems and start solutions.\n The first input parameter is 0, 1, or 2, for respectively\n a randomly generated gamma (0), or no gamma (1), or a user given\n gamma with real and imaginary parts given in 2 pointers to doubles."}, + {"py2c_sweep_standard_real_run", + py2c_sweep_standard_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in standard double\n precision and the corresponding start solutions in the standard solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_sweep_dobldobl_real_run", + py2c_sweep_dobldobl_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in double double\n precision and the corresponding start solutions in the dobldobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_sweep_quaddobl_real_run", + py2c_sweep_quaddobl_real_run, METH_VARARGS, + "There are no input arguments to this routine.\n Starts a sweep with a natural parameter in a family of n equations\n in n+1 variables, where the last variable is the artificial parameter s\n that moves the one natural parameter from a start to target value.\n The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]),\n where A is the natural parameter, going from the start value v[0]\n to the target value v[1].\n This family must be stored in the systems container in quad double\n precision and the corresponding start solutions in the quaddobl solutions\n container, where every solution has the value v[0] for the A variable.\n The sweep stops when s reaches the value v[1], or when a singularity\n is encountered on the path."}, + {"py2c_standard_multiplicity_structure", + py2c_standard_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in standard double precision.\n Required is the presence of a polynomial system in the standard\n systems container and a solution in the standard solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_dobldobl_multiplicity_structure", + py2c_dobldobl_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in double double precision.\n Required is the presence of a polynomial system in the dobldobl\n systems container and a solution in the dobldobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_quaddobl_multiplicity_structure", + py2c_quaddobl_multiplicity_structure, METH_VARARGS, + "Computes the multiplicity structure in quad double precision.\n Required is the presence of a polynomial system in the quaddobl\n systems container and a solution in the quaddobl solutions container.\n The input parameters are two integers and one double:\n order : the maximum differentiation order,\n verbose : 1 for verbose, 0 for silent, and\n tol : tolerance on the numerical rank.\n On return is a tuple: the multiplicity and the values\n of the Hilbert function."}, + {"py2c_numbtrop_standard_initialize", + py2c_numbtrop_standard_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in standard double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_dobldobl_initialize", + py2c_numbtrop_dobldobl_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in double double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_quaddobl_initialize", + py2c_numbtrop_quaddobl_initialize, METH_VARARGS, + "Initializes the numerical tropisms container,\n in quad double precision. The input parameters are\n nbt : number of tropisms;\n dim : length_of_each tropism;\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n The numbers in wnd, dir, and err must be given in one string,\n as the string representation of a list of doubles.\n On return is the the failure code, which equals zero if all went well."}, + {"py2c_numbtrop_standard_retrieve", + py2c_numbtrop_standard_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in standard double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_dobldobl_retrieve", + py2c_numbtrop_dobldobl_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in double double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 2*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 2*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_quaddobl_retrieve", + py2c_numbtrop_quaddobl_retrieve, METH_VARARGS, + "Retrieves all tropisms stored in quad double precision.\n The input parameters are two integers:\n nbt : number of tropisms;\n dim : length_of_each tropism.\n On return are\n wnd : winding numbers, as many as nbt;\n dir : 4*nbt*dim doubles with the coordinates of the tropisms;\n err : errors on the tropisms, as many doubles as the value of 4*nbt.\n All numbers are returns in one string, as the string representation\n of a list of doubles.\n The failure code, which equals zero if all went well."}, + {"py2c_numbtrop_standard_size", py2c_numbtrop_standard_size, METH_VARARGS, + "Returns the number of tropisms, stored in standard double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_dobldobl_size", py2c_numbtrop_dobldobl_size, METH_VARARGS, + "Returns the number of tropisms, stored in double double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_quaddobl_size", py2c_numbtrop_quaddobl_size, METH_VARARGS, + "Returns the number of tropisms, stored in quad double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_standard_dimension", + py2c_numbtrop_standard_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in standard double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_dobldobl_dimension", + py2c_numbtrop_dobldobl_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in double double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_quaddobl_dimension", + py2c_numbtrop_quaddobl_dimension, METH_VARARGS, + "Returns the dimension of the tropisms, stored in quad double\n precision, in the numerical tropisms container."}, + {"py2c_numbtrop_store_standard_tropism", + py2c_numbtrop_store_standard_tropism, METH_VARARGS, + "Stores a tropism given in standard double precision.\n The first three input parmeters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by standard_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are given in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_store_dobldobl_tropism", + py2c_numbtrop_store_dobldobl_tropism, METH_VARARGS, + "Stores a tropism given in double double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by dobldobl_size;\n wnd : estimated winding number;\n The other input parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are given in one string,\n the string representatin of a list of doubles."}, + {"py2c_numbtrop_store_quaddobl_tropism", + py2c_numbtrop_store_quaddobl_tropism, METH_VARARGS, + "Stores a tropism given in quad double precision.\n The first three input parameters are integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by quaddobl_size;\n The other input parameters are of type double:\n wnd : estimated winding number;\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four double\n All 4*dim+4 doubles are given in one string,\n the string representatin of a list of doubles."}, + {"py2c_numbtrop_standard_retrieve_tropism", + py2c_numbtrop_standard_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in standard double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_standard_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as dim;\n err : the error on the tropism.\n All dim+1 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_dobldobl_retrieve_tropism", + py2c_numbtrop_dobldobl_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in double double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_dobldobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 2*dim;\n err : the error on the tropism, two doubles.\n All 2*dim+2 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_quaddobl_retrieve_tropism", + py2c_numbtrop_quaddobl_retrieve_tropism, METH_VARARGS, + "Returns one tropism, stored in quad double precision.\n The input parameters are two integers:\n dim : the length of the tropism vector;\n idx : the index of the tropism, indexing starts at one,\n and ends at nbt, what is returned by numbtrop_quaddobl_size.\n The first parameter on return is an integer:\n wnd : estimated winding number;\n The other output parameters are of type double:\n dir : coordinates of the tropisms, as many as 4*dim;\n err : the error on the tropism, four doubles.\n All 4*dim+4 doubles are returned in one string,\n the string representation of a list of doubles."}, + {"py2c_numbtrop_standard_clear", py2c_numbtrop_standard_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in standard double precision."}, + {"py2c_numbtrop_dobldobl_clear", py2c_numbtrop_dobldobl_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in double double precision."}, + {"py2c_numbtrop_quaddobl_clear", py2c_numbtrop_quaddobl_clear, METH_VARARGS, + "Deallocates the stored numerically computed tropisms,\n computed in quad double precision."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system in the container with its embedding of dimension d.\n The dimension d is given as the first integer parameter on input.\n The second integer parameter indicates the precision, either 0, 1, or 2,\n respectively for double, double double, or quad double precision.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_standard_system", py2c_embed_standard_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_dobldobl_system", py2c_embed_dobldobl_system, METH_VARARGS, + "Replaces the system with coefficients in double double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_quaddobl_system", py2c_embed_quaddobl_system, METH_VARARGS, + "Replaces the system with coefficients in quad double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_standard_Laurent_system", + py2c_embed_standard_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in standard double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_dobldobl_Laurent_system", + py2c_embed_dobldobl_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in double double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_embed_quaddobl_Laurent_system", + py2c_embed_quaddobl_Laurent_system, METH_VARARGS, + "Replaces the Laurent system with coefficients in quad double\n precision in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_swap_symbols_for_standard_witness_set", + py2c_swap_symbols_for_standard_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_dobldobl_witness_set", + py2c_swap_symbols_for_dobldobl_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_quaddobl_witness_set", + py2c_swap_symbols_for_quaddobl_witness_set, METH_VARARGS, + "Permutes the slack variables in the polynomial system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_standard_Laurent_witness_set", + py2c_swap_symbols_for_standard_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with standard\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_dobldobl_Laurent_witness_set", + py2c_swap_symbols_for_dobldobl_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with double\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_swap_symbols_for_quaddobl_Laurent_witness_set", + py2c_swap_symbols_for_quaddobl_Laurent_witness_set, METH_VARARGS, + "Permutes the slack variables in the Laurent system with quad\n double precision coefficients and its corresponding solutions in the\n containers so the slack variables appear at the end. On input are\n two integers: the total number of variables; and\n the number of slack variables, or the dimension of the set.\n This permutation is necessary to consider the system and solutions\n stored in containers as a witness set."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Laurent_cascade_homotopy", + py2c_standard_Laurent_cascade_homotopy, METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Laurent_cascade_homotopy", + py2c_dobldobl_Laurent_cascade_homotopy, METH_VARARGS, + " Creates a homotopy in double double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Laurent_cascade_homotopy", + py2c_quaddobl_Laurent_cascade_homotopy, METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n Laurent systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_standard_to_mute", + py2c_factor_set_standard_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in standard double\n precision to silent."}, + {"py2c_factor_set_dobldobl_to_mute", + py2c_factor_set_dobldobl_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in double double\n precision to silent."}, + {"py2c_factor_set_quaddobl_to_mute", + py2c_factor_set_quaddobl_to_mute, METH_VARARGS, + "Sets the state of monodromy permutations in quad double\n precision to silent."}, + {"py2c_factor_set_standard_to_verbose", + py2c_factor_set_standard_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in standard double\n precision to verbose."}, + {"py2c_factor_set_dobldobl_to_verbose", + py2c_factor_set_dobldobl_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in double double\n precision to verbose."}, + {"py2c_factor_set_quaddobl_to_verbose", + py2c_factor_set_quaddobl_to_verbose, METH_VARARGS, + "Sets the state of monodromy permutations in quad double\n precision to verbose."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_standard_assign_labels", + py2c_factor_standard_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_dobldobl_assign_labels", + py2c_factor_dobldobl_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in double double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_quaddobl_assign_labels", + py2c_factor_quaddobl_assign_labels, METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in quad double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_standard_sampler", + py2c_factor_initialize_standard_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in standard double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_dobldobl_sampler", + py2c_factor_initialize_dobldobl_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in double double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_quaddobl_sampler", + py2c_factor_initialize_quaddobl_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by an ordinary polynomial system in quad double precision.\n The embedded system is taken from the polynomial systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_standard_Laurent_sampler", + py2c_factor_initialize_standard_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in standard double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_dobldobl_Laurent_sampler", + py2c_factor_initialize_dobldobl_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in double double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_quaddobl_Laurent_sampler", + py2c_factor_initialize_quaddobl_Laurent_sampler, METH_VARARGS, + "Initializes the sampling machine with a witness set,\n defined by a Laurent polynomial system in quad double precision.\n The embedded system is taken from the Laurent systems container\n and the generic points from the solutions container.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_standard_monodromy", + py2c_factor_initialize_standard_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in standard double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_initialize_dobldobl_monodromy", + py2c_factor_initialize_dobldobl_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in double double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_initialize_quaddobl_monodromy", + py2c_factor_initialize_quaddobl_monodromy, METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d,\n in quad double precision.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_standard_trace_grid_diagnostics", + py2c_factor_standard_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in standard double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_dobldobl_trace_grid_diagnostics", + py2c_factor_dobldobl_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in double double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_quaddobl_trace_grid_diagnostics", + py2c_factor_quaddobl_trace_grid_diagnostics, METH_VARARGS, + "Returns a tuple of two doubles with the diagnostics on the\n trace grid computed in quad double precision.\n The first double is the largest error of the samples.\n The second double is the smallest distance between two samples."}, + {"py2c_factor_store_standard_solutions", + py2c_factor_store_standard_solutions, METH_VARARGS, + "Stores the solutions in the container, in standard double precision,\n to the data for monodromy loops."}, + {"py2c_factor_store_dobldobl_solutions", + py2c_factor_store_dobldobl_solutions, METH_VARARGS, + "Stores the solutions in the container, in double double precision,\n to the data for monodromy loops."}, + {"py2c_factor_store_quaddobl_solutions", + py2c_factor_store_quaddobl_solutions, METH_VARARGS, + "Stores the solutions in the container, in quad double precision,\n to the data for monodromy loops."}, + {"py2c_factor_restore_standard_solutions", + py2c_factor_restore_standard_solutions, METH_VARARGS, + "Restores the first initialized solutions, in standard double precision,\n from sampler to the container."}, + {"py2c_factor_restore_dobldobl_solutions", + py2c_factor_restore_dobldobl_solutions, METH_VARARGS, + "Restores the first initialized solutions, in double double precision,\n from sampler to the container."}, + {"py2c_factor_restore_quaddobl_solutions", + py2c_factor_restore_quaddobl_solutions, METH_VARARGS, + "Restores the first initialized solutions, in quad double precision,\n from sampler to the container."}, + {"py2c_factor_standard_track_paths", + py2c_factor_standard_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in standard double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_dobldobl_track_paths", + py2c_factor_dobldobl_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in double double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_quaddobl_track_paths", + py2c_factor_quaddobl_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set,\n in quad double precision.\n On input is an integer, which must be 1 if the witness set is\n defined by a Laurent polynomial system.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_standard_slices", + py2c_factor_swap_standard_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in standard double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_dobldobl_slices", + py2c_factor_swap_dobldobl_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in double double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_quaddobl_slices", + py2c_factor_swap_quaddobl_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back, in quad double precision.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_standard_slices", + py2c_factor_new_standard_slices, METH_VARARGS, + "Generates k random slides in n-space, in standard double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_dobldobl_slices", + py2c_factor_new_dobldobl_slices, METH_VARARGS, + "Generates k random slides in n-space, in double double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_quaddobl_slices", + py2c_factor_new_quaddobl_slices, METH_VARARGS, + "Generates k random slides in n-space, in quad double precision.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_standard_trace_slice", + py2c_factor_set_standard_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in standard double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_set_dobldobl_trace_slice", + py2c_factor_set_dobldobl_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in double double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_set_quaddobl_trace_slice", + py2c_factor_set_quaddobl_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice,\n in quad double precision.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_standard_gammas", + py2c_factor_store_standard_gammas, METH_VARARGS, + "Stores the gamma constants in standard double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_dobldobl_gammas", + py2c_factor_store_dobldobl_gammas, METH_VARARGS, + "Stores the gamma constants in double double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_quaddobl_gammas", + py2c_factor_store_quaddobl_gammas, METH_VARARGS, + "Stores the gamma constants in quad double precision\n for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_standard_loop", + py2c_factor_permutation_after_standard_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in standard double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_permutation_after_dobldobl_loop", + py2c_factor_permutation_after_dobldobl_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in double double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_permutation_after_quaddobl_loop", + py2c_factor_permutation_after_quaddobl_loop, METH_VARARGS, + "For a set of degree d, computes the permutation using the solutions\n most recently stored, after a loop in quad double precision.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_standard_decomposition", + py2c_factor_update_standard_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in standard double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_update_dobldobl_decomposition", + py2c_factor_update_dobldobl_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in double double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_update_quaddobl_decomposition", + py2c_factor_update_quaddobl_decomposition, METH_VARARGS, + "Updates the decomposition with the given permutation of d elements,\n computed in quad double precision.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_standard_components", + py2c_factor_number_of_standard_components, METH_VARARGS, + "Returns the number of irreducible factors in the current standard double\n precision decomposition of the witness set."}, + {"py2c_factor_number_of_dobldobl_components", + py2c_factor_number_of_dobldobl_components, METH_VARARGS, + "Returns the number of irreducible factors in the current double double\n precision decomposition of the witness set."}, + {"py2c_factor_number_of_quaddobl_components", + py2c_factor_number_of_quaddobl_components, METH_VARARGS, + "Returns the number of irreducible factors in the current quad double\n precision decomposition of the witness set."}, + {"py2c_factor_witness_points_of_standard_component", + py2c_factor_witness_points_of_standard_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in standard double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_witness_points_of_dobldobl_component", + py2c_factor_witness_points_of_dobldobl_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in double double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_witness_points_of_quaddobl_component", + py2c_factor_witness_points_of_quaddobl_component, METH_VARARGS, + "Returns a string which represents an irreducible component,\n computed in quad double precision.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_standard_trace_sum_difference", + py2c_factor_standard_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in standard double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_factor_dobldobl_trace_sum_difference", + py2c_factor_dobldobl_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in double double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_factor_quaddobl_trace_sum_difference", + py2c_factor_quaddobl_trace_sum_difference, METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum, computed in quad double precision.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witset_standard_membertest", + py2c_witset_standard_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_membertest", + py2c_witset_dobldobl_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\nin double double precision.\n The containers in double double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_membertest", + py2c_witset_quaddobl_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by an ordinary polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n polynomial system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_Laurent_membertest", + py2c_witset_standard_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in standard double precision.\n The containers in standard double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 2*nvr doubles for the real and imaginary parts of the\n standard double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_Laurent_membertest", + py2c_witset_dobldobl_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in double double precision.\n The containers in double double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 4*nvr doubles for the real and imaginary parts of the\n double double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_Laurent_membertest", + py2c_witset_quaddobl_Laurent_membertest, METH_VARARGS, + "Executes the homotopy membership test for a point to belong to\n a witness set defined by a Laurent polynomial system\n in quad double precision.\n The containers in quad double precision must contain the embedded\n Laurent system and its corresponding solutions for the witness set\n of a positive dimensional solution set.\n On entry are the seven parameters, the first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of the point as a list with as\n many as 8*nvr doubles for the real and imaginary parts of the\n quad double precision coordinates of the test point.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_ismember", + py2c_witset_standard_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_ismember", + py2c_witset_dobldobl_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_ismember", + py2c_witset_quaddobl_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by an ordinary polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_standard_Laurent_ismember", + py2c_witset_standard_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in standard double precision,\n where the test point is given as a string in PHCpack format.\n The containers in standard double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_dobldobl_Laurent_ismember", + py2c_witset_dobldobl_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in double double precision,\n where the test point is given as a string in PHCpack format.\n The containers in double double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_witset_quaddobl_Laurent_ismember", + py2c_witset_quaddobl_Laurent_ismember, METH_VARARGS, + "Runs the homotopy membership test for a point to belong to a witness set\n defined by a Laurent polynomial system in quad double precision,\n where the test point is given as a string in PHCpack format.\n The containers in quad double precision must contain the\n embedded Laurent system and the corresponding generic points.\n On entry are seven parameters. The first four are integers:\n 1) vrb, an integer flag (0 or 1) for the verbosity of the test,\n 2) nvr, the ambient dimension, number of coordinates of the point,\n 3) dim, the dimension of the witness set,\n 4) nbc, the number of characters in the string representing the point,\n the test point is represented as a solution string in symbolic format,\n including the symbols for the variables, before the coordinates;\n the next two parameters are two doubles:\n 5) restol, tolerance on the residual for the valuation of the point,\n 6) homtol, tolerance on the homotopy membership test for the point;\n and the last parameter is a string:\n 7) tpt, the string representation of a solution which contains\n the coordinates of the test point in symbolic format.\n On return are three 0/1 integers, to be interpreted as booleans:\n 1) fail, the failure code of the procedure,\n 2) onsys, 0 if the evaluation test failed, 1 if success,\n 3) onset, 0 if not a member of the witness set, 1 if a member."}, + {"py2c_standard_witset_of_hypersurface", + py2c_standard_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_witset_of_hypersurface", + py2c_dobldobl_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_witset_of_hypersurface", + py2c_quaddobl_witset_of_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the ordinary polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of an ordinary polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_witset_of_Laurent_hypersurface", + py2c_standard_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in standard double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_witset_of_Laurent_hypersurface", + py2c_dobldobl_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in double double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_witset_of_Laurent_hypersurface", + py2c_quaddobl_witset_of_Laurent_hypersurface, METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container\n in quad double precision on return contain a witness set for\n the hypersurface defined by the Laurent polynomial in p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a Laurent polynomial in several\n variables, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_diagonal_homotopy", py2c_standard_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in standard double precision, define the witness sets for\n these two solution sets."}, + {"py2c_dobldobl_diagonal_homotopy", py2c_dobldobl_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in double double precision, define the witness sets for\n these two solution sets."}, + {"py2c_quaddobl_diagonal_homotopy", py2c_quaddobl_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container,\n in quad double precision, define the witness sets for\n these two solution sets."}, + {"py2c_standard_diagonal_cascade_solutions", + py2c_standard_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in standard double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_dobldobl_diagonal_cascade_solutions", + py2c_dobldobl_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in double double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_quaddobl_diagonal_cascade_solutions", + py2c_quaddobl_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b,\n in quad double precision.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_diagonal_symbols_doubler", + py2c_diagonal_symbols_doubler, METH_VARARGS, + "Doubles the number of symbols in the symbol table to enable the\n writing of the target system to string properly when starting the\n cascade of a diagonal homotopy in extrinsic coordinates.\n On input are three integers, n, d, nc, and one string s.\n On input are n, the ambient dimension = #variables before the embedding,\n d is the number of slack variables, or the dimension of the first set,\n and in s (nc characters) are the symbols for the first witness set.\n This function takes the symbols in s and combines those symbols with\n those in the current symbol table for the second witness set stored\n in the standard systems container. On return, the symbol table\n contains then all symbols to write the top system in the cascade\n to start the diagonal homotopy."}, + {"py2c_standard_collapse_diagonal", + py2c_standard_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for standard doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_collapse_diagonal", + py2c_dobldobl_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for double doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_collapse_diagonal", + py2c_quaddobl_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers for quad doubles. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_polysys_solve", + py2c_standard_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_standard_laursys_solve", + py2c_standard_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the standard systems container. Runs in standard double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_dobldobl_polysys_solve", + py2c_dobldobl_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_dobldobl_laursys_solve", + py2c_dobldobl_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the dobldobl systems container. Runs in double double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_quaddobl_polysys_solve", + py2c_quaddobl_polysys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_quaddobl_laursys_solve", + py2c_quaddobl_laursys_solve, METH_VARARGS, + "Runs the cascades of homotopies on the Laurent polynomial system in\n the quaddobl systems container. Runs in quad double precision.\n On input are five integers :\n 1) nbtasks equals the number of tasks for multitasking,\n 2) topdim is the top dimension to start the homotopy cascades,\n 3) filter is a 0 or 1 flag to filter the witness supersets,\n 4) factor is a 0 or 1 flag to factor the witness sets,\n 5) verbose is a flag for intermediate output."}, + {"py2c_copy_standard_polysys_witset", + py2c_copy_standard_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_standard_laursys_witset", + py2c_copy_standard_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in standard double precision. REQUIRED :\n 1) py2c_standard_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_dobldobl_polysys_witset", + py2c_copy_dobldobl_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_dobldobl_laursys_witset", + py2c_copy_dobldobl_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in double double precision. REQUIRED :\n 1) py2c_dobldobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_quaddobl_polysys_witset", + py2c_copy_quaddobl_polysys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_polysys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_copy_quaddobl_laursys_witset", + py2c_copy_quaddobl_laursys_witset, METH_VARARGS, + "There is one integer parameter dim on input,\n which represents the dimension of the witness set.\n Copies the witness set representation for a solution set\n of dimension dim into the Laurent systems and solutions container,\n in quad double precision. REQUIRED :\n 1) py2c_quaddobl_laursys_solve was executed successfully, and\n 2) dim is in the range 0..topdim."}, + {"py2c_clear_standard_witsols", + py2c_clear_standard_witsols, METH_VARARGS, + "Clears the witness solutions in standard double precision."}, + {"py2c_clear_dobldobl_witsols", + py2c_clear_dobldobl_witsols, METH_VARARGS, + "Clears the witness solutions in double double precision."}, + {"py2c_clear_quaddobl_witsols", + py2c_clear_quaddobl_witsols, METH_VARARGS, + "Clears the witness solutions in quad double precision."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_standard_littlewood_richardson_homotopies", + py2c_schubert_standard_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in standard double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_dobldobl_littlewood_richardson_homotopies", + py2c_schubert_dobldobl_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in double double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in double double precision and the\n corresponding solutions are in the dobldobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_quaddobl_littlewood_richardson_homotopies", + py2c_schubert_quaddobl_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space,\n in quad double precision.\n The polynomial system that was solved is in the container for\n systems with coefficients in quad double precision and the\n corresponding solutions are in the quaddobl solutions container.\n On entry are seven integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: if 0, then no intermediate output is written,\n if 1, then the resolution is dispayed on screen;\n 7) the flag verify: if 0, then no diagnostic verification is done,\n if 1, then diagnostic verification is written to file;\n 8) the flag minrep: if 0, then all minors are used in the system,\n if 1, then a minimal representation of the problem is used;\n 9) the flag tosquare: if 0, then Gauss-Newton path trackers run,\n if 1, then the overdetermined systems are squared;\n 10) nbchar, the number of characters in the string filename;\n 11) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_standard_Newton_series", py2c_standard_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_series", py2c_dobldobl_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_series", py2c_quaddobl_Newton_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Newton_power_series", + py2c_standard_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the standard systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Newton_power_series", + py2c_dobldobl_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the dobldobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Newton_power_series", + py2c_quaddobl_Newton_power_series, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the quaddobl systems pool the\n leading terms of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision. There are four integers on input:\n 1) the index of the series parameter;\n 2) the maximal degree of the series;\n 3) the number of Newton steps to be done on each solution;\n 4) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_Pade_approximant", + py2c_standard_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in standard double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in standard double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the standard systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_Pade_approximant", + py2c_dobldobl_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in double double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in double double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the dobldobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_Pade_approximant", + py2c_quaddobl_Pade_approximant, METH_VARARGS, + "Given in the systems container a polynomial system with coefficients\n in quad double precision, and in the solutions container the\n leading coefficients of the power series, this function runs Newton's\n method to compute power series solutions of the system in the container,\n in quad double precision, followed by the construction of the\n Pade approximants, for each solution. There are five integers on input:\n 1) the index of the series parameter;\n 2) the degree of the numerator of the Pade approximant;\n 3) the degree of the denominator of the Pade approximant;\n 4) the number of Newton steps to be done on each solution;\n 5) a 0/1-flag to indicate whether additional diagnostic output needs\n to be written to screen.\n The Pade approximants are stored in the quaddobl systems pool,\n numerators in the odd indexed entries and denominators in the entries\n with even index in each system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_padcon_set_default_parameters", + py2c_padcon_set_default_parameters, METH_VARARGS, + "Sets the default values of the homotopy continuation parameters."}, + {"py2c_padcon_clear_parameters", + py2c_padcon_clear_parameters, METH_VARARGS, + "Deallocates the allocated space for the parameters."}, + {"py2c_padcon_get_homotopy_continuation_parameter", + py2c_padcon_get_homotopy_continuation_parameter, METH_VARARGS, + "Returns the value of the k-th continuation parameter,\n if k ranges between 1 and 13. The integer k is given on entry."}, + {"py2c_padcon_set_homotopy_continuation_gamma", + py2c_padcon_set_homotopy_continuation_gamma, METH_VARARGS, + "The gamma constant is the first homotopy continuation parameter.\n The gamma is a complex number and it should be given as two\n doubles, as its real and imaginary part respectively."}, + {"py2c_padcon_set_homotopy_continuation_parameter", + py2c_padcon_set_homotopy_continuation_parameter, METH_VARARGS, + "Sets the value of the k-th continuation parameter to the given value.\n The first parameter k is an integer number between 2 and 13.\n The second parameter is the value of the k-th parameter,\n parsed as a floating point number."}, + {"py2c_padcon_standard_track", + py2c_padcon_standard_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in standard double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_dobldobl_track", + py2c_padcon_dobldobl_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in double double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_quaddobl_track", + py2c_padcon_quaddobl_track, METH_VARARGS, + "For the defined target, start system, and start solutions,\n launches the Pade continuation in quad double precision.\n Seven input parameters are expected:\n 1) the number of characters in the name of the output file;\n 2) a string which defines the name of the output file,\n if the string is empty, then no file is created;\n 3) a flag to indicate whether the output file is the defined output file\n (value 1 of the flag), or whether the file is local (value 0);\n 4) an integer for the verbose flag, if zero, then no extra\n information is written to file or screen;\n 5) an integer for the homogenization, if zero, tracking happens in\n affine space, if one, then tracking happens in 1-projective space,\n if m, for m > 1, then multihomogenization is applied;\n 6) an integer for the number of variables, 0 if the fifth parameter m\n is zero or one;\n 7) a string with the index representation for the partition of the\n set of variables, if the fifth parameter m is larger than one."}, + {"py2c_padcon_standard_initialize_homotopy", + py2c_padcon_standard_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in standard double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_initialize_homotopy", + py2c_padcon_dobldobl_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in double double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_initialize_homotopy", + py2c_padcon_quaddobl_initialize_homotopy, METH_VARARGS, + "For the defined target and start system,\n initializes the homotopy in quad double precision,\n for the step-by-step Pade continuation.\n On entry is one parameter, the verbose flag which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_initialize_parameter_homotopy", + py2c_padcon_standard_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n standard double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_initialize_parameter_homotopy", + py2c_padcon_dobldobl_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n double double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_initialize_parameter_homotopy", + py2c_padcon_quaddobl_initialize_parameter_homotopy, METH_VARARGS, + "On entry are two integers: 1) the index for the continuation\n parameter in the natural homotopy and 2) the verbose flag.\n With the system, defined as target system, and the index\n for the continuation parameter, initializes the homotopy in\n quad double precision for the step-by-step Pade continuation.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_standard_solution", + py2c_padcon_initialize_standard_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n standard double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_dobldobl_solution", + py2c_padcon_initialize_dobldobl_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n double double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_initialize_quaddobl_solution", + py2c_padcon_initialize_quaddobl_solution, METH_VARARGS, + "Takes the solution with a given index in the solutions container in\n quad double precision and initializes the series-Pade tracker.\n On entry are two integers: 1) the index of the position of the solution\n in the container and 2) the verbose flag, which is zero or one.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_predict_correct", + py2c_padcon_standard_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in standard double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_dobldobl_predict_correct", + py2c_padcon_dobldobl_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in double double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_quaddobl_predict_correct", + py2c_padcon_quaddobl_predict_correct, METH_VARARGS, + "Executes one predict-correct step on the current solution and\n the defined homotopy in quad double precision.\n On entry is one integer, the verbose flag which is zero or one.\n On return is the failure code of the predict-correct step:\n if zero, then the required accuracies were met,\n otherwise, either the predict or the correct step failed.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_standard_solution", + py2c_padcon_get_standard_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in standard double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_dobldobl_solution", + py2c_padcon_get_dobldobl_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in double double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_get_quaddobl_solution", + py2c_padcon_get_quaddobl_solution, METH_VARARGS, + "On entry are two integer parameters: 1) the index of the position of\n the solution and 2) the verbose flag, which is zero or one.\n Retrieves the current solution and places it at the given position\n in the solutions container in quad double precision.\n If the verbose flag is 1, then extra output will be written."}, + {"py2c_padcon_standard_pole_radius", + py2c_padcon_standard_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in standard double precision."}, + {"py2c_padcon_dobldobl_pole_radius", + py2c_padcon_dobldobl_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in double double precision.\n The returned number is the high part of the double double number."}, + {"py2c_padcon_quaddobl_pole_radius", + py2c_padcon_quaddobl_pole_radius, METH_VARARGS, + "Returns the smallest pole radius computed\n by the predictor in quad double precision.\n The returned number is the highest part of the quad double number."}, + {"py2c_padcon_standard_closest_pole", + py2c_padcon_standard_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in standard double precision.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_dobldobl_closest_pole", + py2c_padcon_dobldobl_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in double double precision.\n The returned numbers are the high parts of the double doubles.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_quaddobl_closest_pole", + py2c_padcon_quaddobl_closest_pole, METH_VARARGS, + "Returns the complex number representation of the closest pole,\n computed by the predictor in quad double precision.\n The returned numbers are the highest parts of the quad doubles.\n Results are meaningful only if the real part >= 0.0."}, + {"py2c_padcon_standard_t_value", + py2c_padcon_standard_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in standard double precision."}, + {"py2c_padcon_dobldobl_t_value", + py2c_padcon_dobldobl_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in double double precision."}, + {"py2c_padcon_quaddobl_t_value", + py2c_padcon_quaddobl_t_value, METH_VARARGS, + "Returns the current t value of the path tracker\n which runs in quad double precision."}, + {"py2c_padcon_standard_step_size", + py2c_padcon_standard_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in standard double precision."}, + {"py2c_padcon_dobldobl_step_size", + py2c_padcon_dobldobl_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in double double precision."}, + {"py2c_padcon_quaddobl_step_size", + py2c_padcon_quaddobl_step_size, METH_VARARGS, + "Returns the current step size of the path tracker\n which runs in quad double precision."}, + {"py2c_padcon_standard_series_step", + py2c_padcon_standard_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_series_step", + py2c_padcon_dobldobl_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_series_step", + py2c_padcon_quaddobl_series_step, METH_VARARGS, + "Returns the current series step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_pole_step", + py2c_padcon_standard_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_pole_step", + py2c_padcon_dobldobl_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_pole_step", + py2c_padcon_quaddobl_pole_step, METH_VARARGS, + "Returns the current pole step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_estimated_distance", + py2c_padcon_standard_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_estimated_distance", + py2c_padcon_dobldobl_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_estimated_distance", + py2c_padcon_quaddobl_estimated_distance, METH_VARARGS, + "Returns the estimated distance to the closest solution by the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_hessian_step", + py2c_padcon_standard_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in standard double precision."}, + {"py2c_padcon_dobldobl_hessian_step", + py2c_padcon_dobldobl_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in double double precision."}, + {"py2c_padcon_quaddobl_hessian_step", + py2c_padcon_quaddobl_hessian_step, METH_VARARGS, + "Returns the current Hessian step size of the path tracker which runs in quad double precision."}, + {"py2c_padcon_standard_series_coefficient", + py2c_padcon_standard_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx,\n of the series computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_series_coefficient", + py2c_padcon_dobldobl_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_series_coefficient", + py2c_padcon_quaddobl_series_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of component with leadidx at position idx, of the\n series computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_numerator_coefficient", + py2c_padcon_standard_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_numerator_coefficient", + py2c_padcon_dobldobl_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_numerator_coefficient", + py2c_padcon_quaddobl_numerator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of the numerator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_denominator_coefficient", + py2c_padcon_standard_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double precision.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_denominator_coefficient", + py2c_padcon_dobldobl_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in double double precision.\n The doubles are the highest parts of the double doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_quaddobl_denominator_coefficient", + py2c_padcon_quaddobl_denominator_coefficient, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the series\n coefficient of the denominator of the Pade approximant,\n at the component with leadidx at position idx,\n computed by the predictor in quad double precision.\n The doubles are the highest parts of the quad doubles.\n The integers leadidx and idx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_standard_pole", py2c_padcon_standard_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag."}, + {"py2c_padcon_dobldobl_pole", py2c_padcon_dobldobl_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in double double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the double doubles."}, + {"py2c_padcon_quaddobl_pole", py2c_padcon_quaddobl_pole, METH_VARARGS, + "Returns a tuple: the real and imaginary parts of the pole\n Pade approximant with leadidx at position poleidx,\n computed by the predictor in quad double precision.\n The integers leadidx and poleidx are two input parameters,\n the third input integer is the verbose flag.\n The returned doubles are the highest parts of the quad doubles."}, + {"py2c_padcon_clear_standard_data", + py2c_padcon_clear_standard_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in double precision."}, + {"py2c_padcon_clear_dobldobl_data", + py2c_padcon_clear_dobldobl_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in double double precision."}, + {"py2c_padcon_clear_quaddobl_data", + py2c_padcon_clear_quaddobl_data, METH_VARARGS, + "Deallocates data for the series-Pade tracker in quad double precision."}, + {"py2c_syspool_standard_init", py2c_syspool_standard_init, METH_VARARGS, + "Initializes the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_init", py2c_syspool_dobldobl_init, METH_VARARGS, + "Initializes the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_init", py2c_syspool_quaddobl_init, METH_VARARGS, + "Initializes the pool for systems in quad double precision."}, + {"py2c_syspool_standard_size", py2c_syspool_standard_size, METH_VARARGS, + "Returns the size of the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_size", py2c_syspool_dobldobl_size, METH_VARARGS, + "Returns the size of the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_size", py2c_syspool_quaddobl_size, METH_VARARGS, + "Returns the size of the pool for systems in quad double precision."}, + {"py2c_syspool_standard_create", + py2c_syspool_standard_create, METH_VARARGS, + "Defines the k-th system in the standard system pool,\n using the system in the standard container."}, + {"py2c_syspool_dobldobl_create", + py2c_syspool_dobldobl_create, METH_VARARGS, + "Defines the k-th system in the dobldobl system pool,\n using the system in the dobldobl container."}, + {"py2c_syspool_quaddobl_create", + py2c_syspool_quaddobl_create, METH_VARARGS, + "Defines the k-th system in the quaddobl system pool,\n using the system in the quaddobl container."}, + {"py2c_syspool_copy_to_standard_container", + py2c_syspool_copy_to_standard_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in standard double\n precision to the standard systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_copy_to_dobldobl_container", + py2c_syspool_copy_to_dobldobl_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in double double\n precision to the dobldobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_copy_to_quaddobl_container", + py2c_syspool_copy_to_quaddobl_container, METH_VARARGS, + "Copies the k-th system in the pool for systems in quad double\n precision to the quaddobl systems container.\n The value for k is given as an integer input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syspool_standard_clear", py2c_syspool_standard_clear, METH_VARARGS, + "Clears the pool for systems in standard double precision."}, + {"py2c_syspool_dobldobl_clear", py2c_syspool_dobldobl_clear, METH_VARARGS, + "Clears the pool for systems in double double precision."}, + {"py2c_syspool_quaddobl_clear", py2c_syspool_quaddobl_clear, METH_VARARGS, + "Clears the pool for systems in quad double precision."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container.\n The two other input parameters are two doubles: the real and imaginary part\n of the gamma constant. If the integer parameter equals zero and if the two\n input doubles are not both zero, then the input gamma constant will be used,\n otherwise, if the two input doubles are zero and the first integer parameter\n is zero as well, then a random gamma constant will be generated."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_get_default_path_parameters", + py2c_get_default_path_parameters, METH_VARARGS, + "Given the working precision (16, 32, or 64), returns the default values\n of the path parameters, for the path trackers with algorithmic differentiation."}, + {"py2c_ade_manypaths_d_pars", + py2c_ade_manypaths_d_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_dd_pars", + py2c_ade_manypaths_dd_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_qd_pars", + py2c_ade_manypaths_qd_pars, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n Other input parameters are the real and imaginary parts of the gamma constant.\n Then, the 14 values of the path parameters has to be provided.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +static struct PyModuleDef phcpy2c3module = { + PyModuleDef_HEAD_INIT, + "phcpy2c3", + NULL, /* no module documentation */ + -1, + phcpy2c3_methods +}; + +PyMODINIT_FUNC +PyInit_phcpy2c3(void) +{ + return PyModule_Create(&phcpy2c3module); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2cadepath_d.cpp phcpack-2.4.85/src/Mod/phcpy2cadepath_d.cpp --- phcpack-2.4.84/src/Mod/phcpy2cadepath_d.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cadepath_d.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,5536 @@ +/* This file phcpy2cpath_d.cpp contains the definitions of the prototypes + * in phcpy2cadepath_d.h, for compilation with the g++ compiler. */ + +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "scalers.h" +#include "witset.h" +#include "mapcon.h" +#include "next_track.h" +#include "structmember.h" +#include "adepath_d.h" + +extern void adainit ( void ); +extern void adafinal ( void ); + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +/* The wrapping functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +/* moving systems from and to containers */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) +{ + int fail,rc,nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_system(&rc,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nbtasks = 0; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; + fail = solve_Laurent_system(&rc,silent,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* wrapping functions in giftwrappers.h starts from here */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + nbr = support_size(); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; + fail = syscon_random_system(n,m,d,c); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free (exp); + free (c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in solcon.h starts from here */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_open_solution_input_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_dobldobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_quaddobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_multprec_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_dobldobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_quaddobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_multprec_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_standard_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_dobldobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_quaddobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_multprec_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_standard_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_dobldobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_quaddobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_multprec_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_standard_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_multprec_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_standard_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_dobldobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_quaddobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_multprec_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + + /* printf("Calling solcon_append_solution_string ...\n"); */ + + fail = solcon_append_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_dobldobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_quaddobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_multprec_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_dobldobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_quaddobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_multprec_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_standard_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_standard_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in product.h starts here */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = supporting_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 1024; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_structure_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = parse_set_structure(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ) +{ + int fail,result; + + initialize(); + if (!PyArg_ParseTuple(args,"i",&result)) return NULL; + fail = is_set_structure_supporting(&result); + + return Py_BuildValue("i",result); +} + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ) +{ + int fail,r; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = linear_product_root_count(&r); + + return Py_BuildValue("i",r); +} + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = random_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solve_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char partition[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); + + return Py_BuildValue("(i,s)",mbz,partition); +} + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_partition_Bezout_number(&mbz,ncp,partition); + + return Py_BuildValue("i",mbz); +} + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_homogeneous_start_system(ncp,partition); + + return Py_BuildValue("i",mbz); +} + +/* wrapping functions in celcon.h starts here */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = celcon_initialize_supports(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ) +{ + int fail,r,cnt; + char *strmix; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; + + cnt = itemcount(strmix); + { + int mix[cnt]; + + str2intlist(cnt,strmix,mix); + fail = celcon_set_type_of_mixture(r,mix); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) +{ + int fail,r,nbc; + int mix[64]; + char strmix[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = celcon_type_of_mixture(&r,mix); + nbc = intlist2str(r,mix,strmix); + + return Py_BuildValue("s",strmix); +} + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,cnt; + char *strpoint; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; + + cnt = itemcount(strpoint); + { + double point[cnt]; + + str2dbllist(cnt,strpoint,point); + fail = celcon_append_lifted_point(dim,ind,point); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,sup,ind,nbc; + char strpoint[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; + { + double liftedpoint[dim]; + + fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); + nbc = dbllist2str(dim,liftedpoint,strpoint); + } + + return Py_BuildValue("s",strpoint); +} + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ) +{ + int fail,mv; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_mixed_volume_of_supports(&mv); + + return Py_BuildValue("i",mv); +} + +static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) +{ + int fail,length; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_number_of_cells(&length); + + return Py_BuildValue("i",length); +} + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_dobldobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_quaddobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_dobldobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_quaddobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_dobldobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_quaddobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_dobldobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_quaddobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_clear_mixed_cell_configuration(); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) +{ + int d,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&d)) return NULL; + fail = embed_system(d); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_state_to_silent(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ) +{ + int n,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; + fail = define_output_file_with_string(n,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) +{ + int n,nbsols,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; + { + double x[2*n+5]; + int i,j,m; + + for(i=1; i<=nbsols; i++) + { + /* printf("... retrieving solution %d ...\n", i); */ + fail = solcon_retrieve_solution(n,i,&m,x); + /* printf("fail = %d, m = %d\n", fail, m); + printf("printing the coordinates : \n"); + for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ + m = i; + /* printf("... replacing solution %d ...\n", i); */ + fail = solcon_replace_solution(n,i,m,x); + /* printf("... done replacing solution solution %d ...\n", i); */ + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = initialize_sampler(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ) +{ + int n,d,k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; + fail = initialize_monodromy(n,d,k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = store_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = restore_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = track_paths(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = swap_slices(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) +{ + int k,n,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; + fail = new_slices(k,n); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ) +{ + int first,fail; + double r[2]; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&first)) return NULL; + + if(first == 1) /* determine constant coefficient */ + { + r[0] = -1.0; r[1] = 0.0; + } + else + { + r[0] = +1.0; r[1] = 0.0; + } + fail = assign_coefficient_of_slice(0,0,r); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) +{ + int n,i,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + + { + double re_gamma[n]; + double im_gamma[n]; + + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_irreducible_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_irreducible_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple + (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; +/* + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, + "Sets the state to monodromy permutations to silent."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_assign_labels", py2c_factor_assign_labels, + METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, + METH_VARARGS, + "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, + METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, + "Stores the solutions in the container to the data for monodromy loops."}, + {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, + METH_VARARGS, + "Restores the first initialized solutions from sampler to the container."}, + {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, + "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, + "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, + METH_VARARGS, + "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, + METH_VARARGS, + "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_components", py2c_factor_number_of_components, + METH_VARARGS, + "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, + {"py2c_factor_witness_points_of_component", + py2c_factor_witness_points_of_component, + METH_VARARGS, + "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, + METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, + METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, + {"py2c_start_diagonal_cascade_solutions", + py2c_start_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_littlewood_richardson_homotopies", + py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +PyMODINIT_FUNC initphcpy2c(void) +{ + Py_InitModule("phcpy2c", phcpy2c_methods); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2cadepath_d.h phcpack-2.4.85/src/Mod/phcpy2cadepath_d.h --- phcpack-2.4.84/src/Mod/phcpy2cadepath_d.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cadepath_d.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,3129 @@ +/* This file contains the prototypes for the py2c interface functions, + * linked with the double version of the Path library, for the host only. */ + +void initialize ( void ); +/* + * DESCRIPTION : + * Calls adainit(), initializing the interface to the Ada code, + * setting the initialized flag to one and the finalized flag to zero, + * if the initialized flag was zero. + * Nothing happens if the initialized flag equals one. */ + +void finalize ( void ); +/* + * DESCRIPTION : + * Calls adafinal(), finalizing the interface to the Ada code, + * setting the finalized flag to one and the initialized flag to zero, + * if the finalized flag was zero. + * Nothing happens if the finalized flag equals one. */ + +/* The wrapping of functions with prototypes in phcpack.h starts here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the version string of PHCpack. + * The version string is 40 characters long. */ + +static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the value of the integer given on input + * and sets the seed for the random number generators. + * This fixing of the seed enables reproducible runs. */ + +static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of the seed. + * Using this value in py2c_set_seed will ensure that the + * results of previous runs can be reproduced. */ + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to define the output file. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in standard double precision + * to screen or to the defined output file. */ + +/* Copying systems from and to containers. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the target system. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the target system. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the target system. */ + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the target system. */ + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the start system. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the start system. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the start system. */ + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the start system. */ + +/* Creation of homotopy and the tracking of all paths. */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in standard double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in double double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in quad double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in arbitrary multiprecision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start solutions in standard double precision either to + * the screen (standard output) or to the defined output file. + * On return is the failure code, which is zero if all is well. */ + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to tune the continuation parameters. */ + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Shows the current values of the continuation parameters. */ + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tunes the values of the continuation parameters. + * On input are two integers: + * 1) the difficulty level of the solution paths; and + * 2) the number of decimal places in the precision. */ + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to determine the level of output + * during the path tracking. */ + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in arbitrary multiprecision. + * On input is one integer: the number of decimal places in the precision. + * On return is the failure code, which is zero when all went well. */ + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the target solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the target solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the target solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the target solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the start solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the start solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the start solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the start solutions in arbitrary multiprecision. */ + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in standard double precision. + * One integer is expected on input: the number of tasks. + * If that number is zero, then no multitasking is applied. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard systems container. */ + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in standard double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; and + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard Laurent systems + * container. */ + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed volume, and the stable mixed volume as well if + * the input parameter equals 1. On return is the mixed volume, or + * a tuple with the mixed volume and the stable mixed volume. */ + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in standard double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in double double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in quad double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the system in + * the standard systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the system in + * the dobldobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the system in + * the quaddobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the system in + * the multprec systems container and to the solutions in the container. + * On input is an integer, the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the Laurent + * system in the standard Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the Laurent + * system in the dobldobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the Laurent + * system in the quaddobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the Laurent + * system in the multprec Laurent systems container and to the solutions + * in the container. + * On input is an integer: the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies Newton's method in variable precision. + * There are six input parameters: + * 1) the dimension: the number of variables and equations; + * 2) the accuracy, expressed as the correct number of decimal places; + * 3) the maximum number of iterations in Newton's method; + * 4) an upper bound on the number of decimal places in the precision; + * 5) a string, with the representation of the polynomials in the system. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in unisolvers.h starts here. */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with standard double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the standard systems container. After the call of this function, + * the standard solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with double double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the dobldobl systems container. After the call of this function, + * the dobldobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with quad double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the quaddobl systems container. After the call of this function, + * the quaddobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with arbitrary multiprecision arithmetic. + * On input are three numbers: + * 1) the number of decimal places in the working precision; + * 2) the maximum number of iterations in the method of Weierstrass; and + * 3) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the multprec systems container. After the call of this function, + * the multprec solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a planar point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * On return is the string representation of the vertex points, + * sorted so that each two consecutive points define an edge. */ + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * When the function returns, the internal data structures + * to store the convex hull are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of facets of the given dimension. + * On input is an integer, the dimension of the facet. */ + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a facet. + * On input are two integer numbers: + * 1) the dimension of the facet; + * 2) the index of the facet. */ + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension three. */ + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension four. */ + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation of + * the support of the first Laurent polynomial in the container. */ + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the support + * of a Laurent polynomial. */ + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the string representation of the support set + * that was stored internally by the call py2c_giftwrap_support_size. */ + +static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the Laurent systems container by its initial form. + * There are three input parameters: + * 1) the dimension, number of coordinates in the inner normal; + * 2) the number of characters in the string representation for the normal; + * 3) the string representation of the inner normal. + * On return is the failure code, which equals zero if all went well. */ + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in standard double precision. + * The system will be placed in the standard systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in standard double precision. + * The system will be placed in the standard Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in double double precision. + * The system will be placed in the dobldobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in double double precision. + * The system will be placed in the dobldobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in quad double precision. + * The system will be placed in the quaddobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in quad double precision. + * The system will be placed in the quaddobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in arbitrary multiprecision. The one input parameter is an integer, + * the number of decimal places in the working precision. + * The system will be placed in the multprec systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in arbitrary multiprecision. The one input parameter is + * an integer, the number of decimal places in the working precision. + * The system will be placed in the multprec Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in standard double precision. + * There are four integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]. */ + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with standard double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with standard double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with double double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with double double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with quad double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with quad double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with arbitrary multiprecision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with arbitrary multiprecision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of symbols in the symbol table. */ + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the symbols in the symbol table to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string that contains the symbols in the symbol table. + * The symbols are separate from each other by one space. */ + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Removes a symbol, given by name, from the symbol table. + * On input are two arguments: + * 1) an integer, as the number of characters in the name; + * 2) a string of characters with the name of the symbol. + * The failure code is returned, which equals zero when all went well. */ + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the symbol table. */ + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in standard + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in double + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in quad + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in arbitrary + * multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * standard double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * double double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * quad double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * arbitrary multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in standard double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in double double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in quad double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in arbitrary multiprecision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th polynomial stored in the + * container for systems with coefficients in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th Laurent polynomial stored + * in the container for Laurent polynomials systems with coefficients + * in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves one term of a polynomial with coefficients in standard + * double precision, that is stored in the systems container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns in d the total degree of the system with coefficients in + * standard double precision, as stored in the container. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syson_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in solcon.h starts here. */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in standard double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in double double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in quad double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in arbitrary multiprecision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in standard double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in double double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in quad double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in arbitrary multiprecision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in standard double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in double double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in quad double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in arbitrary multiprecision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for the name of the input file for the solutions and + * opens the input file. All subsequent reading happens from this input. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in standard double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in double double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in quad double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in arbitrary multiprecision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in standard double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in double double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in quad double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in arbitrary multiprecision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current standard solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current dobldobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current quaddobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current multprec solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in standard double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in arbitrary multiprecision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current standard double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current double double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current quad double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current arbitrary multiprecision solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current standard double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in standard double precision in the container. */ + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current double double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in double double precision in the container. */ + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current quad double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in quad double precision in the container. */ + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current multiprecision solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in arbitrary multiprecision in the container. */ + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in standard double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in double double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in quad double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in arbitrary multiprecision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in standard double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in double double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in quad double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in arbitrary multiprecision, + * as stored in the container. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions in product.h starts here. */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a supporting set structure for the system stored in the + * container with coefficients in standard double precision. */ + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the supporting set structure to screen. */ + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the set structure. */ + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Parses a given string into a set structure. + * On input are two parameters, one integer and one string: + * 1) the number of characters in the given string; and + * 2) the characters in the string. + * On return is the failure code, if zero, then the string + * has been parsed into a valid set structure. */ + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Checks whether the stored set structure is supporting + * for the system in the standard systems container. + * Returns an integer which represents true (1) or false (0). */ + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the linear-product root count, computed from + * the supporting set structure. */ + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a random linear-product system based on the + * stored set structure. On return is the failure code, + * which equals zero if all went well. */ + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes all solutions to the linear-product system + * and stores the solutions in the container for solutions + * in standard double precision. On return is the failure + * code, which equals zero if all went well. */ + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the set structure. */ + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system in the standard systems container, + * a heuristic partition of the set of variables may + * lead to a Bezout number that is smaller than the total degree. + * On return is the m-homogeneous Bezout number for the + * string representation of the partition that is returned + * as the second argument in the tuple. */ + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, computes + * the m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, constructs + * an m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +/* The wrapping of functions with prototypes in celcon.h starts here. */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_celcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string representation of a lifted point. + * On input are three integer numbers: + * 1) the number of coordinates in the lifted point; + * 2) the index to the support set; and + * 3) the index to the point in that support set. */ + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_celcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in standard double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in double double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in quad double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in standard double precision is copied + * from the cell container to the container for systems with + * coefficients in standard double precision. */ + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in double double precision is copied + * from the cell container to the container for systems with + * coefficients in double double precision. */ + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in quad double precision is copied + * from the cell container to the container for systems with + * coefficients in quad double precision. */ + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in standard double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in double double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in quad double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using standard double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in standard double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using double double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in double double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using quad double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in quad double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in standard double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in double double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in quad double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with standard double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with double double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with quad double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data in the cell container. */ + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the standard systems container, + * with standard double precision arithmetic. The system in the standard + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the dobldobl systems container, + * with double double precision arithmetic. The system in the dobldobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the quaddobl systems container, + * with quad double precision arithmetic. The system in the quaddobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard solutions container with + * the scaled solutions, scaled with standard double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the dobldobl solutions container with + * the scaled solutions, scaled with double double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quaddobl solutions container with + * the scaled solutions, scaled with quad double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in a the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in standard double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations to silent. */ + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the output file for the factorization. + * On input are an integer and a string: + * 1) the integer equals the number of characters in the string; and + * 2) the string contains the name of a file. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in standard double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set. + * On entry is the dimension or the number of hyperplanes + * to slide the positive dimensional solution set. */ + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container to the data for monodromy loops. */ + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions from sampler to the container. */ + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_permutation_after_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a solution set of degree d, computes the permutation using the + * solutions most recently stored, after a loop. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_update_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the current + * decomposition of the witness set. */ + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_witness_set_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container on + * return contain a witness set for the hypersurface defined by p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a polynomial, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_create_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. */ + +static PyObject *py2c_start_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_extrinsic_top_diagonal_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the start and target system to + * start the extrinsic cascade to intersect two witness sets, + * respectively of dimensions a and b, with ambient dimensions + * respectively equal to n1 and n2. + * There are four integers as parameters on input: n1, n2, a and b. */ + +static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of Pieri and Littlewood-Richardson homotopies, + * with prototypes in schubert.h starts here. */ + +static PyObject *py2c_schubert_pieri_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of p-plane producing curves of degree q + * that meet m*p + q*(m+p) given general m-planes. + * On input are three integer numbers: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; and + * 3) q, the degree of the curve that produces p-planes. + * The dimension of the ambient space of this Pieri problem is m+p. */ + +static PyObject *py2c_schubert_resolve_conditions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resolves a general Schubert intersection condition in n-space + * for k-planes subject to conditions defined by brackers. + * On return is the root count, the number of k-planes that satisfy + * the intersection conditions imposed by the brackets for general flags. + * On entry are five integers and one string: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c, the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen. */ + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space. + * The polynomial system that was solved is in the container for + * systems with coefficients in standard double precision and the + * corresponding solutions are in the standard solutions container. + * On entry are six integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen; + * 7) nbchar, the number of characters in the string filename; + * 8) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_localization_poset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the localization poset for the + * Pieri root count for m, p, and q. The input parameters are the + * integer values for m, p, and q: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the curves that produce p-planes. */ + +static PyObject *py2c_schubert_pieri_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. + * On return the systems container for systems with coefficients in standard + * double precision contains the polynomial system solved and in the + * solutions in standard double precision are in the solutions container. + * On entry are four integers and two strings: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, the string with m*p + q*(m+p) random complex input m-planes, + * where the real and imaginary parts are separated by a space; + * 6) pts, the string with m*p + q*(m+p) random complex interpolation + * points, only needed if q > 0. + * The function returns the combinatorial Pieri root count, + * which should equal the number of solutions in the container. */ + +static PyObject *py2c_schubert_osculating_planes + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of n real m-planes in + * d-space osculating a rational normal curve + * at the n points in s, where n = m*p + q*(m+p) and d = m+p. + * On entry are four integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string pts; and + * 5) pts, the string with m*p + q*(m+p) interpolation points. */ + +static PyObject *py2c_schubert_pieri_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Fills the container of systems with coefficients in standard + * double precision with a polynomial system that expresses the + * intersection conditions of a general Pieri problem. + * On input are five integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, m*p + q*(m+p) random complex input m-planes, where + * the real and imaginary parts are separated by a space; + * 6) a flag is_real: if == 1, then the coefficients of A are real, + * if == 0, then the coefficients of A are complex. + * Returns the failure code, which equals zero if all went well. */ + +/* The wrapping functions in mapcon.h starts here. */ + +static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the binomial system stored in the Laurent systems container. + * There is one input argument, either one or zero. + * If one, then only the pure top dimensional solutions are computed. + * If zero, then all solution sets are computed. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the maps stored in the container to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the maps stored in the container. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the top dimension of the maps in the container. */ + +static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of maps in the container. */ + +static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the dimension and index of a map, given as two integers as + * input parameters, returns the degree of that map. */ + +static PyObject *py2c_mapcon_coefficients_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the coefficients of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of complex doubles. */ + +static PyObject *py2c_mapcon_exponents_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the exponents of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of integers. */ + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using standard double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the standard systems container. */ + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using double double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the dobldobl systems container. */ + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using quad double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the quaddobl systems container. */ + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using arbitrary multiprecision arithmetic. + * There is are two integer numbers on input: + * 1) one to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used; and + * 2) the number of decimal places in the working precision. + * Before calling this routine the target and start system must + * be copied over from the multprec systems container. */ + +static PyObject *py2c_initialize_varprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the variable precision homotopy with the target and + * start system stored in the strings. + * On entry are three integers and two strings, in the following order: + * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant + * is used, if 0, a random value for gamma will be generated; + * 2) nc_target, the number of characters in the string target; + * 3) target, the string representation of the target system; + * 4) nc_start, the number of characters in the string start; + * 5) start, the string representation of the start system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the standard solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the dobldobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the quaddobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the multprec solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Uses the string representation of a solution to initialize the + * variable precision path tracker with. + * There are three input parameters, two integers and one string: + * 1) nv, the number of variables in the solution; + * 2) nc, the number of characters in the string sol; + * 3) sol, the string representation of a solution. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with standard double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the standard solutions container. + * The functions py2c_initialized_standard_tracker and + * py2c_initialize_standard_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with double double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the dobldobl solutions container. + * The functions py2c_initialized_dobldobl_tracker and + * py2c_initialize_dobldobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with quad double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the quaddobl solutions container. + * The functions py2c_initialized_quaddobl_tracker and + * py2c_initialize_quaddobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with arbitrary + * multiprecision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the multprec solutions container. + * The functions py2c_initialized_multprec_tracker and + * py2c_initialize_multprec_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on a solution path in variable precision. + * There are four integer input parameters: + * 1) the number of correct decimal places in the solution; + * 2) an upper bound on the number of decimal places in the precision; + * 3) the maximum number of Newton iterations; + * 4) a flag zero or one to indicate the verbose level. + * On return is a tuple: + * 0) the failure code, which equals zero if all went well; and + * 1) the string representation of the next solution on the path. */ + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the standard double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the double double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the quad double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the arbitrary multiprecision tracker + * with a generator. */ + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the variable precision tracker + * with a generator. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in double precision by the + * functions in adepath.h, starts here. */ + +static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Mod/phcpy2c.h phcpack-2.4.85/src/Mod/phcpy2c.h --- phcpack-2.4.84/src/Mod/phcpy2c.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2c.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,7230 @@ +/* This file contains the prototypes for the py2c interface functions. */ + +void initialize ( void ); +/* + * DESCRIPTION : + * Calls adainit(), initializing the interface to the Ada code, + * setting the initialized flag to one and the finalized flag to zero, + * if the initialized flag was zero. + * Nothing happens if the initialized flag equals one. */ + +void finalize ( void ); +/* + * DESCRIPTION : + * Calls adafinal(), finalizing the interface to the Ada code, + * setting the finalized flag to one and the initialized flag to zero, + * if the finalized flag was zero. + * Nothing happens if the finalized flag equals one. */ + +static PyObject *py2c_corecount + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cores available for multithreading. */ + +/* The wrapping of functions with prototypes in phcpack.h starts here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the version string of PHCpack. + * The version string is 40 characters long. */ + +static PyObject *py2c_set_seed + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the value of the integer given on input + * and sets the seed for the random number generators. + * This fixing of the seed enables reproducible runs. */ + +static PyObject *py2c_get_seed + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of the seed. + * Using this value in py2c_set_seed will ensure that the + * results of previous runs can be reproduced. */ + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_define_output_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to define the output file. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in double double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in quad double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in double double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in double double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_read_standard_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the start system from file, + * in standard double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_standard_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start Laurent system in standard double precision. */ + +static PyObject *py2c_read_standard_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the target system from file, + * in standard double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_standard_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target Laurent system in standard double precision. */ + +static PyObject *py2c_read_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the start system from file, + * in double double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_dobldobl_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start Laurent system in double double precision. */ + +static PyObject *py2c_read_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the target system from file, + * in double double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_dobldobl_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target Laurent system in double double precision. */ + +static PyObject *py2c_read_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the start system from file, + * in quad double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_quaddobl_start_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start Laurent system in quad double precision. */ + +static PyObject *py2c_read_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name and reads the target system from file, + * in quad double precision. + * If available on file, also its solutions will be read and stored. */ + +static PyObject *py2c_write_quaddobl_target_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target Laurent system in quad double precision. */ + +/* copying systems from and to containers */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the target system. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the target system. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the target system. */ + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the target system. */ + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the start system. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the start system. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the start system. */ + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the start system. */ + +static PyObject *py2c_copy_standard_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in standard double precision + * from the container to the start system. */ + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in double double precision + * from the container to the start system. */ + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in quad double precision + * from the container to the start system. */ + +static PyObject *py2c_copy_standard_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in standard double precision + * from the container to the target system. */ + +static PyObject *py2c_copy_dobldobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in double double precision + * from the container to the target system. */ + +static PyObject *py2c_copy_quaddobl_Laurent_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the Laurent system in quad double precision + * from the container to the target system. */ + +static PyObject *py2c_copy_standard_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start Laurent system in standard double precision + * to the systems container for Laurent systems. */ + +static PyObject *py2c_copy_dobldobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start Laurent system in double double precision + * to the systems container for Laurent systems. */ + +static PyObject *py2c_copy_quaddobl_Laurent_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start Laurent system in quad double precision + * to the systems container for Laurent systems. */ + +static PyObject *py2c_copy_standard_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target Laurent system in standard double precision + * to the systems container for Laurent systems. */ + +static PyObject *py2c_copy_dobldobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target Laurent system in double double precision + * to the systems container for Laurent systems. */ + +static PyObject *py2c_copy_quaddobl_Laurent_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target Laurent system in quad double precision + * to the systems container for Laurent systems. */ + +/* creation of homotopy and tracking of all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * On input are two doubles and one positive integer: + * (1) the real and imaginary part of the gamma constant; + * (2) the power of t in the homotopy. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * On input are two doubles and one positive integer: + * (1) the real and imaginary part of the gamma constant; + * (2) the power of t in the homotopy. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * On input are two doubles and one positive integer: + * (1) the real and imaginary part of the gamma constant; + * (2) the power of t in the homotopy. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * On input are two doubles and one positive integer: + * (1) the real and imaginary part of the gamma constant; + * (2) the power of t in the homotopy. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in standard double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in double double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in quad double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in arbitrary multiprecision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_write_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start solutions in standard double precision either to + * the screen (standard output) or to the defined output file. + * On return is the failure code, which is zero if all is well. */ + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to tune the continuation parameters. */ + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Shows the current values of the continuation parameters. */ + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tunes the values of the continuation parameters. + * On input are two integers: + * 1) the difficulty level of the solution paths; and + * 2) the number of decimal places in the precision. */ + +static PyObject *py2c_get_value_of_continuation_parameter + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of a continuation parameter. + * On input is an index of a continuation parameter, in the range 1..34, + * on return is the current value of that continuation parameter. */ + +static PyObject *py2c_set_value_of_continuation_parameter + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the value of a continuation parameter. + * On input is an index of a continuation parameter, in the range 1..34, + * and the new value for the corresponding continuation parameter. */ + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to determine the level of output + * during the path tracking. */ + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in arbitrary multiprecision. + * On input is one integer: the number of decimal places in the precision. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_standard_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision + * to solve a Laurent system stored in the systems container, + * starting at the solutions of a stored Laurent start system. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision + * to solve a Laurent system stored in the systems container, + * starting at the solutions of a stored Laurent start system. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_Laurent_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision + * to solve a Laurent system stored in the systems container, + * starting at the solutions of a stored Laurent start system. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_clear_standard_operations_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates all data used by solve_by_standard_homotopy_continuation. */ + +static PyObject *py2c_clear_dobldobl_operations_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates all data used by solve_by_dobldobl_homotopy_continuation. */ + +static PyObject *py2c_clear_quaddobl_operations_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates all data used by solve_by_quaddobl_homotopy_continuation. */ + +static PyObject *py2c_clear_standard_Laurent_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data used to solve Laurent systems by homotopy + * continuation in standard double precision. */ + +static PyObject *py2c_clear_dobldobl_Laurent_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data used to solve Laurent systems by homotopy + * continuation in double double precision. */ + +static PyObject *py2c_clear_quaddobl_Laurent_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data used to solve Laurent systems by homotopy + * continuation in quad double precision. */ + +/* Wrapping of crude path trackers of the jumpstart library starts here. */ + +static PyObject *py2c_standard_crude_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * A crude tracker appends the end point of a path directly to + * the solutions container, without refinement or postprocessing. + * Tracking happens in standard double precision. + * On entry is the verbose parameter which is 1 or 0. + * If 1, then the solution vectors are written to screen, otherwise + * the crude tracker stays mute. + * On return is the failure code, which is zero when all went well. + * + * REQUIRED : + * The target system, start system, and start solutions in standard + * double precision have been initialized in the containers. */ + +static PyObject *py2c_dobldobl_crude_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * A crude tracker appends the end point of a path directly to + * the solutions container, without refinement or postprocessing. + * Tracking happens in double double precision. + * On entry is the verbose parameter which is 1 or 0. + * If 1, then the solution vectors are written to screen, otherwise + * the crude tracker stays mute. + * On return is the failure code, which is zero when all went well. + * + * REQUIRED : + * The target system, start system, and start solutions in double + * double precision have been initialized in the containers. */ + +static PyObject *py2c_quaddobl_crude_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * A crude tracker appends the end point of a path directly to + * the solutions container, without refinement or postprocessing. + * Tracking happens in quad double precision. + * On entry is the verbose parameter which is 1 or 0. + * If 1, then the solution vectors are written to screen, otherwise + * the crude tracker stays mute. + * On return is the failure code, which is zero when all went well. + * + * REQUIRED : + * The target system, start system, and start solutions in quad + * double precision have been initialized in the containers. */ + +/* The wrapping of copying solutions from and to containers starts here. */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the target solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the target solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the target solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the target solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the start solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the start solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the start solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the start solutions in arbitrary multiprecision. */ + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in standard double precision. + * Three integers are expected on input: (1) silent or not (0 or 1); + * (2) the number of tasks, if 0, then no multitasking; and + * (3) the verbose level. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard systems container. */ + +static PyObject *py2c_scan_for_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given on input are two arguments: a number and a string. + * The string holds the string representation of a polynomial system, + * where each polynomial is terminated by a semi colon. + * The first argument on input is the number of characters in the string. + * On return is the number of symbols used as variables in the system. + * This function helps to determine whether a system is square or not. */ + +static PyObject *py2c_solve_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in double double precision. + * Three integers are expected on input: (1) silent or not (0 or 1); + * (2) the number of tasks, if 0, the no multitasking; and + * (3) the verbose level. + * On return, the container for solutions in double double precision + * contains the solutions to the system in the dobldobl systems container. */ + +static PyObject *py2c_solve_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in quad double precision. + * Three integers are expected on input: (1) silent or not (0 or 1); + * (2) the number of tasks, if 0, then no multitasking; and + * (3) the verbose level. + * On return, the container for solutions in quad double precision + * contains the solutions to the system in the quaddobl systems container. */ + +static PyObject *py2c_solve_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in standard double precision. + * Three integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run; and + * 3) the verbose level. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard Laurent systems + * container. */ + +static PyObject *py2c_solve_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in double double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run; and + * 3) the verbose level. + * On return, the container for solutions in double double precision + * contains the solutions to the system in the dobldobl Laurent systems + * container. */ + +static PyObject *py2c_solve_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in quad double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run; and + * 3) the verbose level. + * On return, the container for solutions in quad double precision + * contains the solutions to the system in the quaddobl Laurent systems + * container. */ + +static PyObject *py2c_set_gamma_constant ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constant for later retrieval. + * Four parameters are expected on input, two doubles and two integers. + * The two doubles are the real and imaginary parts of the gamma. + * The two integers are the precision, 1, 2, or 4, respectively for + * double, double double, or quad double; and the verbose level. */ + +static PyObject *py2c_get_gamma_constant ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the gamma constant used by the solve functions. + * Two integer parameters are expected on input: + * (1) for the precision, 1, 2, or 4, respectively for double, + * double double, or quad double precision; and + * (2) the verbose level. + * The function returns a tuple of two doubles, + * for the real and imaginary part of the gamma constant. */ + +static PyObject *py2c_mixed_volume + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed volume, and the stable mixed volume as well if + * the input parameter equals 1. On return is the mixed volume, or + * a tuple with the mixed volume and the stable mixed volume. + * The Ada translation of the MixedVol algorithm is applied. + * The system in the standard systems container is considered first + * and if that container is empty, then the system in the standard + * Laurent systems container is taken as input. + * A regular mixed-cell configuration is in the cells container. */ + +static PyObject *py2c_mixed_volume_by_demics + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls DEMiCs to compute the mixed volume of the system in the + * standard systems container. If the standard systems container + * is empty, then the system in the standard Laurent systems + * container is taken as input. Returns the mixed volume. + * A regular mixed-cell configuration is in the cells container. + * The above is for the case if the input parameter equals 0. + * If the input parameter equals 1, then on return is a tuple, + * which contains the mixed volume and the stable mixed volume. */ + +static PyObject *py2c_standard_deflate + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in standard double precision to the system and + * the solutions stored in the containers. + * There are five parameters, two integers and three doubles: + * 1) the maximum number of iterations per root, + * 2) the maximum number of deflations per root, + * 3) tolerance on the error of each root, + * 4) tolerance on the residual of each root, + * 5) tolerance on the numerical rank of the Jacobians at each root. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_deflate + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in double double precision to the system and + * the solutions stored in the containers. + * There are five parameters, two integers and three doubles: + * 1) the maximum number of iterations per root, + * 2) the maximum number of deflations per root, + * 3) tolerance on the error of each root, + * 4) tolerance on the residual of each root, + * 5) tolerance on the numerical rank of the Jacobians at each root. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_deflate + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in quad double precision to the system and + * the solutions stored in the containers. + * There are five parameters, two integers and three doubles: + * 1) the maximum number of iterations per root, + * 2) the maximum number of deflations per root, + * 3) tolerance on the error of each root, + * 4) tolerance on the residual of each root, + * 5) tolerance on the numerical rank of the Jacobians at each root. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the system in + * the standard systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the system in + * the dobldobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the system in + * the quaddobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the system in + * the multprec systems container and to the solutions in the container. + * On input is an integer, the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the Laurent + * system in the standard Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the Laurent + * system in the dobldobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the Laurent + * system in the quaddobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the Laurent + * system in the multprec Laurent systems container and to the solutions + * in the container. + * On input is an integer: the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies Newton's method in variable precision. + * There are six input parameters: + * 1) the dimension: the number of variables and equations; + * 2) the accuracy, expressed as the correct number of decimal places; + * 3) the maximum number of iterations in Newton's method; + * 4) an upper bound on the number of decimal places in the precision; + * 5) a string, with the representation of the polynomials in the system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_condition_report + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system and solutions in the containers in double precision, + * computes a condition report. On input are the following: + * 1) maximum number of Newton iterations per solution; + * 2) tolerance on the residual; + * 3) tolerance on the forward error; + * 4) tolerance on the inverse condition number for singularities; + * 5) a string with the name of the output file, + * this string may be empty if no output to file is needed; + * 6) a verbose flag, either 1 or 0. + * On return are the counts of number of solutions that are + * regular, singular, real, complex, clustered, or failures; + * along with the frequency tables for the forward errors, + * residuals and estimates for the inverse condition numbers. */ + +/* The wrapping of functions with prototypes in unisolvers.h starts here. */ + +static PyObject *py2c_usolve_standard + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with standard double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the standard systems container. After the call of this function, + * the standard solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_dobldobl + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with double double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the dobldobl systems container. After the call of this function, + * the dobldobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_quaddobl + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with quad double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the quaddobl systems container. After the call of this function, + * the quaddobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_multprec + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with arbitrary multiprecision arithmetic. + * On input are three numbers: + * 1) the number of decimal places in the working precision; + * 2) the maximum number of iterations in the method of Weierstrass; and + * 3) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the multprec systems container. After the call of this function, + * the multprec solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ + +static PyObject *py2c_giftwrap_planar + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a planar point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * On return is the string representation of the vertex points, + * sorted so that each two consecutive points define an edge. */ + +static PyObject *py2c_giftwrap_convex_hull + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * When the function returns, the internal data structures + * to store the convex hull are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of facets of the given dimension. + * On input is an integer, the dimension of the facet. */ + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a facet. + * On input are two integer numbers: + * 1) the dimension of the facet; + * 2) the index of the facet. */ + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension three. */ + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension four. */ + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation of + * the support of the k-th Laurent polynomial in the container. + * The index k is given on input as an integer between 1 + * and the number of Laurent polynomials. */ + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the support + * of a Laurent polynomial. */ + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the string representation of the support set + * that was stored internally by the call py2c_giftwrap_support_size. */ + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the Laurent systems container by its initial form. + * There are three input parameters: + * 1) the dimension, number of coordinates in the inner normal; + * 2) the number of characters in the string representation for the normal; + * 3) the string representation of the inner normal. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in standard double precision. + * The system will be placed in the standard systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in standard double precision. + * The system will be placed in the standard Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in double double precision. + * The system will be placed in the dobldobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in double double precision. + * The system will be placed in the dobldobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in quad double precision. + * The system will be placed in the quaddobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in quad double precision. + * The system will be placed in the quaddobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in arbitrary multiprecision. The one input parameter is an integer, + * the number of decimal places in the working precision. + * The system will be placed in the multprec systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in arbitrary multiprecision. The one input parameter is + * an integer, the number of decimal places in the working precision. + * The system will be placed in the multprec Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_random_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in standard double precision. + * There are five integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]; + * 5) neq, the number of equations. */ + +static PyObject *py2c_syscon_dobldobl_random_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in double double precision. + * There are five integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]; + * 5) neq, the number of equations. */ + +static PyObject *py2c_syscon_quaddobl_random_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in double double precision. + * There are five integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]; + * 5) neq, the number of equations. */ + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with standard double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with standard double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with double double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with double double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with quad double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with quad double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with arbitrary multiprecision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with arbitrary multiprecision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of symbols in the symbol table. */ + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the symbols in the symbol table to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string that contains the symbols in the symbol table. + * The symbols are separate from each other by one space. */ + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Removes a symbol, given by name, from the symbol table. + * On input are two arguments: + * 1) an integer, as the number of characters in the name; + * 2) a string of characters with the name of the symbol. + * The failure code is returned, which equals zero when all went well. */ + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the symbol table. */ + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in standard + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in double + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in quad + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in arbitrary + * multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * standard double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * double double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * quad double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * arbitrary multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in standard double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in double double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in quad double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in arbitrary multiprecision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th polynomial stored in the + * container for systems with coefficients in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th Laurent polynomial stored + * in the container for Laurent polynomials systems with coefficients + * in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_retrieve_term + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves one term of a polynomial with coefficients in standard + * double precision, that is stored in the systems container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_total_degree + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns in d the total degree of the system with coefficients in + * standard double precision, as stored in the container. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the standard double precision container + * with the same Laurent system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_standard_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the standard double precision container + * with the same Laurent system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the double double precision container + * with the same Laurent system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the double double precision container + * with the same Laurent system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the quad double precision container + * with the same Laurent system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_Laurent_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system in the quad double precision container + * with the same Laurent system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_standard_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with its transformation in 1-homogeneous coordinates. + * There is one integer on input. + * If 0, then a random linear equation is added, + * otherwise, the linear equation z0 - 1 = 0 is added, + * where z0 is the extra homogeneous coordinate. */ + +static PyObject *py2c_syscon_dobldobl_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with its transformation in 1-homogeneous coordinates. + * There is one integer on input. + * If 0, then a random linear equation is added, + * otherwise, the linear equation z0 - 1 = 0 is added, + * where z0 is the extra homogeneous coordinate. */ + +static PyObject *py2c_syscon_quaddobl_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with its transformation in 1-homogeneous coordinates. + * There is one integer on input. + * If 0, then a random linear equation is added, + * otherwise, the linear equation z0 - 1 = 0 is added, + * where z0 is the extra homogeneous coordinate. */ + +static PyObject *py2c_syscon_add_symbol + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Adds a symbol to the table, with name given in the string, + * where the number of characters in the name equals the first + * integer argument. The second input parameter is the string. + * This symbol represents the last variable added in the homogeneous + * coordinate transformation. */ + +static PyObject *py2c_syscon_standard_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * by its transformation to affine coordinates, substituting the + * value of the last coordinate by one and removing the last equation. */ + +static PyObject *py2c_syscon_dobldobl_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * by its transformation to affine coordinates, substituting the + * value of the last coordinate by one and removing the last equation. */ + +static PyObject *py2c_syscon_quaddobl_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * by its transformation to affine coordinates, substituting the + * value of the last coordinate by one and removing the last equation. */ + +/* The wrapping of the functions in tabform.h starts from here */ + +static PyObject *py2c_tabform_store_standard_tableau + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the tableau form of a polynomial system, given by + * 1) the number of equations as an integer, + * 2) the number of equations as an integer, + * 3) the number of characters in the 4-th string input, + * 4) the number of terms in each polynomial, given as a string, + * the string representation of a list of integers, + * 5) the number of characters in the 6-th string input, + * 6) the coefficients of all terms, given as a string, + * the string representation of a list of doubles, + * each pair of consecutive doubles represents a complex coefficient, + * 7) the number of characters in the 7-th string input, + * 8) the exponents of all terms, given as a string, + * the string representation of a list of integers, + * 9) the verbose flag is an integer. + * The tableau form is parsed and the container for systems with + * standard double precision coefficients is initialized. */ + +static PyObject *py2c_tabform_load_standard_tableau + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a 5-tuple with the tableau form of the system with + * standard double precision coefficients in the container. + * On input is the verbose flag as an integer. + * The five items in the returned tuple are + * 1) the number of equations as an integer, + * 2) the number of equations as an integer, + * 3) the number of terms in each polynomial, given as a string, + * the string representation of a list of integers, + * 4) the coefficients of all terms, given as a string, + * the string representation of a list of doubles, + * each pair of consecutive doubles represents a complex coefficient, + * 5) the exponents of all terms, given as a string, + * the string representation of a list of integers. */ + +/* The wrapping of functions with prototypes in solcon.h starts here. */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in standard double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_standard_solutions_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a solution list to be parsed in standard double precision. + * Solutions are read from file and stored in the container for + * double precision solutions. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in double double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a solution list to be parsed in double double precision. + * Solutions are read from file and stored in the container for + * double double precision solutions. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in quad double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a solution list to be parsed in quad double precision. + * Solutions are read from file and stored in the container for + * quad double precision solutions. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in arbitrary multiprecision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in standard double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in double double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in quad double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in arbitrary multiprecision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in standard double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in double double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in quad double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in arbitrary multiprecision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for the name of the input file for the solutions and + * opens the input file. All subsequent reading happens from this input. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in standard double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in double double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in quad double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in arbitrary multiprecision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in standard double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in double double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in quad double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in arbitrary multiprecision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current standard solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current dobldobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current quaddobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current multprec solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in standard double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in arbitrary multiprecision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current standard double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current double double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current quad double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current arbitrary multiprecision solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current standard double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in standard double precision in the container. */ + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current double double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in double double precision in the container. */ + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current quad double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in quad double precision in the container. */ + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current multiprecision solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in arbitrary multiprecision in the container. */ + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in standard double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in double double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in quad double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in arbitrary multiprecision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in standard double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in double double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in quad double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in arbitrary multiprecision, + * as stored in the container. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Add one extra coordinate one to every solution in the container + * for solutions in standard double precision. */ + +static PyObject *py2c_solcon_dobldobl_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Add one extra coordinate one to every solution in the container + * for solutions in double double precision. */ + +static PyObject *py2c_solcon_quaddobl_one_homogenization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Add one extra coordinate one to every solution in the container + * for solutions in double double precision. */ + +static PyObject *py2c_solcon_standard_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Divides every coordinate by the last coordinate of every solution + * in the container for solutions in standard double precision. */ + +static PyObject *py2c_solcon_dobldobl_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Divides every coordinate by the last coordinate of every solution + * in the container for solutions in double double precision. */ + +static PyObject *py2c_solcon_quaddobl_one_affinization + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Divides every coordinate by the last coordinate of every solution + * in the container for solutions in quad double precision. */ + +/* The wrapping of the functions in product.h starts here. */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a supporting set structure for the system stored in the + * container with coefficients in standard double precision. */ + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the supporting set structure to screen. */ + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the set structure. */ + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Parses a given string into a set structure. + * On input are two parameters, one integer and one string: + * 1) the number of characters in the given string; and + * 2) the characters in the string. + * On return is the failure code, if zero, then the string + * has been parsed into a valid set structure. */ + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Checks whether the stored set structure is supporting + * for the system in the standard systems container. + * Returns an integer which represents true (1) or false (0). */ + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the linear-product root count, computed from + * the supporting set structure. */ + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a random linear-product system based on the + * stored set structure. On return is the failure code, + * which equals zero if all went well. */ + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes all solutions to the linear-product system + * and stores the solutions in the container for solutions + * in standard double precision. On return is the failure + * code, which equals zero if all went well. */ + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the set structure. */ + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system in the standard systems container, + * a heuristic partition of the set of variables may + * lead to a Bezout number that is smaller than the total degree. + * On return is the m-homogeneous Bezout number for the + * string representation of the partition that is returned + * as the second argument in the tuple. */ + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, computes + * the m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, constructs + * an m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +/* The wrapping of the functions with prototypes in celcon.h starts here. */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_celcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string representation of a lifted point. + * On input are three integer numbers: + * 1) the number of coordinates in the lifted point; + * 2) the index to the support set; and + * 3) the index to the point in that support set. */ + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_celcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_celcon_is_stable ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns 1 if the stable mixed cells were stored, returns 0 otherwise. */ + +static PyObject *py2c_celcon_number_of_original_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of original cells, without artificial original. */ + +static PyObject *py2c_celcon_number_of_stable_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of stable cells. */ + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in standard double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in double double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in quad double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in standard double precision is copied + * from the cell container to the container for systems with + * coefficients in standard double precision. */ + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in double double precision is copied + * from the cell container to the container for systems with + * coefficients in double double precision. */ + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in quad double precision is copied + * from the cell container to the container for systems with + * coefficients in quad double precision. */ + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in standard double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in double double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in quad double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_stable_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th stable mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th stable mixed cell. */ + +static PyObject *py2c_celcon_solve_stable_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th stable mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th stable mixed cell. */ + +static PyObject *py2c_celcon_solve_stable_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th stable mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th stable mixed cell. */ + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using standard double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in standard double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using double double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in double double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using quad double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in quad double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in standard double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in double double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in quad double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with standard double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with double double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with quad double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data in the cell container. */ + +/* The wrapping of functions with prototypes in intcelcon.h follows. */ + +static PyObject *py2c_intcelcon_read_mixed_cell_configuration + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for a file name, reads a mixed-cell configuration, + * which is then stored in the container. */ + +static PyObject *py2c_intcelcon_write_mixed_cell_configuration + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the mixed-cell configuration in the container to screen. */ + +static PyObject *py2c_intcelcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_intcelcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_intcelcon_length_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a list of integers where + * each integer contains the number of points in a support. */ + +static PyObject *py2c_intcelcon_get_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are three integer numbers: n, i, j, where n is the + * length of a lifted point, i is the index of a support, and + * j is the index of a point. Note that both i and j start at + * one instead of at zero. Returns the string representation of + * the n coordinates of the j-th point in the i-th lifted support. */ + +static PyObject *py2c_intcelcon_get_inner_normal + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given on input the dimension of the lifted points and the + * index of the mixed cell of interest, returns the string + * representation of the inner normal of the mixed cell. */ + +static PyObject *py2c_intcelcon_number_of_points_in_cell + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given is the index to a cell, starting the count at one. + * The second integer on input is the number of distinct supports. + * On return is the string representation of the number of points + * which span each component of the mixed cell. */ + +static PyObject *py2c_intcelcon_get_point_in_cell + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the n coordinates of + * the k-th point from the j-th list of the i-th cell. + * On input are the four integers: n, i, j, k, respectively + * the length of the lifted vectors in the supports, + * the index to a cell in the container, + * the index to a support of the i-th cell, and + * the index to a point in the j-th support of the i-th cell. */ + +static PyObject *py2c_intcelcon_mixed_volume + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_intcelcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_intcelcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_intcelcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_intcelcon_make_subdivision + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed cells for the lifted points stored in the + * container, with respect to the defined type of mixture. */ + +static PyObject *py2c_intcelcon_clear_mixed_cell_configuration + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the cells container. */ + +/* The wrapping of functions with prototypes in scalers.h starts from here. */ + +static PyObject *py2c_scale_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the standard systems container, + * with standard double precision arithmetic. The system in the standard + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the dobldobl systems container, + * with double double precision arithmetic. The system in the dobldobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the quaddobl systems container, + * with quad double precision arithmetic. The system in the quaddobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard solutions container with + * the scaled solutions, scaled with standard double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the dobldobl solutions container with + * the scaled solutions, scaled with double double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quaddobl solutions container with + * the scaled solutions, scaled with quad double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in a the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +/* The wrapping of functions with prototypes in reducers.h starts here. */ + +static PyObject *py2c_linear_reduce_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies linear reduction on the coefficient matrix of the system + * in the container for standard double precision. + * There is one integer parameter: whether to diagonalize or not. */ + +static PyObject *py2c_linear_reduce_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies linear reduction on the coefficient matrix of the system + * in the container for double double precision. + * There is one integer parameter: whether to diagonalize or not. */ + +static PyObject *py2c_linear_reduce_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies linear reduction on the coefficient matrix of the system + * in the container for quad double precision. + * There is one integer parameter: whether to diagonalize or not. */ + +static PyObject *py2c_nonlinear_reduce_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies nonlinear reduction on the system in the container + * for standard double precision. + * Three integer numbers are expected on input: + * (1) the maximum number of equal degree replacements, + * (2) the maximum number of computed S-polynomials, + * (3) the maximum number of computed R-polynomials. + * The system in the standard container is replace by the reduced system. + * Three numbers are returned: + * (1) the number of equal degree replacements, + * (2) the number of computed S-polynomials, + * (3) the number of computed R-polynomials. */ + +/* The wrapping of the functions with prototypes in sweep.h starts here. */ + +static PyObject *py2c_sweep_define_parameters_numerically + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the indices to the variables that serve as parameters + * numerically, that is: via integer indices. + * On entry are three integer numbers and a string. + * The string is a string representation of a Python list of integers, + * The three integers are the number of equations, the number of variables, + * and the number of parameters. The number of variables m includes the + * number of parameters. Then there should be as many as m indices in + * the list of integers to define which of the variables are parameters. */ + +static PyObject *py2c_sweep_define_parameters_symbolically + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the indices to the variables that serve as parameters + * symbolically, that is, as names of variables. + * For this to work, the symbol table must be initialized. + * On entry are four integer numbers and a string. + * The four integers are the number of equations, the number of variables, + * the number of parameters (the number of variables m includes the + * number of parameters), and the number of characters in the string. + * The string contains the names of the parameters, separated by one comma. + * For this to work, the symbol table must be initialized, e.g.: + * via the reading of a polynomial system. */ + +static PyObject *py2c_sweep_get_number_of_equations + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of equations. */ + +static PyObject *py2c_sweep_get_number_of_variables + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of variables. */ + +static PyObject *py2c_sweep_get_number_of_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of parameters. */ + +static PyObject *py2c_sweep_get_indices_numerically + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the indices of the variables that are parameters, + * as the string representation of a Python list of integers. */ + +static PyObject *py2c_sweep_get_indices_symbolically + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string with the names of the parameters, + * each separated by one space. */ + +static PyObject *py2c_sweep_clear_definitions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the definitions of the parameters. */ + +static PyObject *py2c_sweep_set_standard_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the start values for the m parameters in standard double precision, + * giving on input an integer m and 2*m doubles, with the consecutive + * real and imaginary parts for the start values of all m parameters. + * The doubles are given in a string representation of a Python + * list of doubles. */ + +static PyObject *py2c_sweep_set_standard_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the target values for the m parameters in standard double precision, + * giving on input an integer m and 2*m doubles, with the consecutive + * real and imaginary parts for the target values of all m parameters. */ + +static PyObject *py2c_sweep_set_dobldobl_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the start values for the m parameters in double double precision, + * giving on input an integer m and 4*m doubles, with the consecutive + * real and imaginary parts for the start values of all m parameters. */ + +static PyObject *py2c_sweep_set_dobldobl_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the target values for the m parameters in double double precision, + * giving on input an integer m and 4*m doubles, with the consecutive + * real and imaginary parts for the target values of all m parameters. */ + +static PyObject *py2c_sweep_set_quaddobl_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the start values for the m parameters in quad double precision, + * giving on input an integer m and 8*m doubles, with the consecutive + * real and imaginary parts for the start values of all m parameters. */ + +static PyObject *py2c_sweep_set_quaddobl_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the target values for the m parameters in quad double precision, + * giving on input an integer m and 8*m doubles, with the consecutive + * real and imaginary parts for the target values of all m parameters. */ + +static PyObject *py2c_sweep_get_standard_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Gets the start values for the parameters in standard double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the start values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_get_standard_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Gets the target values for the parameters in standard double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the target values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_get_dobldobl_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Gets the start values for the parameters in double double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the start values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_get_dobldobl_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Gets the target values for the parameters in double double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the target values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_get_quaddobl_start + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Gets the start values for the parameters in quad double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the start values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_get_quaddobl_target + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the target values for the parameters in quad double precision, + * giving on input the number n of doubles that need to be returned. + * On return will be n doubles, for the consecutive real and imaginary + * parts for the target values of all parameters, + * stored in the string representation of a Python list of doubles. */ + +static PyObject *py2c_sweep_standard_complex_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Starts the trackers in a complex convex parameter homotopy, + * in standard double precision, where the indices to the parameters, + * start and target values are already defined. Moreover, the containers + * of systems and solutions in standard double precision have been + * initialized with a parametric systems and start solutions. + * The first input parameter is 0, 1, or 2, for respectively + * a randomly generated gamma (0), or no gamma (1), or a user given + * gamma with real and imaginary parts given in 2 pointers to doubles. */ + +static PyObject *py2c_sweep_dobldobl_complex_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Starts the trackers in a complex convex parameter homotopy, + * in double double precision, where the indices to the parameters, + * start and target values are already defined. Moreover, the containers + * of systems and solutions in double double precision have been + * initialized with a parametric systems and start solutions. + * The first input parameter is 0, 1, or 2, for respectively + * a randomly generated gamma (0), or no gamma (1), or a user given + * gamma with real and imaginary parts given in 2 pointers to doubles. */ + +static PyObject *py2c_sweep_quaddobl_complex_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Starts the trackers in a complex convex parameter homotopy, + * in quad double precision, where the indices to the parameters, + * start and target values are already defined. Moreover, the containers + * of systems and solutions in quad double precision have been + * initialized with a parametric systems and start solutions. + * The first input parameter is 0, 1, or 2, for respectively + * a randomly generated gamma (0), or no gamma (1), or a user given + * gamma with real and imaginary parts given in 2 pointers to doubles. */ + +static PyObject *py2c_sweep_standard_real_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There are no input arguments to this routine. + * Starts a sweep with a natural parameter in a family of n equations + * in n+1 variables, where the last variable is the artificial parameter s + * that moves the one natural parameter from a start to target value. + * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), + * where A is the natural parameter, going from the start value v[0] + * to the target value v[1]. + * This family must be stored in the systems container in standard double + * precision and the corresponding start solutions in the standard solutions + * container, where every solution has the value v[0] for the A variable. + * The sweep stops when s reaches the value v[1], or when a singularity + * is encountered on the path. */ + +static PyObject *py2c_sweep_dobldobl_real_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There are no input arguments to this routine. + * Starts a sweep with a natural parameter in a family of n equations + * in n+1 variables, where the last variable is the artificial parameter s + * that moves the one natural parameter from a start to target value. + * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), + * where A is the natural parameter, going from the start value v[0] + * to the target value v[1]. + * This family must be stored in the systems container in double double + * precision and the corresponding start solutions in the dobldobl solutions + * container, where every solution has the value v[0] for the A variable. + * The sweep stops when s reaches the value v[1], or when a singularity + * is encountered on the path. */ + +static PyObject *py2c_sweep_quaddobl_real_run + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There are no input arguments to this routine. + * Starts a sweep with a natural parameter in a family of n equations + * in n+1 variables, where the last variable is the artificial parameter s + * that moves the one natural parameter from a start to target value. + * The last equation is of the form (1-s)*(A - v[0]) + s*(A - v[1]), + * where A is the natural parameter, going from the start value v[0] + * to the target value v[1]. + * This family must be stored in the systems container in quad double + * precision and the corresponding start solutions in the quaddobl solutions + * container, where every solution has the value v[0] for the A variable. + * The sweep stops when s reaches the value v[1], or when a singularity + * is encountered on the path. */ + +/* The wrapping for the multiplicity structure starts here. */ + +static PyObject *py2c_standard_multiplicity_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the multiplicity structure in standard double precision. + * Required is the presence of a polynomial system in the standard + * systems container and a solution in the standard solutions container. + * The input parameters are two integers and one double: + * order : the maximum differentiation order, + * verbose : 1 for verbose, 0 for silent, and + * tol : tolerance on the numerical rank. + * On return is a tuple: the multiplicity and the values + * of the Hilbert function. */ + +static PyObject *py2c_dobldobl_multiplicity_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the multiplicity structure in double double precision. + * Required is the presence of a polynomial system in the dobldobl + * systems container and a solution in the dobldobl solutions container. + * The input parameters are two integers and one double: + * order : the maximum differentiation order, + * verbose : 1 for verbose, 0 for silent, and + * tol : tolerance on the numerical rank. + * On return is a tuple: the multiplicity and the values + * of the Hilbert function. */ + +static PyObject *py2c_quaddobl_multiplicity_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the multiplicity structure in quad double precision. + * Required is the presence of a polynomial system in the quaddobl + * systems container and a solution in the quaddobl solutions container. + * The input parameters are two integers and one double: + * order : the maximum differentiation order, + * verbose : 1 for verbose, 0 for silent, and + * tol : tolerance on the numerical rank. + * On return is a tuple: the multiplicity and the values + * of the Hilbert function. */ + +/* The wrapping of the numerical tropisms container starts here. */ + +static PyObject *py2c_numbtrop_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the numerical tropisms container, + * in standard double precision. The input parameters are + * nbt : number of tropisms; + * dim : length_of_each tropism; + * wnd : winding numbers, as many as nbt; + * dir : nbt*dim doubles with the coordinates of the tropisms; + * err : errors on the tropisms, as many doubles as the value of nbt. + * The numbers in wnd, dir, and err must be given in one string, + * as the string representation of a list of doubles. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the numerical tropisms container, + * in double double precision. The input parameters are + * nbt : number of tropisms; + * dim : length_of_each tropism; + * wnd : winding numbers, as many as nbt; + * dir : 2*nbt*dim doubles with the coordinates of the tropisms; + * err : errors on the tropisms, as many doubles as the value of 2*nbt. + * The numbers in wnd, dir, and err must be given in one string, + * as the string representation of a list of doubles. + * On return is the the failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the numerical tropisms container, + * in quad double precision. The input parameters are + * nbt : number of tropisms; + * dim : length_of_each tropism; + * wnd : winding numbers, as many as nbt; + * dir : 4*nbt*dim doubles with the coordinates of the tropisms; + * err : errors on the tropisms, as many doubles as the value of 4*nbt. + * The numbers in wnd, dir, and err must be given in one string, + * as the string representation of a list of doubles. + * On return is the the failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_standard_retrieve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves all tropisms stored in standard double precision. + * + * ON ENTRY : + * nbt number of tropisms; + * dim length_of_each tropism. + * + * ON RETURN : + * wnd winding numbers, as many as nbt; + * dir nbt*dim doubles with the coordinates of the tropisms; + * err errors on the tropisms, as many doubles as the value of nbt. + * All return parameters are in one string, + * the string representation of a list of doubles. + * The failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_dobldobl_retrieve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves all tropisms stored in double double precision. + * + * ON ENTRY : + * nbt number of tropisms; + * dim length_of_each tropism. + * + * ON RETURN : + * wnd winding numbers, as many as nbt; + * dir 2*nbt*dim doubles with the coordinates of the tropisms; + * err errors on the tropisms, as many doubles as the value of 2*nbt. + * All return parameters are in one string, + * the string representation of a list of doubles. + * The failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_quaddobl_retrieve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves all tropisms stored in quad double precision. + * + * ON ENTRY : + * nbt number of tropisms; + * dim length_of_each tropism. + * + * ON RETURN : + * wnd winding numbers, as many as nbt; + * dir 4*nbt*dim doubles with the coordinates of the tropisms; + * err errors on the tropisms, as many doubles as the value of 4*nbt. + * All return parameters are in one string, + * the string representation of a list of doubles. + * The failure code, which equals zero if all went well. */ + +static PyObject *py2c_numbtrop_standard_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of tropisms, stored in standard double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_dobldobl_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of tropisms, stored in double double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_quaddobl_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of tropisms, stored in quad double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_standard_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the tropisms, stored in standard double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_dobldobl_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the tropisms, stored in double double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_quaddobl_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the tropisms, stored in quad double + * precision, in the numerical tropisms container. */ + +static PyObject *py2c_numbtrop_store_standard_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores a tropism given in standard double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by standard_size. + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as dim; + * err the error on the tropism. + * All dim+1 doubles are given in one string, + * the string representation of a list of doubles. */ + +static PyObject *py2c_numbtrop_store_dobldobl_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores a tropism given in double double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by standard_size. + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as 2*dim; + * err the error on the tropism, two doubles. + * All 2*dim+2 doubles are given in one string, + * the string representation of a list of doubles. */ + +static PyObject *py2c_numbtrop_store_quaddobl_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores a tropism given in quad double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by standard_size. + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as 4*dim; + * err the error on the tropism, four doubles. + * All 4*dim+4 doubles are given in one string, + * the string representation of a list of doubles. */ + +static PyObject *py2c_numbtrop_standard_retrieve_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns one tropism, stored in standard double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by standard_size. + * + * ON RETURN : + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as dim; + * err the error on the tropism. + * All dim+1 doubles are returned in one string, + * the string representation of a list of doubles. */ + +static PyObject *py2c_numbtrop_dobldobl_retrieve_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns one tropism, stored in double double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by numbtrop_dobldobl_size. + * + * ON RETURN : + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as 2*dim; + * err the error on the tropism, two doubles. + * All 2*dim+2 doubles are returned in one string, + * the string representation of a list of doubles. */ + +static PyObject *py2c_numbtrop_quaddobl_retrieve_tropism + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns one tropism, stored in quad double precision. + * + * ON ENTRY : + * dim the length of the tropism vector; + * idx the index of the tropism, indexing starts at one, + * and ends at nbt, what is returned by numbtrop_quaddobl_size. + * + * ON RETURN : + * wnd estimated winding number; + * dir coordinates of the tropisms, as many as 4*dim; + * err the error on the tropism, four doubles. + * All 4*dim+4 doubles are returned in one string, + * the string representation of a list of doubles.*/ + +static PyObject *py2c_numbtrop_standard_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the stored numerically computed tropisms, + * computed in standard double precision. */ + +static PyObject *py2c_numbtrop_dobldobl_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the stored numerically computed tropisms, + * computed in double double precision. */ + +static PyObject *py2c_numbtrop_quaddobl_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the stored numerically computed tropisms, + * computed in quad double precision. */ + +/* The wrapping of functions with prototypes in witset.h starts here. */ + +static PyObject *py2c_embed_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the container with its embedding of dimension d. + * The dimension d is given as the first integer parameter on input. + * The second integer parameter indicates the precision, either 0, 1, or 2, + * respectively for double, double double, or quad double precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in standard double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in double double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in quad double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system with coefficients in standard double + * precision in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system with coefficients in double double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_embed_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the Laurent system with coefficients in quad double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_swap_symbols_for_standard_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the polynomial system with standard + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_swap_symbols_for_dobldobl_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the polynomial system with double + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_swap_symbols_for_quaddobl_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the polynomial system with quad + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_swap_symbols_for_standard_Laurent_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the Laurent system with standard + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_swap_symbols_for_dobldobl_Laurent_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the Laurent system with double + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_swap_symbols_for_quaddobl_Laurent_witness_set + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the slack variables in the Laurent system with quad + * double precision coefficients and its corresponding solutions in the + * containers so the slack variables appear at the end. On input are + * two integers: the total number of variables; and + * the number of slack variables, or the dimension of the set. + * This permutation is necessary to consider the system and solutions + * stored in containers as a witness set. */ + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Laurent_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * Laurent systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Laurent_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * Laurent systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Laurent_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * Laurent systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_set_standard_to_mute + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in standard double + * precision to silent. */ + +static PyObject *py2c_factor_set_dobldobl_to_mute + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in double double + * precision to silent. */ + +static PyObject *py2c_factor_set_quaddobl_to_mute + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in quad double + * precision to silent. */ + +static PyObject *py2c_factor_set_standard_to_verbose + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in standard double + * precision to verbose. */ + +static PyObject *py2c_factor_set_dobldobl_to_verbose + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in double double + * precision to verbose. */ + +static PyObject *py2c_factor_set_quaddobl_to_verbose + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations in quad double + * precision to verbose. */ + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the output file for the factorization. + * On input are an integer and a string: + * 1) the integer equals the number of characters in the string; and + * 2) the string contains the name of a file. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_standard_assign_labels + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in standard double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_dobldobl_assign_labels + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in double double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_quaddobl_assign_labels + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in quad double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_initialize_standard_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by an ordinary polynomial system in standard double precision. + * The embedded system is taken from the polynomial systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_dobldobl_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by an ordinary polynomial system in double double precision. + * The embedded system is taken from the polynomial systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_quaddobl_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by an ordinary polynomial system in quad double precision. + * The embedded system is taken from the polynomial systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_standard_Laurent_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by a Laurent polynomial system in standard double precision. + * The embedded system is taken from the Laurent systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_dobldobl_Laurent_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by a Laurent polynomial system in double double precision. + * The embedded system is taken from the Laurent systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_quaddobl_Laurent_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set, + * defined by a Laurent polynomial system in quad double precision. + * The embedded system is taken from the Laurent systems container + * and the generic points are taken from the solutions container. + * On entry is the dimension or the number of hyperplanes + * to intersect the positive dimensional solution set with. */ + +static PyObject *py2c_factor_initialize_standard_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d, + * in standard double precision. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_initialize_dobldobl_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d, + * in double double precision. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_initialize_quaddobl_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d, + * in quad double precision. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_standard_trace_grid_diagnostics + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple of two doubles with the diagnostics on the + * trace grid computed in standard double precision. + * The first double is the largest error of the samples. + * The second double is the smallest distance between two samples. */ + +static PyObject *py2c_factor_dobldobl_trace_grid_diagnostics + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple of two doubles with the diagnostics on the + * trace grid computed in double double precision. + * The first double is the largest error of the samples. + * The second double is the smallest distance between two samples. */ + +static PyObject *py2c_factor_quaddobl_trace_grid_diagnostics + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple of two doubles with the diagnostics on the + * trace grid computed in quad double precision. + * The first double is the largest error of the samples. + * The second double is the smallest distance between two samples. */ + +static PyObject *py2c_factor_store_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container, in standard double precision, + * to the data for monodromy loops. */ + +static PyObject *py2c_factor_store_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container, in double double precision, + * to the data for monodromy loops. */ + +static PyObject *py2c_factor_store_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container, in quad double precision, + * to the data for monodromy loops. */ + +static PyObject *py2c_factor_restore_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions, in standard double precision, + * from sampler to the container. */ + +static PyObject *py2c_factor_restore_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions, in double double precision, + * from sampler to the container. */ + +static PyObject *py2c_factor_restore_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions, in quad double precision, + * from sampler to the container. */ + +static PyObject *py2c_factor_standard_track_paths + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set, + * in standard double precision. + * On input is an integer, which must be 1 if the witness set is + * defined by a Laurent polynomial system. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_dobldobl_track_paths + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set, + * in double double precision. + * On input is an integer, which must be 1 if the witness set is + * defined by a Laurent polynomial system. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_quaddobl_track_paths + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set, + * in quad double precision. + * On input is an integer, which must be 1 if the witness set is + * defined by a Laurent polynomial system. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_standard_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back, in standard double precision. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_dobldobl_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back, in double double precision. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_quaddobl_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back, in quad double precision. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_standard_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space in standard double precision. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_dobldobl_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space in double double precision. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_quaddobl_slices + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space in quad double precision. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_set_standard_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice, + * in standard double precision. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_set_dobldobl_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice, + * in double double precision. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_set_quaddobl_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice, + * in quad double precision. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_standard_gammas + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants in standard double precision + * for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_dobldobl_gammas + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants in double double precision + * for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_quaddobl_gammas + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants in quad double precision + * for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_permutation_after_standard_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a set of degree d, computes the permutation using the solutions + * most recently stored, after a loop in standard double precision. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_permutation_after_dobldobl_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a set of degree d, computes the permutation using the solutions + * most recently stored, after a loop in double double precision. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_permutation_after_quaddobl_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a set of degree d, computes the permutation using the solutions + * most recently stored, after a loop in quad double precision. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_update_standard_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements, + * computed in standard double precision. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_update_dobldobl_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements, + * computed in double double precision. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_update_quaddobl_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements, + * computed in quad double precision. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_number_of_standard_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the standard double + * precision decomposition of the witness set. */ + +static PyObject *py2c_factor_number_of_dobldobl_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the double double + * precision decomposition of the witness set. */ + +static PyObject *py2c_factor_number_of_quaddobl_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the quad double + * precision decomposition of the witness set. */ + +static PyObject *py2c_factor_witness_points_of_standard_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component, + * computed in standard double precision. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_witness_points_of_dobldobl_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component, + * computed in double double precision. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_witness_points_of_quaddobl_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component, + * computed in quad double precision. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_standard_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum, in standard double precision. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_factor_dobldobl_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum, in double double precision. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_factor_quaddobl_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum, in quad double precision. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_witset_standard_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by an ordinary polynomial system + * in standard double precision. + * The containers in standard double precision must contain the embedded + * polynomial system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 2*nvr doubles for the real and imaginary parts of the + * standard double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_dobldobl_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by an ordinary polynomial system + * in double double precision. + * The containers in double double precision must contain the embedded + * polynomial system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 4*nvr doubles for the real and imaginary parts of the + * double double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_quaddobl_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by an ordinary polynomial system + * in quad double precision. + * The containers in quad double precision must contain the embedded + * polynomial system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 8*nvr doubles for the real and imaginary parts of the + * quad double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_standard_Laurent_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by a Laurent polynomial system + * in standard double precision. + * The containers in standard double precision must contain the embedded + * Laurent system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 2*nvr doubles for the real and imaginary parts of the + * standard double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_dobldobl_Laurent_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by a Laurent polynomial system + * in double double precision. + * The containers in double double precision must contain the embedded + * Laurent system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 4*nvr doubles for the real and imaginary parts of the + * double double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_quaddobl_Laurent_membertest + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes the homotopy membership test for a point to belong to + * a witness set defined by a Laurent polynomial system + * in quad double precision. + * The containers in quad double precision must contain the embedded + * Laurent system and its corresponding solutions for the witness set + * of a positive dimensional solution set. + * On entry are the seven parameters, the first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of the point as a list with as + * many as 8*nvr doubles for the real and imaginary parts of the + * quad double precision coordinates of the test point. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_standard_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by an ordinary polynomial system in standard double precision, + * where the test point is given as a string in PHCpack format. + * The containers in standard double precision must contain the + * embedded system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_dobldobl_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by an ordinary polynomial system in double double precision, + * where the test point is given as a string in PHCpack format. + * The containers in double double precision must contain the + * embedded system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_quaddobl_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by an ordinary polynomial system in quad double precision, + * where the test point is given as a string in PHCpack format. + * The containers in quad double precision must contain the + * embedded system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_standard_Laurent_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by a Laurent polynomial system in standard double precision, + * where the test point is given as a string in PHCpack format. + * The containers in standard double precision must contain the + * embedded Laurent system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_dobldobl_Laurent_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by a Laurent polynomial system in double double precision, + * where the test point is given as a string in PHCpack format. + * The containers in double double precision must contain the + * embedded Laurent system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_witset_quaddobl_Laurent_ismember + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the homotopy membership test for a point to belong to a witness set + * defined by a Laurent polynomial system in quad double precision, + * where the test point is given as a string in PHCpack format. + * The containers in quad double precision must contain the + * embedded Laurent system and the corresponding generic points. + * On entry are seven parameters. The first four are integers: + * 1) vrb, an integer flag (0 or 1) for the verbosity of the test, + * 2) nvr, the ambient dimension, number of coordinates of the point, + * 3) dim, the dimension of the witness set, + * 4) nbc, the number of characters in the string representing the point, + * the test point is represented as a solution string in symbolic format, + * including the symbols for the variables, before the coordinates; + * the next two parameters are two doubles: + * 5) restol, tolerance on the residual for the valuation of the point, + * 6) homtol, tolerance on the homotopy membership test for the point; + * and the last parameter is a string: + * 7) tpt, the string representation of a solution which contains + * the coordinates of the test point in symbolic format. + * On return are three 0/1 integers, to be interpreted as booleans: + * 1) fail, the failure code of the procedure, + * 2) onsys, 0 if the evaluation test failed, 1 if success, + * 3) onset, 0 if not a member of the witness set, 1 if a member. */ + +static PyObject *py2c_standard_witset_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * standard double precision on return contain a witness set for the + * hypersurface defined by the ordinary polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of an ordinary polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_witset_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * double double precision on return contain a witness set for the + * hypersurface defined by the ordinary polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of an ordinary polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_witset_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * double double precision on return contain a witness set for the + * hypersurface defined by the ordinary polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of an ordinary polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_witset_of_Laurent_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * standard double precision on return contain a witness set for the + * hypersurface defined by the Laurent polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a Laurent polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_witset_of_Laurent_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * double double precision on return contain a witness set for the + * hypersurface defined by the Laurent polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a Laurent polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_witset_of_Laurent_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container in + * double double precision on return contain a witness set for the + * hypersurface defined by the Laurent polynomial in p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a Laurent polynomial in several + * variables, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container, + * in standard double precision, define the witness sets for these + * two solution sets. */ + +static PyObject *py2c_dobldobl_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container, + * in double double precision, define the witness sets for these + * two solution sets. */ + +static PyObject *py2c_quaddobl_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container, + * in quad double precision, define the witness sets for these + * two solution sets. */ + +static PyObject *py2c_standard_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b, + * in standard double precision. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_dobldobl_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b, + * in double double precision. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_quaddobl_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b, + * in quad double precision. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_extrinsic_top_diagonal_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the start and target system to + * start the extrinsic cascade to intersect two witness sets, + * respectively of dimensions a and b, with ambient dimensions + * respectively equal to n1 and n2. + * There are four integers as parameters on input: n1, n2, a and b. */ + +static PyObject *py2c_diagonal_symbols_doubler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Doubles the number of symbols in the symbol table to enable the + * writing of the target system to string properly when starting the + * cascade of a diagonal homotopy in extrinsic coordinates. + * On input are three integers, n, d, nc, and one string s. + * On input are n, the ambient dimension = #variables before the embedding, + * d is the number of slack variables, or the dimension of the first set, + * and in s (nc characters) are the symbols for the first witness set. + * This function takes the symbols in s and combines those symbols with + * those in the current symbol table for the second witness set stored + * in the standard systems container. On return, the symbol table + * contains then all symbols to write the top system in the cascade + * to start the diagonal homotopy. */ + +static PyObject *py2c_standard_collapse_diagonal + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers for standard doubles. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_collapse_diagonal + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers for double doubles. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_collapse_diagonal + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers for quad doubles. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in witsols.h starts here. */ + +static PyObject *py2c_standard_polysys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the polynomial system in + * the standard systems container. Runs in standard double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_standard_laursys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the Laurent polynomial system in + * the standard systems container. Runs in standard double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_dobldobl_polysys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the polynomial system in + * the dobldobl systems container. Runs in double double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_dobldobl_laursys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the Laurent polynomial system in + * the dobldobl systems container. Runs in double double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_quaddobl_polysys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the polynomial system in + * the quaddobl systems container. Runs in quad double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_quaddobl_laursys_solve + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the cascades of homotopies on the Laurent polynomial system in + * the quaddobl systems container. Runs in quad double precision. + * On input are five integers : + * 1) nbtasks equals the number of tasks for multitasking, + * 2) topdim is the top dimension to start the homotopy cascades, + * 3) filter is a 0 or 1 flag to filter the witness supersets, + * 4) factor is a 0 or 1 flag to factor the witness sets, + * 5) verbose is a flag for intermediate output. */ + +static PyObject *py2c_copy_standard_polysys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the systems and solutions container, + * in standard double precision. + * + * REQUIRED : + * 1) py2c_standard_polysys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_copy_standard_laursys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the Laurent systems and solutions container, + * in standard double precision. + * + * REQUIRED : + * 1) py2c_standard_laursys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_copy_dobldobl_polysys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the systems and solutions container, + * in double double precision. + * + * REQUIRED : + * 1) py2c_dobldobl_polysys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_copy_dobldobl_laursys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the Laurent systems and solutions container, + * in double double precision. + * + * REQUIRED : + * 1) py2c_dobldobl_laursys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_copy_quaddobl_polysys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the systems and solutions container, + * in quad double precision. + * + * REQUIRED : + * 1) py2c_quaddobl_polysys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_copy_quaddobl_laursys_witset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * There is one integer parameter dim on input, + * which represents the dimension of the witness set. + * Copies the witness set representation for a solution set + * of dimension dim into the Laurent systems and solutions container, + * in quad double precision. + * + * REQUIRED : + * 1) py2c_quaddobl_laursys_solve was executed successfully, and + * 2) dim is in the range 0..topdim. */ + +static PyObject *py2c_clear_standard_witsols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the witness solutions in standard double precision. */ + +static PyObject *py2c_clear_dobldobl_witsols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the witness solutions in double double precision. */ + +static PyObject *py2c_clear_quaddobl_witsols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the witness solutions in quad double precision. */ + +/* The wrapping of functions with prototypes in schubert.h starts here. */ + +static PyObject *py2c_schubert_pieri_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of p-plane producing curves of degree q + * that meet m*p + q*(m+p) given general m-planes. + * On input are three integer numbers: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; and + * 3) q, the degree of the curve that produces p-planes. + * The dimension of the ambient space of this Pieri problem is m+p. */ + +static PyObject *py2c_schubert_resolve_conditions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resolves a general Schubert intersection condition in n-space + * for k-planes subject to conditions defined by brackers. + * On return is the root count, the number of k-planes that satisfy + * the intersection conditions imposed by the brackets for general flags. + * On entry are five integers and one string: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c, the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen. */ + +static PyObject *py2c_schubert_standard_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space, + * in standard double precision. + * The polynomial system that was solved is in the container for + * systems with coefficients in standard double precision and the + * corresponding solutions are in the standard solutions container. + * On entry are nine integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: if 0, then no intermediate output is written, + * if 1, then the resolution is dispayed on screen; + * 7) the flag verify: if 0, then no diagnostic output is written to file, + * if 1, then diagnostic output is written to file; + * 8) the flag minrep: if 0, then all minors are used in the system, + * if 1, then a minimal representation of the problem is used; + * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, + * if 1, then the overdetermined systems are squared; + * 10) nbchar, the number of characters in the string filename; + * 11) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_dobldobl_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space, + * in double double precision. + * The polynomial system that was solved is in the container for + * systems with coefficients in double double precision and the + * corresponding solutions are in the dobldobl solutions container. + * On entry are nine integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: if 0, then no intermediate output is written, + * if 1, then the resolution is dispayed on screen; + * 7) the flag verify: if 0, then no diagnostic output is written to file, + * if 1, then diagnostic output is written to file; + * 8) the flag minrep: if 0, then all minors are used in the system, + * if 1, then a minimal representation of the problem is used; + * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, + * if 1, then the overdetermined systems are squared; + * 10) nbchar, the number of characters in the string filename; + * 11) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_quaddobl_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space, + * in quad double precision. + * The polynomial system that was solved is in the container for + * systems with coefficients in quad double precision and the + * corresponding solutions are in the quaddobl solutions container. + * On entry are nine integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, then no intermediate output is written, + * when 1, then the resolution is dispayed on screen; + * 7) the flag verify: when 0, then no diagnostic output is written to file, + * when 1, then diagnostic output is written to file; + * 8) the flag minrep: if 0, then all minors are used in the system, + * if 1, then a minimal representation of the problem is used; + * 9) the flag tosquare: if 0, then Gauss-Newton path trackers run, + * if 1, then the overdetermined systems are squared; + * 10) nbchar, the number of characters in the string filename; + * 11) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_localization_poset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the localization poset for the + * Pieri root count for m, p, and q. The input parameters are the + * integer values for m, p, and q: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the curves that produce p-planes. */ + +static PyObject *py2c_schubert_pieri_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. + * On return the systems container for systems with coefficients in standard + * double precision contains the polynomial system solved and in the + * solutions in standard double precision are in the solutions container. + * On entry are four integers and two strings: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, the string with m*p + q*(m+p) random complex input m-planes, + * where the real and imaginary parts are separated by a space; + * 6) pts, the string with m*p + q*(m+p) random complex interpolation + * points, only needed if q > 0. + * The function returns the combinatorial Pieri root count, + * which should equal the number of solutions in the container. */ + +static PyObject *py2c_schubert_osculating_planes + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of n real m-planes in + * d-space osculating a rational normal curve + * at the n points in s, where n = m*p + q*(m+p) and d = m+p. + * On entry are four integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string pts; and + * 5) pts, the string with m*p + q*(m+p) interpolation points. */ + +static PyObject *py2c_schubert_pieri_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Fills the container of systems with coefficients in standard + * double precision with a polynomial system that expresses the + * intersection conditions of a general Pieri problem. + * On input are five integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, m*p + q*(m+p) random complex input m-planes, where + * the real and imaginary parts are separated by a space; + * 6) a flag is_real: if == 1, then the coefficients of A are real, + * if == 0, then the coefficients of A are complex. + * Returns the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions with prototypes in mapcon.h starts here. */ + +static PyObject *py2c_mapcon_solve_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the binomial system stored in the Laurent systems container. + * There is one input argument, either one or zero. + * If one, then only the pure top dimensional solutions are computed. + * If zero, then all solution sets are computed. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_write_maps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the maps stored in the container to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_clear_maps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the maps stored in the container. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_top_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the top dimension of the maps in the container. */ + +static PyObject *py2c_mapcon_number_of_maps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of maps in the container. */ + +static PyObject *py2c_mapcon_degree_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the dimension and index of a map, given as two integers as + * input parameters, returns the degree of that map. */ + +static PyObject *py2c_mapcon_coefficients_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the coefficients of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of complex doubles. */ + +static PyObject *py2c_mapcon_exponents_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the exponents of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of integers. */ + +/* The wrapping of functions with prototypes in series.h starts below. */ + +static PyObject *py2c_standard_Newton_series ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in standard double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in standard double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the standard systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_series ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in double double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in double double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the double double systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_series ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in quad double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in quad double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the quad double systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_power_series + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in standard double precision, and in the standard systems pool the + * leading terms of the power series, this function runs Newton's method + * to compute power series solutions of the system in the container, + * in standard double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the standard systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_power_series + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in double double precision, and in the dobldobl systems pool the + * leading terms of the power series, this function runs Newton's method + * to compute power series solutions of the system in the container, + * in double double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the double double systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_power_series + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in quad double precision, and in the quaddobl systems pool the + * leading terms of the power series, this function runs Newton's method + * to compute power series solutions of the system in the container, + * in quad double precision. There are four integers on input: + * 1) the index of the series parameter; + * 2) the maximal degree of the series; + * 3) the number of Newton steps to be done on each solution; + * 4) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The solution series are stored in the quad double systems pool. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Pade_approximant + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in standard double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in standard double precision, followed by the construction of the + * Pade approximants, for each solution. There are five integers on input: + * 1) the index of the series parameter; + * 2) the degree of the numerator of the Pade approximant; + * 3) the degree of the denominator of the Pade approximant; + * 4) the number of Newton steps to be done on each solution; + * 5) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The Pade approximants are stored in the standard systems pool, + * numerators in the odd indexed entries and denominators in the entries + * with even index in each system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Pade_approximant + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in double double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in double double precision, followed by the construction of the + * Pade approximants, for each solution. There are five integers on input: + * 1) the index of the series parameter; + * 2) the degree of the numerator of the Pade approximant; + * 3) the degree of the denominator of the Pade approximant; + * 4) the number of Newton steps to be done on each solution; + * 5) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The Pade approximants are stored in the dobldobl systems pool, + * numerators in the odd indexed entries and denominators in the entries + * with even index in each system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Pade_approximant + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the systems container a polynomial system with coefficients + * in quad double precision, and in the solutions container the + * leading coefficients of the power series, this function runs Newton's + * method to compute power series solutions of the system in the container, + * in quad double precision, followed by the construction of the + * Pade approximants, for each solution. There are five integers on input: + * 1) the index of the series parameter; + * 2) the degree of the numerator of the Pade approximant; + * 3) the degree of the denominator of the Pade approximant; + * 4) the number of Newton steps to be done on each solution; + * 5) a 0/1-flag to indicate whether additional diagnostic output needs + * to be written to screen. + * The Pade approximants are stored in the quaddobl systems pool, + * numerators in the odd indexed entries and denominators in the entries + * with even index in each system. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of Pade continuation starts here. */ + +static PyObject *py2c_padcon_set_default_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the default values of the homotopy continuation parameters. */ + +static PyObject *py2c_padcon_clear_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the allocated space for the parameters. */ + +static PyObject *py2c_padcon_get_homotopy_continuation_parameter + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the value of the k-th continuation parameter, + * if k ranges between 1 and 12. The integer k is given on entry. */ + +static PyObject *py2c_padcon_set_homotopy_continuation_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The gamma constant is the first homotopy continuation parameter. + * The gamma is a complex number and it should be given as two + * doubles, as its real and imaginary part respectively. */ + +static PyObject *py2c_padcon_set_homotopy_continuation_parameter + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the value of the k-th continuation parameter to the given value. + * The first parameter k is an integer number between 2 and 12. + * The second parameter is the value of the k-th parameter, + * parsed as a floating point number. */ + +static PyObject *py2c_padcon_standard_track + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target, start system, and start solutions, + * launches the Pade continuation in standard double precision. + * Seven input parameters are expected: + * 1) the number of characters in the name of the output file; + * 2) a string which defines the name of the output file, + * if the string is empty, then no file is created; + * 3) a flag to indicate whether the output file is the defined output file + * (value 1 of the flag), or whether the file is local (value 0); + * 4) an integer for the verbose flag, if zero, then no extra + * information is written to file or to screen; + * 5) an integer for the homogenization, if zero, tracking happens in + * affine space, if one, then tracking happens in 1-projective space, + * if m, for m > 1, then multihomogenization is applied; + * 6) an integer for the number of variables, 0 if the fifth parameter m + * is zero or one; + * 7) a string with the index representation for the partition of the + * set of variables, if the fifth parameter m is larger than one. */ + +static PyObject *py2c_padcon_dobldobl_track + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target, start system, and start solutions, + * launches the Pade continuation in double double precision. + * Seven input parameters are expected: + * 1) the number of characters in the name of the output file; + * 2) a string which defines the name of the output file, + * if the string is empty, then no file is created; + * 3) a flag to indicate whether the output file is the defined output file + * (value 1 of the flag), or whether the file is local (value 0); + * 4) an integer for the verbose flag, if zero, then no extra + * information is written to file or to screen; + * 5) an integer for the homogenization, if zero, tracking happens in + * affine space, if one, then tracking happens in 1-projective space, + * if m, for m > 1, then multihomogenization is applied; + * 6) an integer for the number of variables, 0 if the fifth parameter m + * is zero or one; + * 7) a string with the index representation for the partition of the + * set of variables, if the fifth parameter m is larger than one. */ + +static PyObject *py2c_padcon_quaddobl_track + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target, start system, and start solutions, + * launches the Pade continuation in quad double precision. + * Seven input parameters are expected: + * 1) the number of characters in the name of the output file, + * 2) a string which defines the name of the output file, + * if the string is empty, then no file is created; + * 3) a flag to indicate whether the output file is the defined output file + * (value 1 of the flag), or whether the file is local (value 0); + * 4) an integer for the verbose flag, if zero, then no extra + * information is written to file or to screen; + * 5) an integer for the homogenization, if zero, tracking happens in + * affine space, if one, then tracking happens in 1-projective space, + * if m, for m > 1, then multihomogenization is applied; + * 6) an integer for the number of variables, 0 if the fifth parameter m + * is zero or one; + * 7) a string with the index representation for the partition of the + * set of variables, if the fifth parameter m is larger than one. */ + +static PyObject *py2c_padcon_standard_initialize_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target and start system, + * initializes the homotopy in standard double precision, + * for the step-by-step Pade continuation. + * On entry are two parameters, the verbose flag which is zero or one, + * and the homogeneous flag which is zero or one. + * If the verbose flag is 1, then extra output will be written. + * If the homogeneous flag is 1, tracking happens in projective space. */ + +static PyObject *py2c_padcon_dobldobl_initialize_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target and start system, + * initializes the homotopy in double double precision, + * for the step-by-step Pade continuation. + * On entry are two parameters, the verbose flag which is zero or one, + * and the homogeneous flag which is zero or one. + * If the verbose flag is 1, then extra output will be written. + * If the homogeneous flag is 1, tracking happens in projective space. */ + +static PyObject *py2c_padcon_quaddobl_initialize_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the defined target and start system, + * initializes the homotopy in quad double precision, + * for the step-by-step Pade continuation. + * On entry is one parameter, the verbose flag which is zero or one, + * and the homogeneous flag which is zero or one. + * If the verbose flag is 1, then extra output will be written. + * If the homogeneous flag is 1, tracking happens in projective space. */ + +static PyObject *py2c_padcon_standard_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integers: 1) the index for the continuation + * parameter in the natural homotopy and 2) the verbose flag. + * With the system, defined as target system, and the index + * for the continuation parameter, initializes the homotopy in + * standard double precision for the step-by-step Pade continuation. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_dobldobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integers: 1) the index for the continuation + * parameter in the natural homotopy and 2) the verbose flag. + * With the system, defined as target system, and the index + * for the continuation parameter, initializes the homotopy in + * double double precision for the step-by-step Pade continuation. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_quaddobl_initialize_parameter_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integers: 1) the index for the continuation + * parameter in the natural homotopy and 2) the verbose flag. + * With the system, defined as target system, and the index + * for the continuation parameter, initializes the homotopy in + * quad double precision for the step-by-step Pade continuation. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the solution with a given index in the solutions container in + * standard double precision and initializes the series-Pade tracker. + * On entry are two integers: 1) the index of the position of the solution + * in the container and 2) the verbose flag, which is zero or one. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the solution with a given index in the solutions container in + * double double precision and initializes the series-Pade tracker. + * On entry are two integers: 1) the index of the position of the solution + * in the container and 2) the verbose flag, which is zero or one. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the solution with a given index in the solutions container in + * quad double precision and initializes the series-Pade tracker. + * On entry are two integers: 1) the index of the position of the solution + * in the container and 2) the verbose flag, which is zero or one. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_standard_predict_correct + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes one predict-correct step on the current solution and + * the defined homotopy in standard double precision. + * On entry is one integer, the verbose flag which is zero or one. + * On return is the failure code of the predict-correct step: + * if zero, then the required accuracies were met, + * otherwise, either the predict or the correct step failed. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_dobldobl_predict_correct + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes one predict-correct step on the current solution and + * the defined homotopy in double double precision. + * On entry is one integer, the verbose flag which is zero or one. + * On return is the failure code of the predict-correct step: + * if zero, then the required accuracies were met, + * otherwise, either the predict or the correct step failed. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_quaddobl_predict_correct + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Executes one predict-correct step on the current solution and + * the defined homotopy in quad double precision. + * On entry is one integer, the verbose flag which is zero or one. + * On return is the failure code of the predict-correct step: + * if zero, then the required accuracies were met, + * otherwise, either the predict or the correct step failed. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_get_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integer parameters: 1) the index of the position of + * the solution and 2) the verbose flag, which is zero or one. + * Retrieves the current solution and places it at the given position + * in the solutions container in standard double precision. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_get_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integer parameters: 1) the index of the position of + * the solution and 2) the verbose flag, which is zero or one. + * Retrieves the current solution and places it at the given position + * in the solutions container in double double precision. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_get_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On entry are two integer parameters: 1) the index of the position of + * the solution and 2) the verbose flag, which is zero or one. + * Retrieves the current solution and places it at the given position + * in the solutions container in quad double precision. + * If the verbose flag is 1, then extra output will be written. */ + +static PyObject *py2c_padcon_standard_pole_radius + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the smallest pole radius computed + * by the predictor in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_pole_radius + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the smallest pole radius computed + * by the predictor in double double precision. + * The returned number is the high part of the double double number. */ + +static PyObject *py2c_padcon_quaddobl_pole_radius + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the smallest pole radius computed + * by the predictor in quad double precision. + * The returned number is the highest part of the quad double number. */ + +static PyObject *py2c_padcon_standard_closest_pole + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the complex number representation of the closest pole, + * computed by the predictor in standard double precision. + * Results are meaningful only if the real part >= 0.0. */ + +static PyObject *py2c_padcon_dobldobl_closest_pole + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the complex number representation of the closest pole, + * computed by the predictor in double double precision. + * The returned numbers are the high parts of the double doubles. + * Results are meaningful only if the real part >= 0.0. */ + +static PyObject *py2c_padcon_quaddobl_closest_pole + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the complex number representation of the closest pole, + * computed by the predictor in quad double precision. + * The returned numbers are the highest parts of the quad doubles. + * Results are meaningful only if the real part >= 0.0. */ + +static PyObject *py2c_padcon_standard_t_value + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current t value of the path tracker + * which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_t_value + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current t value of the path tracker + * which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_t_value + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current t value of the path tracker + * which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_step_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current step size of the path tracker + * which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_step_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current step size of the path tracker + * which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_step_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current step size of the path tracker + * which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_series_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current series step size of the path tracker + * which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_series_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current series step size of the path tracker + * which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_series_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current series step size of the path tracker + * which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_pole_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current pole step size of the path tracker + * which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_pole_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current pole step size of the path tracker + * which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_pole_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current pole step size of the path tracker + * which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_estimated_distance + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the estimated distance to the closest solution by + * the path tracker which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_estimated_distance + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the estimated distance to the closest solution by + * the path tracker which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_estimated_distance + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the estimated distance to the closest solution by + * the path tracker which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_hessian_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current Hessian step size of the path tracker + * which runs in standard double precision. */ + +static PyObject *py2c_padcon_dobldobl_hessian_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current Hessian step size of the path tracker + * which runs in double double precision. */ + +static PyObject *py2c_padcon_quaddobl_hessian_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current Hessian step size of the path tracker + * which runs in quad double precision. */ + +static PyObject *py2c_padcon_standard_series_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the series + * coefficient of component with leadidx at position idx, + * of the series computed by the predictor in double precision. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_dobldobl_series_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the series + * coefficient of component with leadidx at position idx, of the + * series computed by the predictor in double double precision. + * The doubles are the highest parts of the double doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_quaddobl_series_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the series + * coefficient of component with leadidx at position idx, of the + * series computed by the predictor in quad double precision. + * The doubles are the highest parts of the quad doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_standard_numerator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the + * coefficient of the numerator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in double precision. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_dobldobl_numerator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the + * coefficient of the numerator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in double double precision. + * The doubles are the highest parts of the double doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_quaddobl_numerator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the series + * coefficient of the numerator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in quad double precision. + * The doubles are the highest parts of the quad doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_standard_denominator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the + * coefficient of the denominator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in double precision. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_dobldobl_denominator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the + * coefficient of the denominator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in double double precision. + * The doubles are the highest parts of the double doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_quaddobl_denominator_coefficient + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the series + * coefficient of the denominator of the Pade approximant, + * at the component with leadidx at position idx, + * computed by the predictor in quad double precision. + * The doubles are the highest parts of the quad doubles. + * The integers leadidx and idx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_standard_pole ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the pole + * Pade approximant with leadidx at position poleidx, + * computed by the predictor in double precision. + * The integers leadidx and poleidx are two input parameters, + * the third input integer is the verbose flag. */ + +static PyObject *py2c_padcon_dobldobl_pole ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the pole + * Pade approximant with leadidx at position poleidx, + * computed by the predictor in double double precision. + * The integers leadidx and poleidx are two input parameters, + * the third input integer is the verbose flag. + * The returned doubles are the highest parts of the double doubles. */ + +static PyObject *py2c_padcon_quaddobl_pole ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a tuple: the real and imaginary parts of the pole + * Pade approximant with leadidx at position poleidx, + * computed by the predictor in quad double precision. + * The integers leadidx and poleidx are two input parameters, + * the third input integer is the verbose flag. + * The returned doubles are the highest parts of the quad doubles. */ + +static PyObject *py2c_padcon_clear_standard_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data for the series-Pade tracker in double precision. */ + +static PyObject *py2c_padcon_clear_dobldobl_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data for the series-Pade tracker + * in double double precision. */ + +static PyObject *py2c_padcon_clear_quaddobl_data + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data for the series-Pade tracker + * in quad double precision. */ + +/* The wrapping of functions with prototypes in syspool.h starts below. */ + +static PyObject *py2c_syspool_standard_init ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the size of the pool for systems with complex coefficients + * in standard double precision, with the value given on input. */ + +static PyObject *py2c_syspool_dobldobl_init ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the size of the pool for systems with complex coefficients + * in double double precision, with the value given on input. */ + +static PyObject *py2c_syspool_quaddobl_init ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the size of the pool for systems with complex coefficients + * in quad double precision, with the value given on input. */ + +static PyObject *py2c_syspool_standard_size ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the size of the pool for systems in standard double precision. */ + +static PyObject *py2c_syspool_dobldobl_size ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the size of the pool for systems in double double precision. */ + +static PyObject *py2c_syspool_quaddobl_size ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the size of the pool for systems in quad double precision. */ + +static PyObject *py2c_syspool_standard_create + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the index k (k between one and the size of the pool), + * and with a system defined in the standard double system container, + * that system is stored as the k-th system in the standard system pool. */ + +static PyObject *py2c_syspool_dobldobl_create + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the index k (k between one and the size of the pool), + * and with a system defined in the double double system container, + * that system is stored as the k-th system in the dobldobl system pool. */ + +static PyObject *py2c_syspool_quaddobl_create + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the index k (k between one and the size of the pool), + * and with a system defined in the quad double system container, + * that system is stored as the k-th system in the quaddobl system pool. */ + +static PyObject *py2c_syspool_copy_to_standard_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the k-th system in the pool for systems in standard double + * precision to the standard systems container. + * The value for k is given as an integer input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syspool_copy_to_dobldobl_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the k-th system in the pool for systems in double double + * precision to the dobldobl systems container. + * The value for k is given as an integer input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syspool_copy_to_quaddobl_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the k-th system in the pool for systems in quad double + * precision to the quaddobl systems container. + * The value for k is given as an integer input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syspool_standard_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the pool for systems in standard double precision. */ + +static PyObject *py2c_syspool_dobldobl_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the pool for systems in double double precision. */ + +static PyObject *py2c_syspool_quaddobl_clear + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the pool for systems in quad double precision. */ + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using standard double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the standard systems container. + * The two other input parameters are two doubles: the real and imaginary + * part of the gamma constant. If the integer parameter equals zero and + * if the two input doubles are not both zero, then the input gamma constant + * will be used, otherwise, if the two input doubles are zero and the first + * integer parameter is zero as well, then a random gamma constant will + * be generated. */ + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using double double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the dobldobl systems container. + * The two other input parameters are two doubles: the real and imaginary + * part of the gamma constant. If the integer parameter equals zero and + * if the two input doubles are not both zero, then the input gamma constant + * will be used, otherwise, if the two input doubles are zero and the first + * integer parameter is zero as well, then a random gamma constant will + * be generated. */ + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using quad double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the quaddobl systems container. + * The two other input parameters are two doubles: the real and imaginary + * part of the gamma constant. If the integer parameter equals zero and + * if the two input doubles are not both zero, then the input gamma constant + * will be used, otherwise, if the two input doubles are zero and the first + * integer parameter is zero as well, then a random gamma constant will + * be generated. */ + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using arbitrary multiprecision arithmetic. + * There is are two integer numbers on input: + * 1) one to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used; and + * 2) the number of decimal places in the working precision. + * Before calling this routine the target and start system must + * be copied over from the multprec systems container. */ + +static PyObject *py2c_initialize_varbprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the variable precision homotopy with the target and + * start system stored in the strings. + * On entry are three integers and two strings, in the following order: + * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant + * is used, if 0, a random value for gamma will be generated; + * 2) nc_target, the number of characters in the string target; + * 3) target, the string representation of the target system; + * 4) nc_start, the number of characters in the string start; + * 5) start, the string representation of the start system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the standard solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the dobldobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the quaddobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the multprec solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Uses the string representation of a solution to initialize the + * variable precision path tracker with. + * There are three input parameters, two integers and one string: + * 1) nv, the number of variables in the solution; + * 2) nc, the number of characters in the string sol; + * 3) sol, the string representation of a solution. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with standard double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the standard solutions container. + * The functions py2c_initialized_standard_tracker and + * py2c_initialize_standard_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with double double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the dobldobl solutions container. + * The functions py2c_initialized_dobldobl_tracker and + * py2c_initialize_dobldobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with quad double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the quaddobl solutions container. + * The functions py2c_initialized_quaddobl_tracker and + * py2c_initialize_quaddobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with arbitrary + * multiprecision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the multprec solutions container. + * The functions py2c_initialized_multprec_tracker and + * py2c_initialize_multprec_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on a solution path in variable precision. + * There are four integer input parameters: + * 1) the number of correct decimal places in the solution; + * 2) an upper bound on the number of decimal places in the precision; + * 3) the maximum number of Newton iterations; + * 4) a flag zero or one to indicate the verbose level. + * On return is a tuple: + * 0) the failure code, which equals zero if all went well; and + * 1) the string representation of the next solution on the path. */ + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the standard double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the double double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the quad double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the arbitrary multiprecision tracker + * with a generator. */ + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the variable precision tracker + * with a generator. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in lib2path.h, starts here. */ + +static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in double + * double double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The quaddobl systems container contains a valid polynomial system + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_get_default_path_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the precision (16, 32, or 64), returns the tuple with the + * default values for the path parameters. + * + * ON ENTRY : + * prec an integer value, 16, 32, or 64 to indicate double, + * double double, or quad double precision respectively. + * + * ON RETURN : + * t a 14-tuple with the defaults for the path parameters: + * t[0] maximum number of steps along a path; + * t[1] number of points used in the predictor; + * t[2] increase factor of the predictor; + * t[3] decrease factor of the precdictor; + * t[4] maximum step size along a path; + * t[5] maximum step size at the end of a path; + * t[6] minimum step size; + * t[7] tolerance on the residual; + * t[8] tolerance on the corrector update; + * t[9] tolerance on the first correction update; + * t[10] maximum number of iterations of the corrector; + * t[11] tolerance on the corrector; + * t[12] number of steps in the Newton root refiner; + * t[13] tolerance for the final refinement. */ + +static PyObject *py2c_ade_manypaths_d_pars ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * All values of the 14 path parameters must be provided, + * default values are obtained with py2c_get_default_path_parameters. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant; + * par00 maximum number of steps along a path; + * par01 number of points used in the predictor; + * par02 increase factor of the predictor; + * par03 decrease factor of the precdictor; + * par04 maximum step size along a path; + * par05 maximum step size at the end of a path; + * par06 minimum step size; + * par07 tolerance on the residual; + * par08 tolerance on the corrector update; + * par09 tolerance on the first correction update; + * par10 maximum number of iterations of the corrector; + * par11 tolerance on the corrector; + * par12 number of steps in the Newton root refiner; + * par13 tolerance for the final refinement. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_dd_pars ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * All values of the 14 path parameters must be provided, + * default values are obtained with py2c_get_default_path_parameters. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant; + * par00 maximum number of steps along a path; + * par01 number of points used in the predictor; + * par02 increase factor of the predictor; + * par03 decrease factor of the precdictor; + * par04 maximum step size along a path; + * par05 maximum step size at the end of a path; + * par06 minimum step size; + * par07 tolerance on the residual; + * par08 tolerance on the corrector update; + * par09 tolerance on the first correction update; + * par10 maximum number of iterations of the corrector; + * par11 tolerance on the corrector; + * par12 number of steps in the Newton root refiner; + * par13 tolerance for the final refinement. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_qd_pars ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * All values of the 14 path parameters must be provided, + * default values are obtained with py2c_get_default_path_parameters. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant; + * par00 maximum number of steps along a path; + * par01 number of points used in the predictor; + * par02 increase factor of the predictor; + * par03 decrease factor of the precdictor; + * par04 maximum step size along a path; + * par05 maximum step size at the end of a path; + * par06 minimum step size; + * par07 tolerance on the residual; + * par08 tolerance on the corrector update; + * par09 tolerance on the first correction update; + * par10 maximum number of iterations of the corrector; + * par11 tolerance on the corrector; + * par12 number of steps in the Newton root refiner; + * par13 tolerance for the final refinement. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_d.cpp phcpack-2.4.85/src/Mod/phcpy2cpath_d.cpp --- phcpack-2.4.84/src/Mod/phcpy2cpath_d.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_d.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,5582 @@ +/* This file phcpy2cpath_d.cpp contains the definitions of the prototypes + * in phcpy2cpath_d.h, for compilation with the g++ compiler. */ + +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "scalers.h" +#include "witset.h" +#include "mapcon.h" +#include "next_track.h" +#include "structmember.h" +#include "adepath_d.h" +#include "gpupath_d.h" + +extern void adainit ( void ); +extern void adafinal ( void ); + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +/* The wrapping functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +/* moving systems from and to containers */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) +{ + int fail,rc,nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_system(&rc,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nbtasks = 0; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; + fail = solve_Laurent_system(&rc,silent,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* wrapping functions in giftwrappers.h starts from here */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + nbr = support_size(); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; + fail = syscon_random_system(n,m,d,c); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free (exp); + free (c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in solcon.h starts from here */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_open_solution_input_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_dobldobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_quaddobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_multprec_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_dobldobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_quaddobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_multprec_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_standard_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_dobldobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_quaddobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_multprec_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_standard_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_dobldobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_quaddobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_multprec_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_standard_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_multprec_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_standard_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_dobldobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_quaddobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_multprec_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + + /* printf("Calling solcon_append_solution_string ...\n"); */ + + fail = solcon_append_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_dobldobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_quaddobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_multprec_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_dobldobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_quaddobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_multprec_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_standard_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_standard_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in product.h starts here */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = supporting_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 1024; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_structure_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = parse_set_structure(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ) +{ + int fail,result; + + initialize(); + if (!PyArg_ParseTuple(args,"i",&result)) return NULL; + fail = is_set_structure_supporting(&result); + + return Py_BuildValue("i",result); +} + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ) +{ + int fail,r; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = linear_product_root_count(&r); + + return Py_BuildValue("i",r); +} + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = random_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solve_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char partition[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); + + return Py_BuildValue("(i,s)",mbz,partition); +} + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_partition_Bezout_number(&mbz,ncp,partition); + + return Py_BuildValue("i",mbz); +} + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_homogeneous_start_system(ncp,partition); + + return Py_BuildValue("i",mbz); +} + +/* wrapping functions in celcon.h starts here */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = celcon_initialize_supports(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ) +{ + int fail,r,cnt; + char *strmix; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; + + cnt = itemcount(strmix); + { + int mix[cnt]; + + str2intlist(cnt,strmix,mix); + fail = celcon_set_type_of_mixture(r,mix); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) +{ + int fail,r,nbc; + int mix[64]; + char strmix[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = celcon_type_of_mixture(&r,mix); + nbc = intlist2str(r,mix,strmix); + + return Py_BuildValue("s",strmix); +} + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,cnt; + char *strpoint; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; + + cnt = itemcount(strpoint); + { + double point[cnt]; + + str2dbllist(cnt,strpoint,point); + fail = celcon_append_lifted_point(dim,ind,point); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,sup,ind,nbc; + char strpoint[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; + { + double liftedpoint[dim]; + + fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); + nbc = dbllist2str(dim,liftedpoint,strpoint); + } + + return Py_BuildValue("s",strpoint); +} + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ) +{ + int fail,mv; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_mixed_volume_of_supports(&mv); + + return Py_BuildValue("i",mv); +} + +static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) +{ + int fail,length; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_number_of_cells(&length); + + return Py_BuildValue("i",length); +} + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_dobldobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_quaddobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_dobldobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_quaddobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_dobldobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_quaddobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_dobldobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_quaddobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_clear_mixed_cell_configuration(); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) +{ + int d,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&d)) return NULL; + fail = embed_system(d); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_state_to_silent(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ) +{ + int n,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; + fail = define_output_file_with_string(n,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) +{ + int n,nbsols,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; + { + double x[2*n+5]; + int i,j,m; + + for(i=1; i<=nbsols; i++) + { + /* printf("... retrieving solution %d ...\n", i); */ + fail = solcon_retrieve_solution(n,i,&m,x); + /* printf("fail = %d, m = %d\n", fail, m); + printf("printing the coordinates : \n"); + for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ + m = i; + /* printf("... replacing solution %d ...\n", i); */ + fail = solcon_replace_solution(n,i,m,x); + /* printf("... done replacing solution solution %d ...\n", i); */ + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = initialize_sampler(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ) +{ + int n,d,k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; + fail = initialize_monodromy(n,d,k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = store_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = restore_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = track_paths(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = swap_slices(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) +{ + int k,n,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; + fail = new_slices(k,n); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ) +{ + int first,fail; + double r[2]; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&first)) return NULL; + + if(first == 1) /* determine constant coefficient */ + { + r[0] = -1.0; r[1] = 0.0; + } + else + { + r[0] = +1.0; r[1] = 0.0; + } + fail = assign_coefficient_of_slice(0,0,r); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) +{ + int n,i,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + + { + double re_gamma[n]; + double im_gamma[n]; + + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_irreducible_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_irreducible_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple + (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; +/* + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, + "Sets the state to monodromy permutations to silent."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_assign_labels", py2c_factor_assign_labels, + METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, + METH_VARARGS, + "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, + METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, + "Stores the solutions in the container to the data for monodromy loops."}, + {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, + METH_VARARGS, + "Restores the first initialized solutions from sampler to the container."}, + {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, + "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, + "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, + METH_VARARGS, + "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, + METH_VARARGS, + "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_components", py2c_factor_number_of_components, + METH_VARARGS, + "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, + {"py2c_factor_witness_points_of_component", + py2c_factor_witness_points_of_component, + METH_VARARGS, + "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, + METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, + METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, + {"py2c_start_diagonal_cascade_solutions", + py2c_start_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_littlewood_richardson_homotopies", + py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_d", py2c_ade_newton_d, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_d", py2c_ade_onepath_d, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_d", py2c_ade_manypaths_d, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_newton_d", py2c_gpu_newton_d, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The standard systems container must contain a valid polynomial system\n and the standard solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_onepath_d", py2c_gpu_onepath_d, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_manypaths_d", py2c_gpu_manypaths_d, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the standard solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +PyMODINIT_FUNC initphcpy2c(void) +{ + Py_InitModule("phcpy2c", phcpy2c_methods); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_dd.cpp phcpack-2.4.85/src/Mod/phcpy2cpath_dd.cpp --- phcpack-2.4.84/src/Mod/phcpy2cpath_dd.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_dd.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,5582 @@ +/* This file phcpy2cpath_dd.cpp contains the definitions of the prototypes + * in phcpy2cpath_dd.h, for compilation with the g++ compiler. */ + +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "scalers.h" +#include "witset.h" +#include "mapcon.h" +#include "next_track.h" +#include "structmember.h" +#include "adepath_dd.h" +#include "gpupath_dd.h" + +extern void adainit ( void ); +extern void adafinal ( void ); + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +/* The wrapping functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +/* moving systems from and to containers */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) +{ + int fail,rc,nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_system(&rc,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nbtasks = 0; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; + fail = solve_Laurent_system(&rc,silent,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* wrapping functions in giftwrappers.h starts from here */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + nbr = support_size(); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; + fail = syscon_random_system(n,m,d,c); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free (exp); + free (c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in solcon.h starts from here */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_open_solution_input_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_dobldobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_quaddobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_multprec_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_dobldobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_quaddobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_multprec_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_standard_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_dobldobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_quaddobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_multprec_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_standard_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_dobldobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_quaddobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_multprec_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_standard_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_multprec_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_standard_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_dobldobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_quaddobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_multprec_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + + /* printf("Calling solcon_append_solution_string ...\n"); */ + + fail = solcon_append_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_dobldobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_quaddobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_multprec_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_dobldobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_quaddobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_multprec_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_standard_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_standard_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in product.h starts here */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = supporting_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 1024; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_structure_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = parse_set_structure(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ) +{ + int fail,result; + + initialize(); + if (!PyArg_ParseTuple(args,"i",&result)) return NULL; + fail = is_set_structure_supporting(&result); + + return Py_BuildValue("i",result); +} + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ) +{ + int fail,r; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = linear_product_root_count(&r); + + return Py_BuildValue("i",r); +} + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = random_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solve_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char partition[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); + + return Py_BuildValue("(i,s)",mbz,partition); +} + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_partition_Bezout_number(&mbz,ncp,partition); + + return Py_BuildValue("i",mbz); +} + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_homogeneous_start_system(ncp,partition); + + return Py_BuildValue("i",mbz); +} + +/* wrapping functions in celcon.h starts here */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = celcon_initialize_supports(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ) +{ + int fail,r,cnt; + char *strmix; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; + + cnt = itemcount(strmix); + { + int mix[cnt]; + + str2intlist(cnt,strmix,mix); + fail = celcon_set_type_of_mixture(r,mix); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) +{ + int fail,r,nbc; + int mix[64]; + char strmix[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = celcon_type_of_mixture(&r,mix); + nbc = intlist2str(r,mix,strmix); + + return Py_BuildValue("s",strmix); +} + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,cnt; + char *strpoint; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; + + cnt = itemcount(strpoint); + { + double point[cnt]; + + str2dbllist(cnt,strpoint,point); + fail = celcon_append_lifted_point(dim,ind,point); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,sup,ind,nbc; + char strpoint[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; + { + double liftedpoint[dim]; + + fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); + nbc = dbllist2str(dim,liftedpoint,strpoint); + } + + return Py_BuildValue("s",strpoint); +} + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ) +{ + int fail,mv; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_mixed_volume_of_supports(&mv); + + return Py_BuildValue("i",mv); +} + +static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) +{ + int fail,length; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_number_of_cells(&length); + + return Py_BuildValue("i",length); +} + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_dobldobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_quaddobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_dobldobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_quaddobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_dobldobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_quaddobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_dobldobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_quaddobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_clear_mixed_cell_configuration(); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) +{ + int d,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&d)) return NULL; + fail = embed_system(d); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_state_to_silent(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ) +{ + int n,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; + fail = define_output_file_with_string(n,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) +{ + int n,nbsols,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; + { + double x[2*n+5]; + int i,j,m; + + for(i=1; i<=nbsols; i++) + { + /* printf("... retrieving solution %d ...\n", i); */ + fail = solcon_retrieve_solution(n,i,&m,x); + /* printf("fail = %d, m = %d\n", fail, m); + printf("printing the coordinates : \n"); + for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ + m = i; + /* printf("... replacing solution %d ...\n", i); */ + fail = solcon_replace_solution(n,i,m,x); + /* printf("... done replacing solution solution %d ...\n", i); */ + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = initialize_sampler(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ) +{ + int n,d,k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; + fail = initialize_monodromy(n,d,k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = store_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = restore_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = track_paths(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = swap_slices(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) +{ + int k,n,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; + fail = new_slices(k,n); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ) +{ + int first,fail; + double r[2]; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&first)) return NULL; + + if(first == 1) /* determine constant coefficient */ + { + r[0] = -1.0; r[1] = 0.0; + } + else + { + r[0] = +1.0; r[1] = 0.0; + } + fail = assign_coefficient_of_slice(0,0,r); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) +{ + int n,i,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + + { + double re_gamma[n]; + double im_gamma[n]; + + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_irreducible_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_irreducible_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple + (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; +/* + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, + "Sets the state to monodromy permutations to silent."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_assign_labels", py2c_factor_assign_labels, + METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, + METH_VARARGS, + "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, + METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, + "Stores the solutions in the container to the data for monodromy loops."}, + {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, + METH_VARARGS, + "Restores the first initialized solutions from sampler to the container."}, + {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, + "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, + "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, + METH_VARARGS, + "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, + METH_VARARGS, + "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_components", py2c_factor_number_of_components, + METH_VARARGS, + "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, + {"py2c_factor_witness_points_of_component", + py2c_factor_witness_points_of_component, + METH_VARARGS, + "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, + METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, + METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, + {"py2c_start_diagonal_cascade_solutions", + py2c_start_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_littlewood_richardson_homotopies", + py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_dd", py2c_ade_newton_dd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_dd", py2c_ade_onepath_dd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_dd", py2c_ade_manypaths_dd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_newton_dd", py2c_gpu_newton_dd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The dobldobl systems container must contain a valid polynomial system\n and the dobldobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_onepath_dd", py2c_gpu_onepath_dd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_manypaths_dd", py2c_gpu_manypaths_dd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in double double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the dobldobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +PyMODINIT_FUNC initphcpy2c(void) +{ + Py_InitModule("phcpy2c", phcpy2c_methods); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_dd.h phcpack-2.4.85/src/Mod/phcpy2cpath_dd.h --- phcpack-2.4.84/src/Mod/phcpy2cpath_dd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_dd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,3200 @@ +/* This file contains the prototypes for the py2c interface functions, + * linked with the double double version of the Path library. */ + +void initialize ( void ); +/* + * DESCRIPTION : + * Calls adainit(), initializing the interface to the Ada code, + * setting the initialized flag to one and the finalized flag to zero, + * if the initialized flag was zero. + * Nothing happens if the initialized flag equals one. */ + +void finalize ( void ); +/* + * DESCRIPTION : + * Calls adafinal(), finalizing the interface to the Ada code, + * setting the finalized flag to one and the initialized flag to zero, + * if the finalized flag was zero. + * Nothing happens if the finalized flag equals one. */ + +/* The wrapping of functions with prototypes in phcpack.h starts here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the version string of PHCpack. + * The version string is 40 characters long. */ + +static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the value of the integer given on input + * and sets the seed for the random number generators. + * This fixing of the seed enables reproducible runs. */ + +static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of the seed. + * Using this value in py2c_set_seed will ensure that the + * results of previous runs can be reproduced. */ + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to define the output file. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in standard double precision + * to screen or to the defined output file. */ + +/* Copying systems from and to containers. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the target system. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the target system. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the target system. */ + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the target system. */ + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the start system. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the start system. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the start system. */ + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the start system. */ + +/* Creation of homotopy and the tracking of all paths. */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in standard double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in double double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in quad double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in arbitrary multiprecision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start solutions in standard double precision either to + * the screen (standard output) or to the defined output file. + * On return is the failure code, which is zero if all is well. */ + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to tune the continuation parameters. */ + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Shows the current values of the continuation parameters. */ + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tunes the values of the continuation parameters. + * On input are two integers: + * 1) the difficulty level of the solution paths; and + * 2) the number of decimal places in the precision. */ + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to determine the level of output + * during the path tracking. */ + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in arbitrary multiprecision. + * On input is one integer: the number of decimal places in the precision. + * On return is the failure code, which is zero when all went well. */ + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the target solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the target solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the target solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the target solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the start solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the start solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the start solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the start solutions in arbitrary multiprecision. */ + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in standard double precision. + * One integer is expected on input: the number of tasks. + * If that number is zero, then no multitasking is applied. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard systems container. */ + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in standard double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; and + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard Laurent systems + * container. */ + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed volume, and the stable mixed volume as well if + * the input parameter equals 1. On return is the mixed volume, or + * a tuple with the mixed volume and the stable mixed volume. */ + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in standard double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in double double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in quad double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the system in + * the standard systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the system in + * the dobldobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the system in + * the quaddobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the system in + * the multprec systems container and to the solutions in the container. + * On input is an integer, the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the Laurent + * system in the standard Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the Laurent + * system in the dobldobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the Laurent + * system in the quaddobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the Laurent + * system in the multprec Laurent systems container and to the solutions + * in the container. + * On input is an integer: the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies Newton's method in variable precision. + * There are six input parameters: + * 1) the dimension: the number of variables and equations; + * 2) the accuracy, expressed as the correct number of decimal places; + * 3) the maximum number of iterations in Newton's method; + * 4) an upper bound on the number of decimal places in the precision; + * 5) a string, with the representation of the polynomials in the system. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in unisolvers.h starts here. */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with standard double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the standard systems container. After the call of this function, + * the standard solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with double double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the dobldobl systems container. After the call of this function, + * the dobldobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with quad double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the quaddobl systems container. After the call of this function, + * the quaddobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with arbitrary multiprecision arithmetic. + * On input are three numbers: + * 1) the number of decimal places in the working precision; + * 2) the maximum number of iterations in the method of Weierstrass; and + * 3) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the multprec systems container. After the call of this function, + * the multprec solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a planar point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * On return is the string representation of the vertex points, + * sorted so that each two consecutive points define an edge. */ + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * When the function returns, the internal data structures + * to store the convex hull are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of facets of the given dimension. + * On input is an integer, the dimension of the facet. */ + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a facet. + * On input are two integer numbers: + * 1) the dimension of the facet; + * 2) the index of the facet. */ + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension three. */ + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension four. */ + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation of + * the support of the first Laurent polynomial in the container. */ + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the support + * of a Laurent polynomial. */ + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the string representation of the support set + * that was stored internally by the call py2c_giftwrap_support_size. */ + +static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the Laurent systems container by its initial form. + * There are three input parameters: + * 1) the dimension, number of coordinates in the inner normal; + * 2) the number of characters in the string representation for the normal; + * 3) the string representation of the inner normal. + * On return is the failure code, which equals zero if all went well. */ + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in standard double precision. + * The system will be placed in the standard systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in standard double precision. + * The system will be placed in the standard Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in double double precision. + * The system will be placed in the dobldobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in double double precision. + * The system will be placed in the dobldobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in quad double precision. + * The system will be placed in the quaddobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in quad double precision. + * The system will be placed in the quaddobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in arbitrary multiprecision. The one input parameter is an integer, + * the number of decimal places in the working precision. + * The system will be placed in the multprec systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in arbitrary multiprecision. The one input parameter is + * an integer, the number of decimal places in the working precision. + * The system will be placed in the multprec Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in standard double precision. + * There are four integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]. */ + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with standard double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with standard double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with double double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with double double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with quad double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with quad double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with arbitrary multiprecision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with arbitrary multiprecision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of symbols in the symbol table. */ + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the symbols in the symbol table to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string that contains the symbols in the symbol table. + * The symbols are separate from each other by one space. */ + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Removes a symbol, given by name, from the symbol table. + * On input are two arguments: + * 1) an integer, as the number of characters in the name; + * 2) a string of characters with the name of the symbol. + * The failure code is returned, which equals zero when all went well. */ + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the symbol table. */ + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in standard + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in double + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in quad + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in arbitrary + * multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * standard double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * double double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * quad double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * arbitrary multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in standard double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in double double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in quad double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in arbitrary multiprecision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th polynomial stored in the + * container for systems with coefficients in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th Laurent polynomial stored + * in the container for Laurent polynomials systems with coefficients + * in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves one term of a polynomial with coefficients in standard + * double precision, that is stored in the systems container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns in d the total degree of the system with coefficients in + * standard double precision, as stored in the container. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syson_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in solcon.h starts here. */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in standard double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in double double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in quad double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in arbitrary multiprecision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in standard double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in double double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in quad double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in arbitrary multiprecision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in standard double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in double double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in quad double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in arbitrary multiprecision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for the name of the input file for the solutions and + * opens the input file. All subsequent reading happens from this input. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in standard double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in double double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in quad double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in arbitrary multiprecision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in standard double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in double double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in quad double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in arbitrary multiprecision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current standard solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current dobldobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current quaddobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current multprec solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in standard double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in arbitrary multiprecision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current standard double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current double double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current quad double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current arbitrary multiprecision solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current standard double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in standard double precision in the container. */ + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current double double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in double double precision in the container. */ + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current quad double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in quad double precision in the container. */ + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current multiprecision solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in arbitrary multiprecision in the container. */ + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in standard double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in double double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in quad double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in arbitrary multiprecision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in standard double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in double double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in quad double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in arbitrary multiprecision, + * as stored in the container. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions in product.h starts here. */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a supporting set structure for the system stored in the + * container with coefficients in standard double precision. */ + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the supporting set structure to screen. */ + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the set structure. */ + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Parses a given string into a set structure. + * On input are two parameters, one integer and one string: + * 1) the number of characters in the given string; and + * 2) the characters in the string. + * On return is the failure code, if zero, then the string + * has been parsed into a valid set structure. */ + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Checks whether the stored set structure is supporting + * for the system in the standard systems container. + * Returns an integer which represents true (1) or false (0). */ + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the linear-product root count, computed from + * the supporting set structure. */ + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a random linear-product system based on the + * stored set structure. On return is the failure code, + * which equals zero if all went well. */ + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes all solutions to the linear-product system + * and stores the solutions in the container for solutions + * in standard double precision. On return is the failure + * code, which equals zero if all went well. */ + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the set structure. */ + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system in the standard systems container, + * a heuristic partition of the set of variables may + * lead to a Bezout number that is smaller than the total degree. + * On return is the m-homogeneous Bezout number for the + * string representation of the partition that is returned + * as the second argument in the tuple. */ + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, computes + * the m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, constructs + * an m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +/* The wrapping of functions with prototypes in celcon.h starts here. */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_celcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string representation of a lifted point. + * On input are three integer numbers: + * 1) the number of coordinates in the lifted point; + * 2) the index to the support set; and + * 3) the index to the point in that support set. */ + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_celcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in standard double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in double double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in quad double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in standard double precision is copied + * from the cell container to the container for systems with + * coefficients in standard double precision. */ + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in double double precision is copied + * from the cell container to the container for systems with + * coefficients in double double precision. */ + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in quad double precision is copied + * from the cell container to the container for systems with + * coefficients in quad double precision. */ + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in standard double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in double double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in quad double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using standard double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in standard double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using double double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in double double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using quad double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in quad double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in standard double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in double double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in quad double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with standard double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with double double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with quad double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data in the cell container. */ + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the standard systems container, + * with standard double precision arithmetic. The system in the standard + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the dobldobl systems container, + * with double double precision arithmetic. The system in the dobldobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the quaddobl systems container, + * with quad double precision arithmetic. The system in the quaddobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard solutions container with + * the scaled solutions, scaled with standard double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the dobldobl solutions container with + * the scaled solutions, scaled with double double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quaddobl solutions container with + * the scaled solutions, scaled with quad double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in a the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in standard double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations to silent. */ + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the output file for the factorization. + * On input are an integer and a string: + * 1) the integer equals the number of characters in the string; and + * 2) the string contains the name of a file. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in standard double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set. + * On entry is the dimension or the number of hyperplanes + * to slide the positive dimensional solution set. */ + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container to the data for monodromy loops. */ + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions from sampler to the container. */ + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_permutation_after_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a solution set of degree d, computes the permutation using the + * solutions most recently stored, after a loop. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_update_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the current + * decomposition of the witness set. */ + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_witness_set_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container on + * return contain a witness set for the hypersurface defined by p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a polynomial, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_create_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. */ + +static PyObject *py2c_start_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_extrinsic_top_diagonal_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the start and target system to + * start the extrinsic cascade to intersect two witness sets, + * respectively of dimensions a and b, with ambient dimensions + * respectively equal to n1 and n2. + * There are four integers as parameters on input: n1, n2, a and b. */ + +static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of Pieri and Littlewood-Richardson homotopies, + * with prototypes in schubert.h starts here. */ + +static PyObject *py2c_schubert_pieri_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of p-plane producing curves of degree q + * that meet m*p + q*(m+p) given general m-planes. + * On input are three integer numbers: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; and + * 3) q, the degree of the curve that produces p-planes. + * The dimension of the ambient space of this Pieri problem is m+p. */ + +static PyObject *py2c_schubert_resolve_conditions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resolves a general Schubert intersection condition in n-space + * for k-planes subject to conditions defined by brackers. + * On return is the root count, the number of k-planes that satisfy + * the intersection conditions imposed by the brackets for general flags. + * On entry are five integers and one string: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c, the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen. */ + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space. + * The polynomial system that was solved is in the container for + * systems with coefficients in standard double precision and the + * corresponding solutions are in the standard solutions container. + * On entry are six integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen; + * 7) nbchar, the number of characters in the string filename; + * 8) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_localization_poset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the localization poset for the + * Pieri root count for m, p, and q. The input parameters are the + * integer values for m, p, and q: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the curves that produce p-planes. */ + +static PyObject *py2c_schubert_pieri_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. + * On return the systems container for systems with coefficients in standard + * double precision contains the polynomial system solved and in the + * solutions in standard double precision are in the solutions container. + * On entry are four integers and two strings: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, the string with m*p + q*(m+p) random complex input m-planes, + * where the real and imaginary parts are separated by a space; + * 6) pts, the string with m*p + q*(m+p) random complex interpolation + * points, only needed if q > 0. + * The function returns the combinatorial Pieri root count, + * which should equal the number of solutions in the container. */ + +static PyObject *py2c_schubert_osculating_planes + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of n real m-planes in + * d-space osculating a rational normal curve + * at the n points in s, where n = m*p + q*(m+p) and d = m+p. + * On entry are four integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string pts; and + * 5) pts, the string with m*p + q*(m+p) interpolation points. */ + +static PyObject *py2c_schubert_pieri_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Fills the container of systems with coefficients in standard + * double precision with a polynomial system that expresses the + * intersection conditions of a general Pieri problem. + * On input are five integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, m*p + q*(m+p) random complex input m-planes, where + * the real and imaginary parts are separated by a space; + * 6) a flag is_real: if == 1, then the coefficients of A are real, + * if == 0, then the coefficients of A are complex. + * Returns the failure code, which equals zero if all went well. */ + +/* The wrapping functions in mapcon.h starts here. */ + +static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the binomial system stored in the Laurent systems container. + * There is one input argument, either one or zero. + * If one, then only the pure top dimensional solutions are computed. + * If zero, then all solution sets are computed. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the maps stored in the container to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the maps stored in the container. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the top dimension of the maps in the container. */ + +static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of maps in the container. */ + +static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the dimension and index of a map, given as two integers as + * input parameters, returns the degree of that map. */ + +static PyObject *py2c_mapcon_coefficients_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the coefficients of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of complex doubles. */ + +static PyObject *py2c_mapcon_exponents_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the exponents of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of integers. */ + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using standard double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the standard systems container. */ + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using double double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the dobldobl systems container. */ + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using quad double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the quaddobl systems container. */ + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using arbitrary multiprecision arithmetic. + * There is are two integer numbers on input: + * 1) one to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used; and + * 2) the number of decimal places in the working precision. + * Before calling this routine the target and start system must + * be copied over from the multprec systems container. */ + +static PyObject *py2c_initialize_varprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the variable precision homotopy with the target and + * start system stored in the strings. + * On entry are three integers and two strings, in the following order: + * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant + * is used, if 0, a random value for gamma will be generated; + * 2) nc_target, the number of characters in the string target; + * 3) target, the string representation of the target system; + * 4) nc_start, the number of characters in the string start; + * 5) start, the string representation of the start system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the standard solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the dobldobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the quaddobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the multprec solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Uses the string representation of a solution to initialize the + * variable precision path tracker with. + * There are three input parameters, two integers and one string: + * 1) nv, the number of variables in the solution; + * 2) nc, the number of characters in the string sol; + * 3) sol, the string representation of a solution. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with standard double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the standard solutions container. + * The functions py2c_initialized_standard_tracker and + * py2c_initialize_standard_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with double double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the dobldobl solutions container. + * The functions py2c_initialized_dobldobl_tracker and + * py2c_initialize_dobldobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with quad double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the quaddobl solutions container. + * The functions py2c_initialized_quaddobl_tracker and + * py2c_initialize_quaddobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with arbitrary + * multiprecision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the multprec solutions container. + * The functions py2c_initialized_multprec_tracker and + * py2c_initialize_multprec_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on a solution path in variable precision. + * There are four integer input parameters: + * 1) the number of correct decimal places in the solution; + * 2) an upper bound on the number of decimal places in the precision; + * 3) the maximum number of Newton iterations; + * 4) a flag zero or one to indicate the verbose level. + * On return is a tuple: + * 0) the failure code, which equals zero if all went well; and + * 1) the string representation of the next solution on the path. */ + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the standard double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the double double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the quad double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the arbitrary multiprecision tracker + * with a generator. */ + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the variable precision tracker + * with a generator. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in double double precision by the + * functions in adepath_dd.h, starts here. */ + +static PyObject *py2c_ade_newton_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in double + * double double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_onepath_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in double + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in double double precision on the GPU + * by the functions in gpupath_dd.h, starts here. */ + +static PyObject *py2c_gpu_newton_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The dobldobl systems container contains a valid polynomial system + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_gpu_onepath_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_gpu_manypaths_dd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU and GPU + * in double double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The start and target systems have been defined + * and the dobldobl solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_d.h phcpack-2.4.85/src/Mod/phcpy2cpath_d.h --- phcpack-2.4.84/src/Mod/phcpy2cpath_d.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_d.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,3197 @@ +/* This file contains the prototypes for the py2c interface functions, + * linked with the double version of the Path library. */ + +void initialize ( void ); +/* + * DESCRIPTION : + * Calls adainit(), initializing the interface to the Ada code, + * setting the initialized flag to one and the finalized flag to zero, + * if the initialized flag was zero. + * Nothing happens if the initialized flag equals one. */ + +void finalize ( void ); +/* + * DESCRIPTION : + * Calls adafinal(), finalizing the interface to the Ada code, + * setting the finalized flag to one and the initialized flag to zero, + * if the finalized flag was zero. + * Nothing happens if the finalized flag equals one. */ + +/* The wrapping of functions with prototypes in phcpack.h starts here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the version string of PHCpack. + * The version string is 40 characters long. */ + +static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the value of the integer given on input + * and sets the seed for the random number generators. + * This fixing of the seed enables reproducible runs. */ + +static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of the seed. + * Using this value in py2c_set_seed will ensure that the + * results of previous runs can be reproduced. */ + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to define the output file. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in standard double precision + * to screen or to the defined output file. */ + +/* Copying systems from and to containers. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the target system. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the target system. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the target system. */ + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the target system. */ + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the start system. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the start system. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the start system. */ + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the start system. */ + +/* Creation of homotopy and the tracking of all paths. */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in standard double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in double double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in quad double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in arbitrary multiprecision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start solutions in standard double precision either to + * the screen (standard output) or to the defined output file. + * On return is the failure code, which is zero if all is well. */ + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to tune the continuation parameters. */ + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Shows the current values of the continuation parameters. */ + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tunes the values of the continuation parameters. + * On input are two integers: + * 1) the difficulty level of the solution paths; and + * 2) the number of decimal places in the precision. */ + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to determine the level of output + * during the path tracking. */ + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in arbitrary multiprecision. + * On input is one integer: the number of decimal places in the precision. + * On return is the failure code, which is zero when all went well. */ + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the target solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the target solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the target solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the target solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the start solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the start solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the start solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the start solutions in arbitrary multiprecision. */ + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in standard double precision. + * One integer is expected on input: the number of tasks. + * If that number is zero, then no multitasking is applied. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard systems container. */ + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in standard double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; and + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard Laurent systems + * container. */ + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed volume, and the stable mixed volume as well if + * the input parameter equals 1. On return is the mixed volume, or + * a tuple with the mixed volume and the stable mixed volume. */ + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in standard double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in double double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in quad double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the system in + * the standard systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the system in + * the dobldobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the system in + * the quaddobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the system in + * the multprec systems container and to the solutions in the container. + * On input is an integer, the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the Laurent + * system in the standard Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the Laurent + * system in the dobldobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the Laurent + * system in the quaddobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the Laurent + * system in the multprec Laurent systems container and to the solutions + * in the container. + * On input is an integer: the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies Newton's method in variable precision. + * There are six input parameters: + * 1) the dimension: the number of variables and equations; + * 2) the accuracy, expressed as the correct number of decimal places; + * 3) the maximum number of iterations in Newton's method; + * 4) an upper bound on the number of decimal places in the precision; + * 5) a string, with the representation of the polynomials in the system. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in unisolvers.h starts here. */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with standard double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the standard systems container. After the call of this function, + * the standard solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with double double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the dobldobl systems container. After the call of this function, + * the dobldobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with quad double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the quaddobl systems container. After the call of this function, + * the quaddobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with arbitrary multiprecision arithmetic. + * On input are three numbers: + * 1) the number of decimal places in the working precision; + * 2) the maximum number of iterations in the method of Weierstrass; and + * 3) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the multprec systems container. After the call of this function, + * the multprec solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a planar point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * On return is the string representation of the vertex points, + * sorted so that each two consecutive points define an edge. */ + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * When the function returns, the internal data structures + * to store the convex hull are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of facets of the given dimension. + * On input is an integer, the dimension of the facet. */ + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a facet. + * On input are two integer numbers: + * 1) the dimension of the facet; + * 2) the index of the facet. */ + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension three. */ + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension four. */ + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation of + * the support of the first Laurent polynomial in the container. */ + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the support + * of a Laurent polynomial. */ + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the string representation of the support set + * that was stored internally by the call py2c_giftwrap_support_size. */ + +static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the Laurent systems container by its initial form. + * There are three input parameters: + * 1) the dimension, number of coordinates in the inner normal; + * 2) the number of characters in the string representation for the normal; + * 3) the string representation of the inner normal. + * On return is the failure code, which equals zero if all went well. */ + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in standard double precision. + * The system will be placed in the standard systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in standard double precision. + * The system will be placed in the standard Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in double double precision. + * The system will be placed in the dobldobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in double double precision. + * The system will be placed in the dobldobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in quad double precision. + * The system will be placed in the quaddobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in quad double precision. + * The system will be placed in the quaddobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in arbitrary multiprecision. The one input parameter is an integer, + * the number of decimal places in the working precision. + * The system will be placed in the multprec systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in arbitrary multiprecision. The one input parameter is + * an integer, the number of decimal places in the working precision. + * The system will be placed in the multprec Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in standard double precision. + * There are four integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]. */ + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with standard double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with standard double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with double double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with double double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with quad double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with quad double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with arbitrary multiprecision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with arbitrary multiprecision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of symbols in the symbol table. */ + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the symbols in the symbol table to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string that contains the symbols in the symbol table. + * The symbols are separate from each other by one space. */ + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Removes a symbol, given by name, from the symbol table. + * On input are two arguments: + * 1) an integer, as the number of characters in the name; + * 2) a string of characters with the name of the symbol. + * The failure code is returned, which equals zero when all went well. */ + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the symbol table. */ + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in standard + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in double + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in quad + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in arbitrary + * multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * standard double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * double double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * quad double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * arbitrary multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in standard double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in double double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in quad double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in arbitrary multiprecision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th polynomial stored in the + * container for systems with coefficients in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th Laurent polynomial stored + * in the container for Laurent polynomials systems with coefficients + * in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves one term of a polynomial with coefficients in standard + * double precision, that is stored in the systems container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns in d the total degree of the system with coefficients in + * standard double precision, as stored in the container. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syson_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in solcon.h starts here. */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in standard double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in double double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in quad double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in arbitrary multiprecision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in standard double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in double double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in quad double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in arbitrary multiprecision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in standard double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in double double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in quad double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in arbitrary multiprecision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for the name of the input file for the solutions and + * opens the input file. All subsequent reading happens from this input. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in standard double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in double double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in quad double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in arbitrary multiprecision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in standard double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in double double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in quad double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in arbitrary multiprecision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current standard solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current dobldobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current quaddobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current multprec solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in standard double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in arbitrary multiprecision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current standard double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current double double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current quad double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current arbitrary multiprecision solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current standard double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in standard double precision in the container. */ + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current double double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in double double precision in the container. */ + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current quad double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in quad double precision in the container. */ + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current multiprecision solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in arbitrary multiprecision in the container. */ + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in standard double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in double double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in quad double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in arbitrary multiprecision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in standard double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in double double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in quad double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in arbitrary multiprecision, + * as stored in the container. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions in product.h starts here. */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a supporting set structure for the system stored in the + * container with coefficients in standard double precision. */ + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the supporting set structure to screen. */ + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the set structure. */ + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Parses a given string into a set structure. + * On input are two parameters, one integer and one string: + * 1) the number of characters in the given string; and + * 2) the characters in the string. + * On return is the failure code, if zero, then the string + * has been parsed into a valid set structure. */ + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Checks whether the stored set structure is supporting + * for the system in the standard systems container. + * Returns an integer which represents true (1) or false (0). */ + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the linear-product root count, computed from + * the supporting set structure. */ + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a random linear-product system based on the + * stored set structure. On return is the failure code, + * which equals zero if all went well. */ + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes all solutions to the linear-product system + * and stores the solutions in the container for solutions + * in standard double precision. On return is the failure + * code, which equals zero if all went well. */ + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the set structure. */ + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system in the standard systems container, + * a heuristic partition of the set of variables may + * lead to a Bezout number that is smaller than the total degree. + * On return is the m-homogeneous Bezout number for the + * string representation of the partition that is returned + * as the second argument in the tuple. */ + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, computes + * the m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, constructs + * an m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +/* The wrapping of functions with prototypes in celcon.h starts here. */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_celcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string representation of a lifted point. + * On input are three integer numbers: + * 1) the number of coordinates in the lifted point; + * 2) the index to the support set; and + * 3) the index to the point in that support set. */ + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_celcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in standard double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in double double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in quad double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in standard double precision is copied + * from the cell container to the container for systems with + * coefficients in standard double precision. */ + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in double double precision is copied + * from the cell container to the container for systems with + * coefficients in double double precision. */ + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in quad double precision is copied + * from the cell container to the container for systems with + * coefficients in quad double precision. */ + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in standard double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in double double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in quad double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using standard double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in standard double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using double double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in double double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using quad double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in quad double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in standard double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in double double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in quad double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with standard double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with double double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with quad double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data in the cell container. */ + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the standard systems container, + * with standard double precision arithmetic. The system in the standard + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the dobldobl systems container, + * with double double precision arithmetic. The system in the dobldobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the quaddobl systems container, + * with quad double precision arithmetic. The system in the quaddobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard solutions container with + * the scaled solutions, scaled with standard double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the dobldobl solutions container with + * the scaled solutions, scaled with double double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quaddobl solutions container with + * the scaled solutions, scaled with quad double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in a the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in standard double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations to silent. */ + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the output file for the factorization. + * On input are an integer and a string: + * 1) the integer equals the number of characters in the string; and + * 2) the string contains the name of a file. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in standard double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set. + * On entry is the dimension or the number of hyperplanes + * to slide the positive dimensional solution set. */ + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container to the data for monodromy loops. */ + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions from sampler to the container. */ + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_permutation_after_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a solution set of degree d, computes the permutation using the + * solutions most recently stored, after a loop. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_update_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the current + * decomposition of the witness set. */ + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_witness_set_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container on + * return contain a witness set for the hypersurface defined by p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a polynomial, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_create_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. */ + +static PyObject *py2c_start_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_extrinsic_top_diagonal_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the start and target system to + * start the extrinsic cascade to intersect two witness sets, + * respectively of dimensions a and b, with ambient dimensions + * respectively equal to n1 and n2. + * There are four integers as parameters on input: n1, n2, a and b. */ + +static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of Pieri and Littlewood-Richardson homotopies, + * with prototypes in schubert.h starts here. */ + +static PyObject *py2c_schubert_pieri_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of p-plane producing curves of degree q + * that meet m*p + q*(m+p) given general m-planes. + * On input are three integer numbers: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; and + * 3) q, the degree of the curve that produces p-planes. + * The dimension of the ambient space of this Pieri problem is m+p. */ + +static PyObject *py2c_schubert_resolve_conditions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resolves a general Schubert intersection condition in n-space + * for k-planes subject to conditions defined by brackers. + * On return is the root count, the number of k-planes that satisfy + * the intersection conditions imposed by the brackets for general flags. + * On entry are five integers and one string: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c, the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen. */ + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space. + * The polynomial system that was solved is in the container for + * systems with coefficients in standard double precision and the + * corresponding solutions are in the standard solutions container. + * On entry are six integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen; + * 7) nbchar, the number of characters in the string filename; + * 8) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_localization_poset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the localization poset for the + * Pieri root count for m, p, and q. The input parameters are the + * integer values for m, p, and q: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the curves that produce p-planes. */ + +static PyObject *py2c_schubert_pieri_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. + * On return the systems container for systems with coefficients in standard + * double precision contains the polynomial system solved and in the + * solutions in standard double precision are in the solutions container. + * On entry are four integers and two strings: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, the string with m*p + q*(m+p) random complex input m-planes, + * where the real and imaginary parts are separated by a space; + * 6) pts, the string with m*p + q*(m+p) random complex interpolation + * points, only needed if q > 0. + * The function returns the combinatorial Pieri root count, + * which should equal the number of solutions in the container. */ + +static PyObject *py2c_schubert_osculating_planes + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of n real m-planes in + * d-space osculating a rational normal curve + * at the n points in s, where n = m*p + q*(m+p) and d = m+p. + * On entry are four integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string pts; and + * 5) pts, the string with m*p + q*(m+p) interpolation points. */ + +static PyObject *py2c_schubert_pieri_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Fills the container of systems with coefficients in standard + * double precision with a polynomial system that expresses the + * intersection conditions of a general Pieri problem. + * On input are five integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, m*p + q*(m+p) random complex input m-planes, where + * the real and imaginary parts are separated by a space; + * 6) a flag is_real: if == 1, then the coefficients of A are real, + * if == 0, then the coefficients of A are complex. + * Returns the failure code, which equals zero if all went well. */ + +/* The wrapping functions in mapcon.h starts here. */ + +static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the binomial system stored in the Laurent systems container. + * There is one input argument, either one or zero. + * If one, then only the pure top dimensional solutions are computed. + * If zero, then all solution sets are computed. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the maps stored in the container to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the maps stored in the container. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the top dimension of the maps in the container. */ + +static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of maps in the container. */ + +static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the dimension and index of a map, given as two integers as + * input parameters, returns the degree of that map. */ + +static PyObject *py2c_mapcon_coefficients_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the coefficients of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of complex doubles. */ + +static PyObject *py2c_mapcon_exponents_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the exponents of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of integers. */ + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using standard double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the standard systems container. */ + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using double double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the dobldobl systems container. */ + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using quad double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the quaddobl systems container. */ + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using arbitrary multiprecision arithmetic. + * There is are two integer numbers on input: + * 1) one to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used; and + * 2) the number of decimal places in the working precision. + * Before calling this routine the target and start system must + * be copied over from the multprec systems container. */ + +static PyObject *py2c_initialize_varprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the variable precision homotopy with the target and + * start system stored in the strings. + * On entry are three integers and two strings, in the following order: + * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant + * is used, if 0, a random value for gamma will be generated; + * 2) nc_target, the number of characters in the string target; + * 3) target, the string representation of the target system; + * 4) nc_start, the number of characters in the string start; + * 5) start, the string representation of the start system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the standard solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the dobldobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the quaddobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the multprec solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Uses the string representation of a solution to initialize the + * variable precision path tracker with. + * There are three input parameters, two integers and one string: + * 1) nv, the number of variables in the solution; + * 2) nc, the number of characters in the string sol; + * 3) sol, the string representation of a solution. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with standard double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the standard solutions container. + * The functions py2c_initialized_standard_tracker and + * py2c_initialize_standard_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with double double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the dobldobl solutions container. + * The functions py2c_initialized_dobldobl_tracker and + * py2c_initialize_dobldobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with quad double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the quaddobl solutions container. + * The functions py2c_initialized_quaddobl_tracker and + * py2c_initialize_quaddobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with arbitrary + * multiprecision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the multprec solutions container. + * The functions py2c_initialized_multprec_tracker and + * py2c_initialize_multprec_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on a solution path in variable precision. + * There are four integer input parameters: + * 1) the number of correct decimal places in the solution; + * 2) an upper bound on the number of decimal places in the precision; + * 3) the maximum number of Newton iterations; + * 4) a flag zero or one to indicate the verbose level. + * On return is a tuple: + * 0) the failure code, which equals zero if all went well; and + * 1) the string representation of the next solution on the path. */ + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the standard double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the double double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the quad double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the arbitrary multiprecision tracker + * with a generator. */ + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the variable precision tracker + * with a generator. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in double precision by the + * functions in adepath_d.h, starts here. */ + +static PyObject *py2c_ade_newton_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_onepath_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in double precision on the GPU + * by the functions in gpupath_d.h, starts here. */ + +static PyObject *py2c_gpu_newton_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU and GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The standard systems container contains a valid polynomial system + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_gpu_onepath_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU and GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_gpu_manypaths_d ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU and GPU + * in double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the standard solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_qd.cpp phcpack-2.4.85/src/Mod/phcpy2cpath_qd.cpp --- phcpack-2.4.84/src/Mod/phcpy2cpath_qd.cpp 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_qd.cpp 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,5582 @@ +/* This file phcpy2cpath_qd.cpp contains the definitions of the prototypes + * in phcpy2cpath_qd.h, for compilation with the g++ compiler. */ + +#include +#include +#include +#include "phcpack.h" +#include "unisolvers.h" +#include "giftwrappers.h" +#include "schubert.h" +#include "syscon.h" +#include "solcon.h" +#include "product.h" +#include "lists_and_strings.h" +#include "celcon.h" +#include "scalers.h" +#include "witset.h" +#include "mapcon.h" +#include "next_track.h" +#include "structmember.h" +#include "adepath_qd.h" +#include "gpupath_qd.h" + +extern void adainit ( void ); +extern void adafinal ( void ); + +int g_ada_initialized = 0; +int g_ada_finalized = 0; + +void initialize ( void ) +{ + if(!g_ada_initialized) + { + adainit(); + g_ada_initialized = 1; + g_ada_finalized = 0; + } +} + +void finalize ( void ) +{ + if(!g_ada_finalized) + { + adafinal(); + g_ada_finalized = 1; + g_ada_initialized = 0; + } +} + +/* The wrapping functions in phcpack.h starts from here. */ + +static PyObject *py2c_PHCpack_version_string ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 40; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = version_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_set_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&seed)) return NULL; + + fail = set_seed(seed); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_get_seed( PyObject *self, PyObject *args ) +{ + int fail,seed; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = get_seed(&seed); + + return Py_BuildValue("i",seed); +} + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_standard_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_dobldobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_dobldobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_target_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = read_quaddobl_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&name)) return NULL; + fail = read_quaddobl_start_system_from_file(nc,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = define_output_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_standard_start_system(); + + return Py_BuildValue("i",fail); +} + +/* moving systems from and to containers */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_system_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_system(); + + return Py_BuildValue("i",fail); +} + +/* creation of homotopy and tracking all solution paths */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_dobldobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_quaddobl_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ) +{ + int fail; + double g_re,g_im; + + initialize(); + if(!PyArg_ParseTuple(args,"dd",&g_re,&g_im)) return NULL; + fail = create_multprec_homotopy_with_given_gamma(g_re,g_im); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_dobldobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_quaddobl_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_multprec_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = tune_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = show_continuation_parameters(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ) +{ + int fail,level,nbdgt; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&level,&nbdgt)) return NULL; + fail = autotune_continuation_parameters(level,nbdgt); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = determine_output_during_continuation(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_standard_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_dobldobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail, nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_by_quaddobl_homotopy_continuation(nbtasks); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = solve_by_multprec_homotopy_continuation(deci); + + return Py_BuildValue("i",fail); +} + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_target_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_target_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_start_solutions_to_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_dobldobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_quaddobl_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = copy_multprec_container_to_start_solutions(); + + return Py_BuildValue("i",fail); +} + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ) +{ + int fail,rc,nbtasks = 0; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbtasks)) return NULL; + fail = solve_system(&rc,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ) +{ + int silent,fail,rc,nbtasks = 0; + + initialize(); + if (!PyArg_ParseTuple(args,"ii",&silent,&nbtasks)) return NULL; + fail = solve_Laurent_system(&rc,silent,nbtasks); + return Py_BuildValue("i",rc); +} + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ) +{ + int stable,fail,mv,smv; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&stable)) return NULL; + if(stable == 0) + { + fail = mixed_volume(&mv); + return Py_BuildValue("i",mv); + } + else + { + fail = stable_mixed_volume(&mv,&smv); + return Py_BuildValue("(i,i)",mv,smv); + } +} + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_deflate(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = standard_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = dobldobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + { + int fail = quaddobl_Newton_Laurent_step(); + return Py_BuildValue("i",fail); + } +} + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ) +{ + int fail,decimals; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&decimals)) return NULL; + fail = multprec_Newton_Laurent_step(decimals); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ) +{ + int fail,dim,wanted,maxitr,maxprc,nbstr; + char *pols; + + initialize(); + + if(!PyArg_ParseTuple(args,"iiiiis", + &dim,&wanted,&maxitr,&maxprc,&nbstr,&pols)) return NULL; + + fail = varbprec_Newton_Laurent_step(dim,wanted,maxitr,maxprc,nbstr,pols); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in unisolvers.h starts from here */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_standard_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_double_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ) +{ + int fail,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"id",&max,&eps)) return NULL; + fail = solve_with_quad_doubles(max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ) +{ + int fail,dcp,max,nit; + double eps; + + initialize(); + if(!PyArg_ParseTuple(args,"iid",&dcp,&max,&eps)) return NULL; + fail = solve_with_multiprecision(dcp,max,eps,&nit); + + return Py_BuildValue("i",nit); +} + +/* wrapping functions in giftwrappers.h starts from here */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + { + int nbc_hull; + char hull[10*nbc_pts]; + + fail = convex_hull_2d(nbc_pts,pts,&nbc_hull,hull); + hull[nbc_hull] = '\0'; + + return Py_BuildValue("s",hull); + } +} + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ) +{ + int fail,nbc_pts; + char *pts; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nbc_pts,&pts)) return NULL; + + fail = convex_hull(nbc_pts,pts); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ) +{ + int fail,dim,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + + fail = number_of_facets(dim,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,ncp; + char rep[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&dim,&ind)) return NULL; + + fail = retrieve_facet(dim,ind,&ncp,rep); + rep[ncp] = '\0'; + + return Py_BuildValue("s",rep); +} + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_3d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = clear_4d_facets(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ) +{ + int nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + nbr = support_size(); + + return Py_BuildValue("i",nbr); +} + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ) +{ + int nbr,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + { + char support[nbr+1]; + + fail = support_string(nbr,support); + + return Py_BuildValue("s",support); + } +} + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_support_string(); + + return Py_BuildValue("i",fail); +} + + +static PyObject *py2c_giftwrap_initial_form + ( PyObject *self, PyObject *args ) +{ + int fail,dim,nbc; + char *normal; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&nbc,&normal)) return NULL; + /* printf("the inner normal in wrapper is %s\n", normal); */ + fail = initial_form(dim,nbc,normal); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_read_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail,deci; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&deci)) return NULL; + fail = syscon_read_multprec_Laurent_system(deci); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ) +{ + int fail,n,m,d,c; + + initialize(); + if(!PyArg_ParseTuple(args,"iiii",&n,&m,&d,&c)) return NULL; + fail = syscon_random_system(n,m,d,c); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_dobldobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_quaddobl_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_multprec_Laurent_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_symbols(&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_write_symbols(); + printf("\n"); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ) +{ + int nb; + int fail = syscon_number_of_symbols(&nb); + int size = 80*nb; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_string_of_symbols(&size,s); + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_remove_symbol_name_from_table(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_clear_symbol_table(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_polynomials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + static PyObject *a; + + initialize(); + /* if (!PyArg_ParseTuple(args,"i",&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_Laurentials(&number); + + /* a = Py_BuildValue("{i:i}",fail,number); + return a; */ + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_dobldobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_quaddobl_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,number; + + initialize(); + if (!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_number_of_multprec_Laurentials(&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_polynomials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_dobldobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_quaddobl_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + + if(!PyArg_ParseTuple(args,"i",&dim)) return NULL; + initialize(); + fail = syscon_initialize_number_of_multprec_Laurentials(dim); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_dobldobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_quaddobl_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,equ,deg; + + if(!PyArg_ParseTuple(args,"i",&equ)) return NULL; + initialize(); + fail = syscon_degree_of_multprec_polynomial(equ,°); + + return Py_BuildValue("i",deg); +} + +static PyObject *py2c_syscon_number_of_terms ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + /* if (!PyArg_ParseTuple(args,"ii",&i,&number)) return NULL; */ + if (!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = syscon_number_of_Laurent_terms(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ) +{ + int fail, *exp; + int i,j,n,k; + double *c; + static PyObject *a; + + initialize(); + if(!PyArg_ParseTuple(args, "iiiid", &i,&j,&n,&exp,&c)) return NULL; + + exp = (int *)malloc(n * sizeof(int)); + c = (double *)malloc(2*sizeof(double)); + + fail = syscon_retrieve_term(i,j,n,exp,c); + + a = Py_BuildValue("i", fail); + + free (exp); + free (c); + + return a; +} + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_polynomial(nc,n,k,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,dp; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&dp,&p)) return NULL; + fail = syscon_store_multprec_polynomial(nc,n,k,dp,p); + + if(fail != 0) printf("Failed to store %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_polynomial(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_dobldobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiis",&nc,&n,&k,&p)) return NULL; + fail = syscon_store_quaddobl_Laurential(nc,n,k,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,n,nc,k,size; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iiiis",&nc,&n,&k,&size,&p)) return NULL; + fail = syscon_store_multprec_Laurential(nc,n,k,size,p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[25600]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_standard_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[51200]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_dobldobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_quaddobl_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ) +{ + int fail,nc,k; + char p[102400]; /* must be computed or retrieved !!!! */ + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_load_multprec_Laurential(k,&nc,p); + + return Py_BuildValue("s",p); +} + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ) +{ + int fail,totdeg; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = syscon_total_degree(&totdeg); + + return Py_BuildValue("i",totdeg); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_standard_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_standard_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_dobldobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_dobldobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = syscon_quaddobl_drop_variable_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = syscon_quaddobl_drop_variable_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in solcon.h starts from here */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_read_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_write_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_dobldobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_quaddobl_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_clear_multprec_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_open_solution_input_file(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_dobldobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_quaddobl_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,i,number; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&i)) return NULL; + fail = solcon_length_multprec_solution_string(i,&number); + + return Py_BuildValue("i",number); +} + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_dobldobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_quaddobl_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&k)) return NULL; + p = (char*)malloc((k+1)*sizeof(char)); + fail = solcon_write_multprec_solution_string(n,k,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_standard_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_dobldobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_quaddobl_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_retrieve_next_multprec_initialize(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_standard_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_dobldobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_quaddobl_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ) +{ + int fail,cursor; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_move_current_multprec_to_next(&cursor); + + return Py_BuildValue("i",cursor); +} + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_standard_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_dobldobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_quaddobl_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail,cursor,len; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solcon_length_current_multprec_solution_string(&cursor,&len); + if(cursor == 0) len = 0; + + return Py_BuildValue("i",len); +} + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_standard_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_dobldobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_quaddobl_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int n,k; + char *p; + static PyObject* a; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + p = (char*)malloc((n+1)*sizeof(char)); + fail = solcon_write_current_multprec_solution_string(&k,n,p); + + a = Py_BuildValue("s",p); + + free(p); + + return a; +} + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + + /* printf("Calling solcon_append_solution_string ...\n"); */ + + fail = solcon_append_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_dobldobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_quaddobl_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ) +{ + char fail; + int n,k; + char *p; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&n,&k,&p)) return NULL; + fail = solcon_append_multprec_solution_string(n,k,p); + + if(fail != 0) printf("Failed to append solution %s.\n",p); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_dobldobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_quaddobl_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ) +{ + int result,n; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + result = solcon_number_of_multprec_solutions(&n); + + return Py_BuildValue("i",n); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_standard_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_standard_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_dobldobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_index(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = solcon_quaddobl_drop_coordinate_by_name(nc,s); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions in product.h starts here */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = supporting_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = write_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ) +{ + int fail; + int size = 1024; + char s[size]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_structure_string(&size,s); + s[size] = '\0'; + + return Py_BuildValue("s",s); +} + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ) +{ + int nc,fail; + char *s; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&nc,&s)) return NULL; + fail = parse_set_structure(nc,s); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ) +{ + int fail,result; + + initialize(); + if (!PyArg_ParseTuple(args,"i",&result)) return NULL; + fail = is_set_structure_supporting(&result); + + return Py_BuildValue("i",result); +} + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ) +{ + int fail,r; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = linear_product_root_count(&r); + + return Py_BuildValue("i",r); +} + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = random_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = solve_linear_product_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = clear_set_structure(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char partition[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = m_homogeneous_Bezout_number(&mbz,&ncp,partition); + + return Py_BuildValue("(i,s)",mbz,partition); +} + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_partition_Bezout_number(&mbz,ncp,partition); + + return Py_BuildValue("i",mbz); +} + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,mbz,ncp; + char *partition; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&ncp,&partition)) return NULL; + fail = m_homogeneous_start_system(ncp,partition); + + return Py_BuildValue("i",mbz); +} + +/* wrapping functions in celcon.h starts here */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ) +{ + int fail,nbr; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&nbr)) return NULL; + fail = celcon_initialize_supports(nbr); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ) +{ + int fail,r,cnt; + char *strmix; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&r,&strmix)) return NULL; + + cnt = itemcount(strmix); + { + int mix[cnt]; + + str2intlist(cnt,strmix,mix); + fail = celcon_set_type_of_mixture(r,mix); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_type_of_mixture ( PyObject *self, PyObject *args ) +{ + int fail,r,nbc; + int mix[64]; + char strmix[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = celcon_type_of_mixture(&r,mix); + nbc = intlist2str(r,mix,strmix); + + return Py_BuildValue("s",strmix); +} + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,ind,cnt; + char *strpoint; + + initialize(); + if(!PyArg_ParseTuple(args,"iis",&dim,&ind,&strpoint)) return NULL; + + cnt = itemcount(strpoint); + { + double point[cnt]; + + str2dbllist(cnt,strpoint,point); + fail = celcon_append_lifted_point(dim,ind,point); + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ) +{ + int fail,dim,sup,ind,nbc; + char strpoint[256]; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&dim,&sup,&ind)) return NULL; + { + double liftedpoint[dim]; + + fail = celcon_get_lifted_point(dim,sup,ind,liftedpoint); + nbc = dbllist2str(dim,liftedpoint,strpoint); + } + + return Py_BuildValue("s",strpoint); +} + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ) +{ + int fail,mv; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_mixed_volume_of_supports(&mv); + + return Py_BuildValue("i",mv); +} + +static PyObject *py2c_celcon_number_of_cells ( PyObject *self, PyObject *args ) +{ + int fail,length; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_number_of_cells(&length); + + return Py_BuildValue("i",length); +} + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_random_coefficient_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_dobldobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_copy_into_quaddobl_systems_container(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_create_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_dobldobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_quaddobl_polyhedral_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_dobldobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,nb; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = celcon_solve_quaddobl_start_system(k,&nb); + + return Py_BuildValue("i",nb); +} + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_dobldobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ) +{ + int fail,k,i,otp; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&k,&i,&otp)) return NULL; + fail = celcon_track_quaddobl_solution_path(k,i,otp); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_dobldobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&i)) return NULL; + fail = celcon_copy_target_quaddobl_solution_to_container(k,i); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_dobldobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_permute_quaddobl_system(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ) +{ + int fail,k,i; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = celcon_clear_mixed_cell_configuration(); + + return Py_BuildValue("i",fail); +} + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[4*dim+2]; + + fail = standard_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(4*dim+1); + for(i=0; i<4*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_dobldobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[8*dim+4]; + + fail = dobldobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(8*dim+1); + for(i=0; i<8*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ) +{ + int fail,mode,dim,i; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&mode)) return NULL; + fail = syscon_number_of_quaddobl_polynomials(&dim); + if((fail == 0) && (dim > 0)) + { + double cff[16*dim+8]; + + fail = quaddobl_scale_system(mode,cff); + if(fail == 0) + { + if(mode > 0) + { + PyObject *result, *item; + result = PyList_New(16*dim+1); + for(i=0; i<16*dim+1; i++) + { + item = PyFloat_FromDouble(cff[i]); + PyList_SET_ITEM(result,i,item); + } + return result; + } + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = standard_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = dobldobl_scale_solutions(dim,10,scf); + } + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ) +{ + int fail,dim; + char *cff; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&dim,&cff)) return NULL; + { + double scf[dim]; + + str2dbllist(dim,cff,scf); + fail = quaddobl_scale_solutions(dim,10,scf); + } + return Py_BuildValue("i",fail); +} + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ) +{ + int d,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&d)) return NULL; + fail = embed_system(d); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_dobldobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = create_quaddobl_cascade_homotopy(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = set_state_to_silent(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ) +{ + int n,fail; + char *name; + + initialize(); + if(!PyArg_ParseTuple(args,"is",&n,&name)) return NULL; + fail = define_output_file_with_string(n,name); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ) +{ + int n,nbsols,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&n,&nbsols)) return NULL; + { + double x[2*n+5]; + int i,j,m; + + for(i=1; i<=nbsols; i++) + { + /* printf("... retrieving solution %d ...\n", i); */ + fail = solcon_retrieve_solution(n,i,&m,x); + /* printf("fail = %d, m = %d\n", fail, m); + printf("printing the coordinates : \n"); + for(j=0; j<2*n+5; j++) printf("x[%d] = %.15le \n",j,x[j]); */ + m = i; + /* printf("... replacing solution %d ...\n", i); */ + fail = solcon_replace_solution(n,i,m,x); + /* printf("... done replacing solution solution %d ...\n", i); */ + } + } + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ) +{ + int k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&k)) return NULL; + fail = initialize_sampler(k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ) +{ + int n,d,k,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"iii",&n,&d,&k)) return NULL; + fail = initialize_monodromy(n,d,k); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = store_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = restore_solutions(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = track_paths(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ) +{ + int fail; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + fail = swap_slices(); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ) +{ + int k,n,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&k,&n)) return NULL; + fail = new_slices(k,n); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ) +{ + int first,fail; + double r[2]; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&first)) return NULL; + + if(first == 1) /* determine constant coefficient */ + { + r[0] = -1.0; r[1] = 0.0; + } + else + { + r[0] = +1.0; r[1] = 0.0; + } + fail = assign_coefficient_of_slice(0,0,r); + + return Py_BuildValue("i",fail); +} + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ) +{ + int n,i,fail; + + initialize(); + if(!PyArg_ParseTuple(args,"i",&n)) return NULL; + + { + double re_gamma[n]; + double im_gamma[n]; + + for(i=0; i %d\n",nf[0],nf[1]); */ + } + return Py_BuildValue("i",done); +} + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ) +{ + int fail,nf; + + initialize(); + if(!PyArg_ParseTuple(args,"")) return NULL; + + fail = number_of_irreducible_factors(&nf); + + return Py_BuildValue("i",nf); +} + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ) +{ + int fail,totdeg,k; + char *result; + + initialize(); + if(!PyArg_ParseTuple(args,"ii",&totdeg,&k)) return NULL; + { + int deg,nb,i; + int w[totdeg]; + char s[10*totdeg]; + + fail = witness_points_of_irreducible_factor(k,°,w); + + nb = list2str(deg,w,s); + result = (char*)calloc(nb,sizeof(char)); + for(i=0; i nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + fail = resolve_Schubert_conditions(n,k,nbc,cds,vrb,&r); + } + return Py_BuildValue("i",r); +} + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ) +{ + int i,n,k,nbc,nc,fail,r,vrb,szn; + char *cond; + char *name; + + initialize(); + if(!PyArg_ParseTuple + (args,"iiiisiis",&n,&k,&nbc,&nc,&cond,&vrb,&szn,&name)) return NULL; +/* + printf("name of the output file : %s\n", name); + printf("the number of characters : %d\n", nc); + printf("the conditions : %s\n", cond); + printf("the conditions parsed : "); +*/ + { + int cds[k*nbc]; + int pos = 0; + int idx = 0; + while((idx < k*nbc) && (pos < nc)) + { + while(cond[pos] == ' ' && pos < nc) pos++; + if(pos > nc) break; + cds[idx] = 0; + while(cond[pos] != ' ') + { + if(cond[pos] == '\0') break; + cds[idx] = cds[idx]*10 + (cond[pos] - '0'); + pos = pos + 1; + if(pos >= nc) break; + } + /* printf(" %d", cds[idx]); */ + idx = idx + 1; + } + const int fgsize = 2*(nbc-2)*n*n; + double fg[fgsize]; + char stfg[fgsize*24+2]; + fail = Littlewood_Richardson_homotopies(n,k,nbc,cds,vrb,szn,name,&r,fg); + stfg[0] = '['; + idx = 1; + for(i=0; i= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_polynomial", + py2c_syscon_store_dobldobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_polynomial", + py2c_syscon_store_quaddobl_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_polynomial", + py2c_syscon_store_multprec_polynomial, METH_VARARGS, + "Defines the k-th polynomial in the systems container for polynomials\n with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_polynomial", + py2c_syscon_load_standard_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_polynomial", + py2c_syscon_load_dobldobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_polynomial", + py2c_syscon_load_quaddobl_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_polynomial", + py2c_syscon_load_multprec_polynomial, METH_VARARGS, + "Returns the k-th polynomial in the systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_store_standard_Laurential", + py2c_syscon_store_standard_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in standard double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_dobldobl_Laurential", + py2c_syscon_store_dobldobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in double double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_quaddobl_Laurential", + py2c_syscon_store_quaddobl_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in quad double precision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are four input parameters, three integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_store_multprec_Laurential", + py2c_syscon_store_multprec_Laurential, METH_VARARGS, + "Defines the k-th polynomial in the systems container for Laurent\n polynomials with coefficients in arbitrary multiprecision.\n As a precondition for this function, the container must be initialized\n for sufficiently many polynomials, in any case >= k.\n There are five input parameters, four integers and one string:\n 1) nc, the number of characters in the string p;\n 2) n, the number of variables in the multivariate polynomial;\n 3) k, the index of the polynomial in the system;\n 4) dp, the number of decimal places to parse the coefficients;\n 5) p, a valid string representation for a polynomial.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_syscon_load_standard_Laurential", + py2c_syscon_load_standard_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with standard double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_dobldobl_Laurential", + py2c_syscon_load_dobldobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with double double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_quaddobl_Laurential", + py2c_syscon_load_quaddobl_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with quad double complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_load_multprec_Laurential", + py2c_syscon_load_multprec_Laurential, METH_VARARGS, + "Returns the k-th polynomial in the Laurent systems container\n with arbitrary multiprecision complex coefficients as a string.\n The value for k is in the one integer parameter of this function."}, + {"py2c_syscon_total_degree", py2c_syscon_total_degree, METH_VARARGS, + "Returns in d the total degree of the system with coefficients in\n standard double precision, as stored in the container."}, + {"py2c_syscon_standard_drop_variable_by_index", + py2c_syscon_standard_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_standard_drop_variable_by_name", + py2c_syscon_standard_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the standard double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_index", + py2c_syscon_dobldobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_dobldobl_drop_variable_by_name", + py2c_syscon_dobldobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the double double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_index", + py2c_syscon_quaddobl_drop_variable_by_index, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that has its k-th variable dropped.\n The index k of the vaiable is given as an input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_syscon_quaddobl_drop_variable_by_name", + py2c_syscon_quaddobl_drop_variable_by_name, METH_VARARGS, + "Replaces the system in the quad double precision container\n with the same system that have that variable dropped\n corresponding to the name in the string s of nc characters long.\n The function has two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, a string that holds the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_length_standard_solution_string", + py2c_solcon_length_standard_solution_string, + METH_VARARGS, + "On input is the index k to a solution in standard double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_dobldobl_solution_string", + py2c_solcon_length_dobldobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in double double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_quaddobl_solution_string", + py2c_solcon_length_quaddobl_solution_string, METH_VARARGS, + "On input is the index k to a solution in quad double precision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_length_multprec_solution_string", + py2c_solcon_length_multprec_solution_string, METH_VARARGS, + "On input is the index k to a solution in arbitrary multiprecision,\n stored in the container. On return is the length of the string\n representation for that k-th solution in the container."}, + {"py2c_solcon_write_standard_solution_string", + py2c_solcon_write_standard_solution_string, + METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in standard double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_dobldobl_solution_string", + py2c_solcon_write_dobldobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in double double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_quaddobl_solution_string", + py2c_solcon_write_quaddobl_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in quad double precision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_write_multprec_solution_string", + py2c_solcon_write_multprec_solution_string, METH_VARARGS, + "Returns the string representation for the k-th solution stored\n in arbitrary multiprecision in the container.\n On input are two integers:\n 1) the index to the solution; and\n 2) the number of characters in the string representation\n for that solution."}, + {"py2c_solcon_retrieve_next_standard_initialize", + py2c_solcon_retrieve_next_standard_initialize, METH_VARARGS, + "Resets the pointer to the current standard solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_dobldobl_initialize", + py2c_solcon_retrieve_next_dobldobl_initialize, METH_VARARGS, + "Resets the pointer to the current dobldobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_quaddobl_initialize", + py2c_solcon_retrieve_next_quaddobl_initialize, METH_VARARGS, + "Resets the pointer to the current quaddobl solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_retrieve_next_multprec_initialize", + py2c_solcon_retrieve_next_multprec_initialize, METH_VARARGS, + "Resets the pointer to the current multprec solution in the container\n to the first solution in the list.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_move_current_standard_to_next", + py2c_solcon_move_current_standard_to_next, METH_VARARGS, + "Moves the pointer to the current solution in standard double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_dobldobl_to_next", + py2c_solcon_move_current_dobldobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in double double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_quaddobl_to_next", + py2c_solcon_move_current_quaddobl_to_next, METH_VARARGS, + "Moves the pointer to the current solution in quad double precision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_move_current_multprec_to_next", + py2c_solcon_move_current_multprec_to_next, METH_VARARGS, + "Moves the pointer to the current solution in arbitrary multiprecision\n to the next solution and returns the value of the cursor.\n If cursor on return is zero, then either the pointer was null\n or there is no next solution."}, + {"py2c_solcon_length_current_standard_solution_string", + py2c_solcon_length_current_standard_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current standard double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_dobldobl_solution_string", + py2c_solcon_length_current_dobldobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current double double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_quaddobl_solution_string", + py2c_solcon_length_current_quaddobl_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current quad double solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_length_current_multprec_solution_string", + py2c_solcon_length_current_multprec_solution_string, METH_VARARGS, + "Returns the number of characters in the string representation\n of the current arbitrary multiprecision solution in the container,\n at the place indicated by the value of the cursor.\n If this value equals zero, then there is no current solution,\n and then the length on return equals zero."}, + {"py2c_solcon_write_current_standard_solution_string", + py2c_solcon_write_current_standard_solution_string, METH_VARARGS, + "Writes the current standard double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_dobldobl_solution_string", + py2c_solcon_write_current_dobldobl_solution_string, METH_VARARGS, + "Writes the current double double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_quaddobl_solution_string", + py2c_solcon_write_current_quaddobl_solution_string, METH_VARARGS, + "Writes the current quad double solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_write_current_multprec_solution_string", + py2c_solcon_write_current_multprec_solution_string, METH_VARARGS, + "Writes the current arbitrary multiprecision solution in the solution container\n to the string s of n+1 characters.\n The last character is the end of string symbol.\n The value of n is given as the one input parameter to this function.\n On return is the string that contains the string representation of\n the current solution in standard double precision in the container."}, + {"py2c_solcon_append_standard_solution_string", + py2c_solcon_append_standard_solution_string, + METH_VARARGS, + "Appends a solution in standard double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_dobldobl_solution_string", + py2c_solcon_append_dobldobl_solution_string, METH_VARARGS, + "Appends a solution in double double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_quaddobl_solution_string", + py2c_solcon_append_quaddobl_solution_string, METH_VARARGS, + "Appends a solution in quad double precision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_append_multprec_solution_string", + py2c_solcon_append_multprec_solution_string, METH_VARARGS, + "Appends a solution in arbitrary multiprecision to the list\n of solutions already stored in the container.\n There are three input parameters:\n 1) the number of variables;\n 2) the number of characters in the string;\n 3) the string representing the solution to append to the list.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_solcon_number_of_standard_solutions", + py2c_solcon_number_of_standard_solutions, METH_VARARGS, + "Returns the number of solutions in standard double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_dobldobl_solutions", + py2c_solcon_number_of_dobldobl_solutions, METH_VARARGS, + "Returns the number of solutions in double double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_quaddobl_solutions", + py2c_solcon_number_of_quaddobl_solutions, METH_VARARGS, + "Returns the number of solutions in quad double precision,\n as stored in the container."}, + {"py2c_solcon_number_of_multprec_solutions", + py2c_solcon_number_of_multprec_solutions, METH_VARARGS, + "Returns the number of solutions in arbitrary multiprecision,\n as stored in the container."}, + {"py2c_solcon_standard_drop_coordinate_by_index", + py2c_solcon_standard_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_standard_drop_coordinate_by_name", + py2c_solcon_standard_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the standard double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_index", + py2c_solcon_dobldobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_dobldobl_drop_coordinate_by_name", + py2c_solcon_dobldobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the double double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_index", + py2c_solcon_quaddobl_drop_coordinate_by_index, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their k-th coordinate dropped.\n There is one input parameter: the index k of the coordinate.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_solcon_quaddobl_drop_coordinate_by_name", + py2c_solcon_quaddobl_drop_coordinate_by_name, METH_VARARGS, + "Replaces the solutions in the quad double precision container\n with the same solutions that have their coordinate dropped\n corresponding to the name in the string s of nc characters long.\n There are two input parameters, an integer and a string:\n 1) nc, the number of characters in the string with the name;\n 2) s, the string with the name of the variable.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_product_supporting_set_structure", + py2c_product_supporting_set_structure, METH_VARARGS, + "Builds a supporting set structure for the system stored in the\n container with coefficients in standard double precision."}, + {"py2c_product_write_set_structure", py2c_product_write_set_structure, + METH_VARARGS, + "Writes the supporting set structure to screen."}, + {"py2c_product_set_structure_string", py2c_product_set_structure_string, + METH_VARARGS, + "Returns the string representation of the set structure."}, + {"py2c_product_parse_set_structure", py2c_product_parse_set_structure, + METH_VARARGS, + "Parses a given string into a set structure.\n On input are two parameters, one integer and one string:\n 1) the number of characters in the given string; and\n 2) the characters in the string.\n On return is the failure code, if zero, then the string\n has been parsed into a valid set structure."}, + {"py2c_product_is_set_structure_supporting", + py2c_product_is_set_structure_supporting, METH_VARARGS, + "Checks whether the stored set structure is supporting\n for the system in the standard systems container.\n Returns an integer which represents true (1) or false (0)."}, + {"py2c_product_linear_product_root_count", + py2c_product_linear_product_root_count, METH_VARARGS, + "Returns the linear-product root count, computed from\n the supporting set structure."}, + {"py2c_product_random_linear_product_system", + py2c_product_random_linear_product_system, METH_VARARGS, + "Builds a random linear-product system based on the\n stored set structure. On return is the failure code,\n which equals zero if all went well."}, + {"py2c_product_solve_linear_product_system", + py2c_product_solve_linear_product_system, METH_VARARGS, + "Computes all solutions to the linear-product system\n and stores the solutions in the container for solutions\n in standard double precision. On return is the failure\n code, which equals zero if all went well."}, + {"py2c_product_clear_set_structure", py2c_product_clear_set_structure, + METH_VARARGS, + "Deallocates the set structure."}, + {"py2c_product_m_homogeneous_Bezout_number", + py2c_product_m_homogeneous_Bezout_number, METH_VARARGS, + "For the system in the standard systems container,\n a heuristic partition of the set of variables may\n lead to a Bezout number that is smaller than the total degree.\n On return is the m-homogeneous Bezout number for the\n string representation of the partition that is returned\n as the second argument in the tuple."}, + {"py2c_product_m_partition_Bezout_number", + py2c_product_m_partition_Bezout_number, METH_VARARGS, + "Given a partition of the set of variables, computes\n the m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_product_m_homogeneous_start_system", + py2c_product_m_homogeneous_start_system, METH_VARARGS, + "Given a partition of the set of variables, constructs\n an m-homogeneous Bezout number for the system in\n the standard systems container.\n On input are two arguments:\n 1) the number of characters in the string (second argument); and\n 2) the string representation for a partition of the variables.\n On return is the m-homogeneous Bezout number."}, + {"py2c_celcon_initialize_supports", + py2c_celcon_initialize_supports, METH_VARARGS, + "Initializes the cell container with the number of distinct supports,\n this number is given as the one input parameter.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_set_type_of_mixture", + py2c_celcon_set_type_of_mixture, METH_VARARGS, + "Defines the type of mixture of the support sets.\n On input are two parameters, an integer and a string:\n 1) the integer equals the number of distinct supports;\n 2) the string is a string representation of a Python list of integers,\n there are as many integers as the value of the first parameter.\n Each integer is a positive number, equal to the number of occurrences\n of each support set."}, + {"py2c_celcon_type_of_mixture", + py2c_celcon_type_of_mixture, METH_VARARGS, + "Returns the string representation of the type of mixture of the support sets.\n This string is the string representation of a Python list of integers."}, + {"py2c_celcon_append_lifted_point", + py2c_celcon_append_lifted_point, METH_VARARGS, + "Appends a lifted point to the cells container.\n There are three input parameters:\n 1) the dimension of the point;\n 2) the index of the support to where to append to; and\n 3) the string representation of the lifted point.\n Returns the failure code, which equals zero when all went well."}, + {"py2c_celcon_retrieve_lifted_point", + py2c_celcon_retrieve_lifted_point, METH_VARARGS, + "Returns a string representation of a lifted point.\n On input are three integer numbers:\n 1) the number of coordinates in the lifted point;\n 2) the index to the support set; and\n 3) the index to the point in that support set."}, + {"py2c_celcon_mixed_volume_of_supports", + py2c_celcon_mixed_volume_of_supports, METH_VARARGS, + "Returns the mixed volume of the supports stored in the cell container."}, + {"py2c_celcon_number_of_cells", py2c_celcon_number_of_cells, + METH_VARARGS, "returns the number of cells in the cell container"}, + {"py2c_celcon_standard_random_coefficient_system", + py2c_celcon_standard_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in standard double\n precision is stored in the cell container."}, + {"py2c_celcon_dobldobl_random_coefficient_system", + py2c_celcon_dobldobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in double double\n precision is stored in the cell container."}, + {"py2c_celcon_quaddobl_random_coefficient_system", + py2c_celcon_quaddobl_random_coefficient_system, METH_VARARGS, + "Based on the lifted supports stored in the container,\n a random coefficient system with coefficients in quad double\n precision is stored in the cell container."}, + {"py2c_celcon_copy_into_standard_systems_container", + py2c_celcon_copy_into_standard_systems_container, METH_VARARGS, + "The random coefficient system in standard double precision is copied\n from the cell container to the container for systems with\n coefficients in standard double precision."}, + {"py2c_celcon_copy_into_dobldobl_systems_container", + py2c_celcon_copy_into_dobldobl_systems_container, METH_VARARGS, + "The random coefficient system in double double precision is copied\n from the cell container to the container for systems with\n coefficients in double double precision."}, + {"py2c_celcon_copy_into_quaddobl_systems_container", + py2c_celcon_copy_into_quaddobl_systems_container, METH_VARARGS, + "The random coefficient system in quad double precision is copied\n from the cell container to the container for systems with\n coefficients in quad double precision."}, + {"py2c_celcon_standard_polyhedral_homotopy", + py2c_celcon_standard_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in standard double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_dobldobl_polyhedral_homotopy", + py2c_celcon_dobldobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in double double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_quaddobl_polyhedral_homotopy", + py2c_celcon_quaddobl_polyhedral_homotopy, METH_VARARGS, + "Based on the lifting and the random coefficient system,\n the polyhedral homotopy to solve the random coefficient system\n in quad double precision is constructed.\n This function also initializes the internal data structures to store\n the solutions of start and target systems.\n The lifted supports and the random coefficient system are defined.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_solve_standard_start_system", + py2c_celcon_solve_standard_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using standard double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in standard double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_dobldobl_start_system", + py2c_celcon_solve_dobldobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using double double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in double double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_solve_quaddobl_start_system", + py2c_celcon_solve_quaddobl_start_system, METH_VARARGS, + "Solves the start system corresponding to the k-th mixed cell,\n using quad double precision arithmetic.\n The precondition for this function is that the creation of\n the polyhedral homotopy in quad double precision ended well.\n On return is the number of solution found, which must equal\n the mixed volume of the k-th mixed cell."}, + {"py2c_celcon_track_standard_solution_path", + py2c_celcon_track_standard_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using standard double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in standard double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_dobldobl_solution_path", + py2c_celcon_track_dobldobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using double double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in double double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_track_quaddobl_solution_path", + py2c_celcon_track_quaddobl_solution_path, METH_VARARGS, + "Tracks a solution path starting at the i-th solution of the k-th cell,\n using quad double precision arithmetic.\n The precondition for this function is that the start system defined\n by the k-th mixed cell is solved in quad double precision.\n There are three input parameters:\n 1) k, the index to a mixed cell in the cell container;\n 2) i, the index to a solution path defined by that mixed cell;\n 3) otp, the level for intermediate output during path tracking.\n A target solution corresponding to the k-th cell is added on return."}, + {"py2c_celcon_copy_target_standard_solution_to_container", + py2c_celcon_copy_target_standard_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in standard double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_dobldobl_solution_to_container", + py2c_celcon_copy_target_dobldobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in double double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_copy_target_quaddobl_solution_to_container", + py2c_celcon_copy_target_quaddobl_solution_to_container, METH_VARARGS, + "Copies the i-th target solution corresponding to the k-th mixed cell\n to the container for solutions in quad double precision.\n There are two input parameters for this function:\n 1) k, the index to the mixed cell;\n 2) i, the index to the i-th solution path defined by the cell.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_celcon_permute_standard_system", + py2c_celcon_permute_standard_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with standard double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_dobldobl_system", + py2c_celcon_permute_dobldobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with double double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_permute_quaddobl_system", + py2c_celcon_permute_quaddobl_system, METH_VARARGS, + "Permutes the systems in the container for polynomial and Laurent systems\n with quad double coefficients corresponding to the permutation\n used to compute the mixed-cell configuration.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_celcon_clear_container", py2c_celcon_clear_container, METH_VARARGS, + "Deallocates the data in the cell container."}, + {"py2c_scale_standard_system", py2c_scale_standard_system, METH_VARARGS, + "Applies scaling to the system in the standard systems container,\n with standard double precision arithmetic. The system in the standard\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_dobldobl_system", py2c_scale_dobldobl_system, METH_VARARGS, + "Applies scaling to the system in the dobldobl systems container,\n with double double precision arithmetic. The system in the dobldobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_quaddobl_system", py2c_scale_quaddobl_system, METH_VARARGS, + "Applies scaling to the system in the quaddobl systems container,\n with quad double precision arithmetic. The system in the quaddobl\n systems container is replaced by the scaled system.\n On entry is one integer, which should be either 0, 1, or 2:\n 0 for only scaling of the equations,\n 1 variable scaling without variability reduction,\n 2 variable scaling with variability reduction.\n On return is a tuple with the scaling coefficients (if mode > 0)\n and the estimated inverse condition number of the scaling problem."}, + {"py2c_scale_standard_solutions", + py2c_scale_standard_solutions, METH_VARARGS, + "Replaces the solutions in the standard solutions container with\n the scaled solutions, scaled with standard double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_dobldobl_solutions", + py2c_scale_dobldobl_solutions, METH_VARARGS, + "Replaces the solutions in the dobldobl solutions container with\n the scaled solutions, scaled with double double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_scale_quaddobl_solutions", + py2c_scale_quaddobl_solutions, METH_VARARGS, + "Replaces the solutions in the quaddobl solutions container with\n the scaled solutions, scaled with quad double precision arithmetic,\n using the given scaling coefficients.\n On entry are two parameters: an integer and a string.\n The integer contains the number of elements in the list\n of scaling coefficients (doubles) stored in the string.\n The format of the string is the Python string representation\n of a list of doubles, i.e.: starting with [ and ending with ]."}, + {"py2c_embed_system", py2c_embed_system, METH_VARARGS, + "Replaces the system with coefficients in standard double precision\n in the container with its embedding of dimension d.\n The dimension d is given as an integer parameter on input.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_standard_cascade_homotopy", py2c_standard_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in standard double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_dobldobl_cascade_homotopy", py2c_dobldobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in double double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_quaddobl_cascade_homotopy", py2c_quaddobl_cascade_homotopy, + METH_VARARGS, + "Creates a homotopy in quad double precision using the stored\n systems to go one level down the cascade, removing one slice.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_set_to_mute", py2c_factor_set_to_mute, METH_VARARGS, + "Sets the state to monodromy permutations to silent."}, + {"py2c_factor_define_output_file_with_string", + py2c_factor_define_output_file_with_string, METH_VARARGS, + "Defines the output file for the factorization.\n On input are an integer and a string:\n 1) the integer equals the number of characters in the string; and\n 2) the string contains the name of a file.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_assign_labels", py2c_factor_assign_labels, + METH_VARARGS, + "Assigns labels, replacing the multiplicity field of each solution\n in standard double precision stored in the container.\n On entry are two integers:\n 1) n, the number of coordinates of the solutions;\n 2) nbsols, the number of solutions in the container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_factor_initialize_sampler", py2c_factor_initialize_sampler, + METH_VARARGS, + "Initializes the sampling machine with a witness set.\n On entry is the dimension or the number of hyperplanes\n to slide the positive dimensional solution set."}, + {"py2c_factor_initialize_monodromy", py2c_factor_initialize_monodromy, + METH_VARARGS, + "Initializes the internal data structures for n loops,\n to factor a k-dimensional solution component of degree d.\n There are three integers on input, in the following order:\n 1) n, the number of loops;\n 2) d, the degree of the solution set;\n 3) k, the dimensional of the solution set.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_factor_store_solutions", py2c_factor_store_solutions, METH_VARARGS, + "Stores the solutions in the container to the data for monodromy loops."}, + {"py2c_factor_restore_solutions", py2c_factor_restore_solutions, + METH_VARARGS, + "Restores the first initialized solutions from sampler to the container."}, + {"py2c_factor_track_paths", py2c_factor_track_paths, METH_VARARGS, + "Tracks as many paths as defined by witness set.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_swap_slices", py2c_factor_swap_slices, METH_VARARGS, + "Swaps the current slices with new slices and takes new solutions\n as start to turn back.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_new_slices", py2c_factor_new_slices, METH_VARARGS, + "Generates k random slides in n-space.\n The k and the n are the two input parameters.\n On return is the failure code, which is zero when all went well."}, + {"py2c_factor_set_trace_slice", py2c_factor_set_trace_slice, METH_VARARGS, + "Assigns the constant coefficient of the first slice.\n On entry is a flag to indicate if it was the first time or not.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_store_gammas", py2c_factor_store_gammas, METH_VARARGS, + "Stores the gamma constants for the sampler in the monodromy loops.\n Generates as many random complex constants as the value on input.\n On return is the failure code, which is zero if all went well."}, + {"py2c_factor_permutation_after_loop", py2c_factor_permutation_after_loop, + METH_VARARGS, + "For a solution set of degree d, computes the permutation using the\n solutions most recently stored, after a loop.\n The number d is the input parameter of this function.\n On return is the string representation of the permutation."}, + {"py2c_factor_update_decomposition", py2c_factor_update_decomposition, + METH_VARARGS, + "Updates the decomposition with the given permutation of d elements.\n On entry are two integers and one string:\n 1) d, the number of elements in the permutation;\n 2) nc, the number of characters in the string;\n 3) p, the string representation of the permutation.\n Returns one if the current decomposition is certified,\n otherwise returns zero."}, + {"py2c_factor_number_of_components", py2c_factor_number_of_components, + METH_VARARGS, + "Returns the number of irreducible factors in the current\n decomposition of the witness set."}, + {"py2c_factor_witness_points_of_component", + py2c_factor_witness_points_of_component, + METH_VARARGS, + "Returns a string which represents an irreducible component.\n On entry are two integers:\n 1) the sum of the degrees of all components;\n 2) the index of the component."}, + {"py2c_factor_trace_sum_difference", py2c_factor_trace_sum_difference, + METH_VARARGS, + "Returns the difference between the actual sum at the samples\n defined by the labels to the generic points in the factor,\n and the trace sum.\n On entry are three integer numbers and one string:\n 1) d, the number of points in the witness set;\n 2) k, the dimension of the solution set;\n 3) nc, the number of characters in the string;\n 4) ws, the string representing the labels of the witness set."}, + {"py2c_witness_set_of_hypersurface", py2c_witness_set_of_hypersurface, + METH_VARARGS, + "Given in the string p of nc characters a polynomial in nv variables,\n terminated by a semicolon, the systems and solutions container on\n return contain a witness set for the hypersurface defined by p.\n On entry are two integers and one string, in the following order:\n 1) nv, the number of variables of the polynomials;\n 2) nc, the number of characters in the string p;\n 3) p, string representation of a polynomial, terminates with a semicolon.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_create_diagonal_homotopy", py2c_create_diagonal_homotopy, + METH_VARARGS, + "Creates a diagonal homotopy to intersect two solution sets of\n dimensions a and b respectively, where a >= b.\n The two input parameters are values for a and b.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets."}, + {"py2c_start_diagonal_cascade_solutions", + py2c_start_diagonal_cascade_solutions, METH_VARARGS, + "Makes the start solutions to start the cascade homotopy to\n intersect two solution sets of dimensions a and b, where a >= b.\n The dimensions a and b are given as input parameters.\n The systems stored as target and start system in the container\n define the witness sets for these two solution sets.\n On return is the failure code, which equals zero when all went well."}, + {"py2c_extrinsic_top_diagonal_dimension", + py2c_extrinsic_top_diagonal_dimension, METH_VARARGS, + "Returns the dimension of the start and target system to\n start the extrinsic cascade to intersect two witness sets,\n respectively of dimensions a and b, with ambient dimensions\n respectively equal to n1 and n2.\n There are four integers as parameters on input: n1, n2, a and b."}, + {"py2c_collapse_diagonal", py2c_collapse_diagonal, METH_VARARGS, + "Eliminates the extrinsic diagonal for the system and solutions\n in the containers. On input are two integers:\n 1) k, the current number of slack variables in the embedding;\n 2) d, the number of slack variables to add to the final embedding.\n The system in the container has its diagonal eliminated and is\n embedded with k+d slack variables. The solutions corresponding\n to this system are in the solutions container.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_schubert_pieri_count", py2c_schubert_pieri_count, METH_VARARGS, + "Returns the number of p-plane producing curves of degree q\n that meet m*p + q*(m+p) given general m-planes.\n On input are three integer numbers:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes; and\n 3) q, the degree of the curve that produces p-planes.\n The dimension of the ambient space of this Pieri problem is m+p."}, + {"py2c_schubert_resolve_conditions", py2c_schubert_resolve_conditions, + METH_VARARGS, + "Resolves a general Schubert intersection condition in n-space\n for k-planes subject to conditions defined by brackers.\n On return is the root count, the number of k-planes that satisfy\n the intersection conditions imposed by the brackets for general flags.\n On entry are five integers and one string:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c, the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen."}, + {"py2c_schubert_littlewood_richardson_homotopies", + py2c_schubert_littlewood_richardson_homotopies, METH_VARARGS, + "Runs the Littlewood-Richardson homotopies to resolve a number of\n general Schubert intersection conditions on k-planes in n-space.\n The polynomial system that was solved is in the container for\n systems with coefficients in standard double precision and the\n corresponding solutions are in the standard solutions container.\n On entry are six integers and two strings, in the following order:\n 1) n, the ambient dimension, where the k-planes live;\n 2) k, the dimension of the solution planes;\n 3) c,the number of intersection conditions;\n 4) nc, the number of characters in the string brackets;\n 5) brackets is a string representation of c brackets, where the numbers\n in each bracket are separated by spaces;\n 6) the flag verbose: when 0, no intermediate output is written,\n when 1, then the resolution is dispayed on screen;\n 7) nbchar, the number of characters in the string filename;\n 8) filename is the name of the output file.\n The function returns a tuple of an integer and a string:\n 0) r is the formal root count as the number of k-planes\n for conditions imposed by the brackets for general flags;\n 1) flags, a string with the coefficients of the general flags."}, + {"py2c_schubert_localization_poset", py2c_schubert_localization_poset, + METH_VARARGS, + "Returns the string representation of the localization poset for the\n Pieri root count for m, p, and q. The input parameters are the\n integer values for m, p, and q:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the curves that produce p-planes."}, + {"py2c_schubert_pieri_homotopies", py2c_schubert_pieri_homotopies, + METH_VARARGS, + "Runs the Pieri homotopies for (m,p,q) dimensions on generic input data.\n On return the systems container for systems with coefficients in standard\n double precision contains the polynomial system solved and in the\n solutions in standard double precision are in the solutions container.\n On entry are four integers and two strings:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, the string with m*p + q*(m+p) random complex input m-planes,\n where the real and imaginary parts are separated by a space;\n 6) pts, the string with m*p + q*(m+p) random complex interpolation\n points, only needed if q > 0.\n The function returns the combinatorial Pieri root count,\n which should equal the number of solutions in the container."}, + {"py2c_schubert_osculating_planes", py2c_schubert_osculating_planes, + METH_VARARGS, + "Returns the string representation of n real m-planes in\n d-space osculating a rational normal curve\n at the n points in s, where n = m*p + q*(m+p) and d = m+p.\n On entry are four integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string pts; and\n 5) pts, the string with m*p + q*(m+p) interpolation points."}, + {"py2c_schubert_pieri_system", py2c_schubert_pieri_system, METH_VARARGS, + "Fills the container of systems with coefficients in standard\n double precision with a polynomial system that expresses the\n intersection conditions of a general Pieri problem.\n On input are five integers and one string:\n 1) m, the dimension of the input planes;\n 2) p, the dimension of the output planes;\n 3) q, the degree of the solution maps;\n 4) nc, the number of characters in the string A;\n 5) A, m*p + q*(m+p) random complex input m-planes, where\n the real and imaginary parts are separated by a space;\n 6) a flag is_real: if == 1, then the coefficients of A are real,\n if == 0, then the coefficients of A are complex.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_solve_system", py2c_mapcon_solve_system, METH_VARARGS, + "Solves the binomial system stored in the Laurent systems container.\n There is one input argument, either one or zero.\n If one, then only the pure top dimensional solutions are computed.\n If zero, then all solution sets are computed.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_write_maps", py2c_mapcon_write_maps, METH_VARARGS, + "Writes the maps stored in the container to screen.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_clear_maps", py2c_mapcon_clear_maps, METH_VARARGS, + "Deallocates the maps stored in the container.\n Returns the failure code, which equals zero if all went well."}, + {"py2c_mapcon_top_dimension", py2c_mapcon_top_dimension, METH_VARARGS, + "Returns the top dimension of the maps in the container."}, + {"py2c_mapcon_number_of_maps", py2c_mapcon_number_of_maps, METH_VARARGS, + "Returns the number of maps in the container."}, + {"py2c_mapcon_degree_of_map", py2c_mapcon_degree_of_map, METH_VARARGS, + "Given the dimension and index of a map, given as two integers as\n input parameters, returns the degree of that map."}, + {"py2c_mapcon_coefficients_of_map", py2c_mapcon_coefficients_of_map, + METH_VARARGS, + "Returns the coefficients of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of complex doubles."}, + {"py2c_mapcon_exponents_of_map", py2c_mapcon_exponents_of_map, METH_VARARGS, + "Returns the exponents of a monomial map stored in the container.\n On entry are three parameters:\n 1) the dimension of the map;\n 2) the index of the map in all maps of that dimension;\n 3) the number of variables.\n On return is a Python list of integers."}, + {"py2c_initialize_standard_homotopy", py2c_initialize_standard_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using standard double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the standard systems container."}, + {"py2c_initialize_dobldobl_homotopy", py2c_initialize_dobldobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using double double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the dobldobl systems container."}, + {"py2c_initialize_quaddobl_homotopy", py2c_initialize_quaddobl_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using quad double precision arithmetic.\n There is one integer number on input to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used.\n Before calling this routine the target and start system must\n be copied over from the quaddobl systems container."}, + {"py2c_initialize_multprec_homotopy", py2c_initialize_multprec_homotopy, + METH_VARARGS, + "Initializes the homotopy to track a path with a generator,\n using arbitrary multiprecision arithmetic.\n There is are two integer numbers on input:\n 1) one to be considered as a boolean,\n as an indicator whether a fixed gamma constant will be used; and\n 2) the number of decimal places in the working precision.\n Before calling this routine the target and start system must\n be copied over from the multprec systems container."}, + {"py2c_initialize_varbprec_homotopy", py2c_initialize_varbprec_homotopy, + METH_VARARGS, + "Initializes the variable precision homotopy with the target and\n start system stored in the strings.\n On entry are three integers and two strings, in the following order:\n 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant\n is used, if 0, a random value for gamma will be generated;\n 2) nc_target, the number of characters in the string target;\n 3) target, the string representation of the target system;\n 4) nc_start, the number of characters in the string start;\n 5) start, the string representation of the start system.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_initialize_standard_solution", py2c_initialize_standard_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the standard solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_dobldobl_solution", py2c_initialize_dobldobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the dobldobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_quaddobl_solution", py2c_initialize_quaddobl_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the quaddobl solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_multprec_solution", py2c_initialize_multprec_solution, + METH_VARARGS, + "Initializes the path tracker with a generator with a solution\n from the multprec solutions container. The index to the solution\n is given as an integer input parameter. The counting of the\n indices starts at one, so the first solution has index one."}, + {"py2c_initialize_varbprec_solution", py2c_initialize_varbprec_solution, + METH_VARARGS, + "Uses the string representation of a solution to initialize the\n variable precision path tracker with.\n There are three input parameters, two integers and one string:\n 1) nv, the number of variables in the solution;\n 2) nc, the number of characters in the string sol;\n 3) sol, the string representation of a solution.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_next_standard_solution", py2c_next_standard_solution, + METH_VARARGS, + "Computes the next point on the solution path with standard double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the standard solutions container.\n The functions py2c_initialized_standard_tracker and\n py2c_initialize_standard_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_dobldobl_solution", py2c_next_dobldobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with double double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the dobldobl solutions container.\n The functions py2c_initialized_dobldobl_tracker and\n py2c_initialize_dobldobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_quaddobl_solution", py2c_next_quaddobl_solution, + METH_VARARGS, + "Computes the next point on the solution path with quad double\n precision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the quaddobl solutions container.\n The functions py2c_initialized_quaddobl_tracker and\n py2c_initialize_quaddobl_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_multprec_solution", py2c_next_multprec_solution, + METH_VARARGS, + "Computes the next point on the solution path with arbitrary\n multiprecision for the given index. This index is given as an input\n parameter. The index to the solution path starts its count at one.\n The point itself is stored in the multprec solutions container.\n The functions py2c_initialized_multprec_tracker and\n py2c_initialize_multprec_solution must have been executed earlier.\n The failcode is returned, which equals zero if all is well."}, + {"py2c_next_varbprec_solution", py2c_next_varbprec_solution, + METH_VARARGS, + "Computes the next point on a solution path in variable precision.\n There are four integer input parameters:\n 1) the number of correct decimal places in the solution;\n 2) an upper bound on the number of decimal places in the precision;\n 3) the maximum number of Newton iterations;\n 4) a flag zero or one to indicate the verbose level.\n On return is a tuple:\n 0) the failure code, which equals zero if all went well; and\n 1) the string representation of the next solution on the path."}, + {"py2c_clear_standard_tracker", py2c_clear_standard_tracker, METH_VARARGS, + "Deallocates data used in the standard double precision tracker\n with a generator."}, + {"py2c_clear_dobldobl_tracker", py2c_clear_dobldobl_tracker, METH_VARARGS, + "Deallocates data used in the double double precision tracker\n with a generator."}, + {"py2c_clear_quaddobl_tracker", py2c_clear_quaddobl_tracker, METH_VARARGS, + "Deallocates data used in the quad double precision tracker\n with a generator."}, + {"py2c_clear_multprec_tracker", py2c_clear_multprec_tracker, METH_VARARGS, + "Deallocates data used in the arbitrary multiprecision tracker\n with a generator."}, + {"py2c_clear_varbprec_tracker", py2c_clear_varbprec_tracker, METH_VARARGS, + "Deallocates data used in the variable precision tracker\n with a generator."}, + {"py2c_ade_newton_qd", py2c_ade_newton_qd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_onepath_qd", py2c_ade_onepath_qd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_ade_manypaths_qd", py2c_ade_manypaths_qd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_newton_qd", py2c_gpu_newton_qd, METH_VARARGS, + "Runs Newton's method with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The quaddobl systems container must contain a valid polynomial system\n and the quaddobl solutions container must hold a valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_onepath_qd", py2c_gpu_onepath_qd, METH_VARARGS, + "Tracks one solution path with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container must holds valid solution.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {"py2c_gpu_manypaths_qd", py2c_gpu_manypaths_qd, METH_VARARGS, + "Tracks many solution paths with algorithmic differentation\n in quad double precision on the data in the systems and solutions container.\n The start and target systems must have been defined\n and the quaddobl solutions container holds valid solutions.\n On entry is the verbose flag, which equals zero if no output is wanted,\n or 1 if extra information should be written to screen.\n On return is the failure code, which equals zero if all went well."}, + {NULL, NULL, 0, NULL} +}; + +/* This is the initialization routine which will be called by the + * Python run-time when the library is imported in order to retrieve + * a pointer to the above method address table. + * Note that therefore this routine must be visible in the dynamic library + * either through the use of a ".def" file or by a compiler instruction + * such as "declspec(export)" */ + +PyMODINIT_FUNC initphcpy2c(void) +{ + Py_InitModule("phcpy2c", phcpy2c_methods); +} diff -Nru phcpack-2.4.84/src/Mod/phcpy2cpath_qd.h phcpack-2.4.85/src/Mod/phcpy2cpath_qd.h --- phcpack-2.4.84/src/Mod/phcpy2cpath_qd.h 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/phcpy2cpath_qd.h 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,3200 @@ +/* This file contains the prototypes for the py2c interface functions, + * linked with the quad double version of the Path library. */ + +void initialize ( void ); +/* + * DESCRIPTION : + * Calls adainit(), initializing the interface to the Ada code, + * setting the initialized flag to one and the finalized flag to zero, + * if the initialized flag was zero. + * Nothing happens if the initialized flag equals one. */ + +void finalize ( void ); +/* + * DESCRIPTION : + * Calls adafinal(), finalizing the interface to the Ada code, + * setting the finalized flag to one and the initialized flag to zero, + * if the finalized flag was zero. + * Nothing happens if the finalized flag equals one. */ + +/* The wrapping of functions with prototypes in phcpack.h starts here. */ + +static PyObject *py2c_PHCpack_version_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the version string of PHCpack. + * The version string is 40 characters long. */ + +static PyObject *py2c_set_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Takes the value of the integer given on input + * and sets the seed for the random number generators. + * This fixing of the seed enables reproducible runs. */ + +static PyObject *py2c_get_seed ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the current value of the seed. + * Using this value in py2c_set_seed will ensure that the + * results of previous runs can be reproduced. */ + +static PyObject *py2c_read_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_standard_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in standard double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_dobldobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in double double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a target system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_target_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a target system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to enter a start system that will + * be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_read_quaddobl_start_system_from_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The two input arguments are a number and a string: + * 1) The number equals the number of characters in the string. + * 2) The string given on input is the name of a file which contains + * a start system to be parsed in quad double precision. + * The failure code is returned, which is zero if all went well. */ + +static PyObject *py2c_define_output_file ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user to define the output file. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_write_standard_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the target system as stored in standard double precision + * to screen or to the defined output file. */ + +static PyObject *py2c_write_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start system as stored in standard double precision + * to screen or to the defined output file. */ + +/* Copying systems from and to containers. */ + +static PyObject *py2c_copy_standard_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the target system. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the target system. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the target system. */ + +static PyObject *py2c_copy_multprec_container_to_target_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the target system. */ + +static PyObject *py2c_copy_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_system_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start system to the container for systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in standard double precision to the start system. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in double double precision to the start system. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in quad double precision to the start system. */ + +static PyObject *py2c_copy_multprec_container_to_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the system in the container for systems with coefficients + * in arbitrary multiprecision to the start system. */ + +/* Creation of homotopy and the tracking of all paths. */ + +static PyObject *py2c_create_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_standard_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in standard double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_dobldobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in double double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_quaddobl_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in quad double precision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_create_multprec_homotopy_with_gamma + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the data for a homotopy in arbitrary multiprecision. + * On input are two doubles: the real and imaginary part of the + * gamma constant. + * The failure code is returned, which is zero when all goes well. */ + +static PyObject *py2c_clear_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in standard double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in double double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in quad double precision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_clear_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocation of the homotopy stored in arbitrary multiprecision. + * On return is the failure code, which equals zero if all is well. */ + +static PyObject *py2c_write_start_solutions ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the start solutions in standard double precision either to + * the screen (standard output) or to the defined output file. + * On return is the failure code, which is zero if all is well. */ + +static PyObject *py2c_tune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to tune the continuation parameters. */ + +static PyObject *py2c_show_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Shows the current values of the continuation parameters. */ + +static PyObject *py2c_autotune_continuation_parameters + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tunes the values of the continuation parameters. + * On input are two integers: + * 1) the difficulty level of the solution paths; and + * 2) the number of decimal places in the precision. */ + +static PyObject *py2c_determine_output_during_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to determine the level of output + * during the path tracking. */ + +static PyObject *py2c_solve_by_standard_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in standard double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_dobldobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in double double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_quaddobl_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in quad double precision. + * On input is one integer: the number of tasks for path tracking. + * If that input number is zero, then no multitasking is applied. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_solve_by_multprec_homotopy_continuation + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks the paths defined by the homotopy in arbitrary multiprecision. + * On input is one integer: the number of decimal places in the precision. + * On return is the failure code, which is zero when all went well. */ + +/* copying solutions from and to containers */ + +static PyObject *py2c_copy_standard_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_target_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the target solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the target solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the target solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the target solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_target_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the target solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in standard double precision to the + * container for solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in double double precision to the + * container for solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in quad double precision to the + * container for solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_start_solutions_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the start solutions in arbitrary multiprecision to the + * container for solutions in arbitrary multiprecision. */ + +static PyObject *py2c_copy_standard_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in standard double precision from the + * container to the start solutions in standard double precision. */ + +static PyObject *py2c_copy_dobldobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in double double precision from the + * container to the start solutions in double double precision. */ + +static PyObject *py2c_copy_quaddobl_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in quad double precision from the + * container to the start solutions in quad double precision. */ + +static PyObject *py2c_copy_multprec_container_to_start_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the solutions in arbitrary multiprecision from the + * container to the start solutions in arbitrary multiprecision. */ + +/* black box solver, mixed volume calculator, and Newton step */ + +static PyObject *py2c_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * systems with coefficients in standard double precision. + * One integer is expected on input: the number of tasks. + * If that number is zero, then no multitasking is applied. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard systems container. */ + +static PyObject *py2c_solve_Laurent_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Calls the blackbox solver on the system stored in the container for + * Laurent systems with coefficients in standard double precision. + * Two integers are expected on input: + * 1) a boolean flag silent: if 1, then no intermediate output about + * the root counts is printed, if 0, then the solver is verbose; and + * 2) the number of tasks: if 0, then no multitasking is applied, + * otherwise as many tasks as the number will run. + * On return, the container for solutions in standard double precision + * contains the solutions to the system in the standard Laurent systems + * container. */ + +static PyObject *py2c_mixed_volume ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the mixed volume, and the stable mixed volume as well if + * the input parameter equals 1. On return is the mixed volume, or + * a tuple with the mixed volume and the stable mixed volume. */ + +static PyObject *py2c_standard_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in standard double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in double double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_deflate ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies deflation in quad double precision to the system and + * the solutions stored in the containers. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the system in + * the standard systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the system in + * the dobldobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the system in + * the quaddobl systems container and to the solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_step ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the system in + * the multprec systems container and to the solutions in the container. + * On input is an integer, the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in standard double precision to the Laurent + * system in the standard Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in double double precision to the Laurent + * system in the dobldobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in quad double precision to the Laurent + * system in the quaddobl Laurent systems container and to the solutions + * in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_multprec_Newton_Laurent_step + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies one Newton step in arbitrary multiprecision to the Laurent + * system in the multprec Laurent systems container and to the solutions + * in the container. + * On input is an integer: the number of decimal places in the precision. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_varbprec_Newton_Laurent_steps + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies Newton's method in variable precision. + * There are six input parameters: + * 1) the dimension: the number of variables and equations; + * 2) the accuracy, expressed as the correct number of decimal places; + * 3) the maximum number of iterations in Newton's method; + * 4) an upper bound on the number of decimal places in the precision; + * 5) a string, with the representation of the polynomials in the system. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in unisolvers.h starts here. */ + +static PyObject *py2c_usolve_standard ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with standard double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the standard systems container. After the call of this function, + * the standard solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_dobldobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with double double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the dobldobl systems container. After the call of this function, + * the dobldobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_quaddobl ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with quad double precision arithmetic. + * On input are two numbers: + * 1) the maximum number of iterations in the method of Weierstrass; and + * 2) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the quaddobl systems container. After the call of this function, + * the quaddobl solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +static PyObject *py2c_usolve_multprec ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the method of Weierstrass to compute all roots of a + * polynomial in one variable with arbitrary multiprecision arithmetic. + * On input are three numbers: + * 1) the number of decimal places in the working precision; + * 2) the maximum number of iterations in the method of Weierstrass; and + * 3) the epsilon requirement on the accuracy of the roots. + * Before calling this function, the polynomial should be stored in + * the multprec systems container. After the call of this function, + * the multprec solutions container contains the roots of the polynomial. + * On return is the number of iterations done by the solver. */ + +/* The wrapping of functions with prototypes in giftwrappers.h starts here. */ + +static PyObject *py2c_giftwrap_planar ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a planar point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * On return is the string representation of the vertex points, + * sorted so that each two consecutive points define an edge. */ + +static PyObject *py2c_giftwrap_convex_hull ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies the giftwrapping algorithm to a point configuration. + * On input are an integer and a string: + * 1) the number of points in the list; + * 2) the string representation of a Python list of tuples. + * When the function returns, the internal data structures + * to store the convex hull are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_giftwrap_number_of_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of facets of the given dimension. + * On input is an integer, the dimension of the facet. */ + +static PyObject *py2c_giftwrap_retrieve_facet + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of a facet. + * On input are two integer numbers: + * 1) the dimension of the facet; + * 2) the index of the facet. */ + +static PyObject *py2c_giftwrap_clear_3d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension three. */ + +static PyObject *py2c_giftwrap_clear_4d_facets + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data for a convex hull in dimension four. */ + +static PyObject *py2c_giftwrap_support_size + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation of + * the support of the first Laurent polynomial in the container. */ + +static PyObject *py2c_giftwrap_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the support + * of a Laurent polynomial. */ + +static PyObject *py2c_giftwrap_clear_support_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the string representation of the support set + * that was stored internally by the call py2c_giftwrap_support_size. */ + +static PyObject *py2c_giftwrap_initial_form ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the Laurent systems container by its initial form. + * There are three input parameters: + * 1) the dimension, number of coordinates in the inner normal; + * 2) the number of characters in the string representation for the normal; + * 3) the string representation of the inner normal. + * On return is the failure code, which equals zero if all went well. */ + +/* wrapping functions in syscon.h starts from here */ + +static PyObject *py2c_syscon_read_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in standard double precision. + * The system will be placed in the standard systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in standard double precision. + * The system will be placed in the standard Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in double double precision. + * The system will be placed in the dobldobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in double double precision. + * The system will be placed in the dobldobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in quad double precision. + * The system will be placed in the quaddobl systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in quad double precision. + * The system will be placed in the quaddobl Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a polynomial system with coefficients + * in arbitrary multiprecision. The one input parameter is an integer, + * the number of decimal places in the working precision. + * The system will be placed in the multprec systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_read_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive procedure to read a Laurent polynomial system with + * coefficients in arbitrary multiprecision. The one input parameter is + * an integer, the number of decimal places in the working precision. + * The system will be placed in the multprec Laurent systems container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_random_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Places in the systems container a random polynomial system + * with coefficients in standard double precision. + * There are four integers as input parameters: + * 1) n, the number of polynomials and variables; + * 2) m, the number of monomials per equation; + * 3) d, the largest degree of each monomial; + * 4) c, the type of coefficient: 0 if on the complex unit circle, + * 1, if all coefficients are one, 2, if all coefficients are + * random floats in [-1,+1]. */ + +static PyObject *py2c_syscon_write_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with standard double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with standard double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with double double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with double double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with quad double precision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with quad double precision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the polynomial system with arbitrary multiprecision coefficients + * that is stored in the container. */ + +static PyObject *py2c_syscon_write_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the Laurent polynomial system with arbitrary multiprecision + * coefficients that is stored in the container. */ + +static PyObject *py2c_syscon_clear_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_standard_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in standard double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_dobldobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in double double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_quaddobl_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in quad double precision. */ + +static PyObject *py2c_syscon_clear_multprec_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_clear_multprec_Laurent_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for Laurent polynomial systems + * with coefficients in arbitrary multiprecision. */ + +static PyObject *py2c_syscon_number_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of symbols in the symbol table. */ + +static PyObject *py2c_syscon_write_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the symbols in the symbol table to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_string_of_symbols + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string that contains the symbols in the symbol table. + * The symbols are separate from each other by one space. */ + +static PyObject *py2c_syscon_remove_symbol_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Removes a symbol, given by name, from the symbol table. + * On input are two arguments: + * 1) an integer, as the number of characters in the name; + * 2) a string of characters with the name of the symbol. + * The failure code is returned, which equals zero when all went well. */ + +static PyObject *py2c_syscon_clear_symbol_table + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Clears the symbol table. */ + +static PyObject *py2c_syscon_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in standard + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in double + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in quad + * double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of polynomials with coefficients in arbitrary + * multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * standard double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * double double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * quad double precision as stored in the systems container. */ + +static PyObject *py2c_syscon_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of Laurent polynomials with coefficients in + * arbitrary multiprecision as stored in the systems container. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_polynomials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for polynomials with coefficients in + * arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_standard_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in standard double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_dobldobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in double double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_quaddobl_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in quad double precision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_initialize_number_of_multprec_Laurentials + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initialzes the container for Laurent polynomials with coefficients + * in arbitrary multiprecision. The input argument is an integer, + * the number of polynomials in the container. + * The failure code is returned, which equals zero if all went well. */ + +static PyObject *py2c_syscon_degree_of_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in standard double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in double double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in quad double precision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_degree_of_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the degree of the k-th polynomial in the container for + * polynomials with coefficients in arbitrary multiprecision. + * The index k of the polynomial is the one input argument. */ + +static PyObject *py2c_syscon_number_of_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th polynomial stored in the + * container for systems with coefficients in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_number_of_Laurent_terms + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of terms in the k-th Laurent polynomial stored + * in the container for Laurent polynomials systems with coefficients + * in standard double precision. + * The input parameter k is the index of the polynomial k. */ + +static PyObject *py2c_syscon_retrieve_term ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Retrieves one term of a polynomial with coefficients in standard + * double precision, that is stored in the systems container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_store_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for polynomials + * with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_polynomial + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_store_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in standard double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in double double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in quad double precision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are four input parameters, three integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_store_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the k-th polynomial in the systems container for Laurent + * polynomials with coefficients in arbitrary multiprecision. + * As a precondition for this function, the container must be initialized + * for sufficiently many polynomials, in any case >= k. + * There are five input parameters, four integers and one string: + * 1) nc, the number of characters in the string p; + * 2) n, the number of variables in the multivariate polynomial; + * 3) k, the index of the polynomial in the system; + * 4) dp, the number of decimal places to parse the coefficients; + * 5) p, a valid string representation for a polynomial. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_syscon_load_standard_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with standard double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_dobldobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with double double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_quaddobl_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with quad double complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_load_multprec_Laurential + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the k-th polynomial in the Laurent systems container + * with arbitrary multiprecision complex coefficients as a string. + * The value for k is in the one integer parameter of this function. */ + +static PyObject *py2c_syscon_total_degree ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns in d the total degree of the system with coefficients in + * standard double precision, as stored in the container. */ + +static PyObject *py2c_syscon_standard_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syson_standard_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the standard double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_dobldobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the double double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that has its k-th variable dropped. + * The index k of the vaiable is given as an input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_syscon_quaddobl_drop_variable_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system in the quad double precision container + * with the same system that have that variable dropped + * corresponding to the name in the string s of nc characters long. + * The function has two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, a string that holds the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of functions with prototypes in solcon.h starts here. */ + +static PyObject *py2c_solcon_read_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in standard double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in double double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in quad double precision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_read_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Interactive function to read the solutions into the container, + * in arbitrary multiprecision. + * Returns the failure code, which is zero when all went well. */ + +static PyObject *py2c_solcon_write_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in standard double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in double double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in quad double precision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_write_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the solutions in arbitrary multiprecision to screen. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in standard double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in double double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in quad double precision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_clear_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the container for solutions in arbitrary multiprecision. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_open_solution_input_file + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Prompts the user for the name of the input file for the solutions and + * opens the input file. All subsequent reading happens from this input. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_solcon_length_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in standard double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in double double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in quad double precision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_length_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * On input is the index k to a solution in arbitrary multiprecision, + * stored in the container. On return is the length of the string + * representation for that k-th solution in the container. */ + +static PyObject *py2c_solcon_write_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in standard double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in double double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in quad double precision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_write_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation for the k-th solution stored + * in arbitrary multiprecision in the container. + * On input are two integers: + * 1) the index to the solution; and + * 2) the number of characters in the string representation + * for that solution. */ + +static PyObject *py2c_solcon_retrieve_next_standard_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current standard solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_dobldobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current dobldobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_quaddobl_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current quaddobl solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_retrieve_next_multprec_initialize + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resets the pointer to the current multprec solution in the container + * to the first solution in the list. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_move_current_standard_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in standard double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_dobldobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_quaddobl_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in double double precision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_move_current_multprec_to_next + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Moves the pointer to the current solution in arbitrary multiprecision + * to the next solution and returns the value of the cursor. + * If cursor on return is zero, then either the pointer was null + * or there is no next solution. */ + +static PyObject *py2c_solcon_length_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current standard double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current double double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current quad double solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_length_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of characters in the string representation + * of the current arbitrary multiprecision solution in the container, + * at the place indicated by the value of the cursor. + * If this value equals zero, then there is no current solution, + * and then the length on return equals zero. */ + +static PyObject *py2c_solcon_write_current_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current standard double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in standard double precision in the container. */ + +static PyObject *py2c_solcon_write_current_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current double double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in double double precision in the container. */ + +static PyObject *py2c_solcon_write_current_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current quad double solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in quad double precision in the container. */ + +static PyObject *py2c_solcon_write_current_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the current multiprecision solution in the solution container + * to the string s of n+1 characters. The last character is \0. + * The value of n is given as the one input parameter to this function. + * On return is the string that contains the string representation of + * the current solution in arbitrary multiprecision in the container. */ + +static PyObject *py2c_solcon_append_standard_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in standard double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_dobldobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in double double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_quaddobl_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in quad double precision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_append_multprec_solution_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a solution in arbitrary multiprecision to the list + * of solutions already stored in the container. + * There are three input parameters: + * 1) the number of variables; + * 2) the number of characters in the string; + * 3) the string representing the solution to append to the list. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_number_of_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in standard double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in double double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in quad double precision, + * as stored in the container. */ + +static PyObject *py2c_solcon_number_of_multprec_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of solutions in arbitrary multiprecision, + * as stored in the container. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_standard_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_dobldobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the double double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_index + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their k-th coordinate dropped. + * There is one input parameter: the index k of the coordinate. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_solcon_quaddobl_drop_coordinate_by_name + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quad double precision container + * with the same solutions that have their coordinate dropped + * corresponding to the name in the string s of nc characters long. + * There are two input parameters, an integer and a string: + * 1) nc, the number of characters in the string with the name; + * 2) s, the string with the name of the variable. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of the functions in product.h starts here. */ + +static PyObject *py2c_product_supporting_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a supporting set structure for the system stored in the + * container with coefficients in standard double precision. */ + +static PyObject *py2c_product_write_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the supporting set structure to screen. */ + +static PyObject *py2c_product_set_structure_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the set structure. */ + +static PyObject *py2c_product_parse_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Parses a given string into a set structure. + * On input are two parameters, one integer and one string: + * 1) the number of characters in the given string; and + * 2) the characters in the string. + * On return is the failure code, if zero, then the string + * has been parsed into a valid set structure. */ + +static PyObject *py2c_product_is_set_structure_supporting + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Checks whether the stored set structure is supporting + * for the system in the standard systems container. + * Returns an integer which represents true (1) or false (0). */ + +static PyObject *py2c_product_linear_product_root_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the linear-product root count, computed from + * the supporting set structure. */ + +static PyObject *py2c_product_random_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Builds a random linear-product system based on the + * stored set structure. On return is the failure code, + * which equals zero if all went well. */ + +static PyObject *py2c_product_solve_linear_product_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes all solutions to the linear-product system + * and stores the solutions in the container for solutions + * in standard double precision. On return is the failure + * code, which equals zero if all went well. */ + +static PyObject *py2c_product_clear_set_structure + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the set structure. */ + +static PyObject *py2c_product_m_homogeneous_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For the system in the standard systems container, + * a heuristic partition of the set of variables may + * lead to a Bezout number that is smaller than the total degree. + * On return is the m-homogeneous Bezout number for the + * string representation of the partition that is returned + * as the second argument in the tuple. */ + +static PyObject *py2c_product_m_partition_Bezout_number + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, computes + * the m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +static PyObject *py2c_product_m_homogeneous_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given a partition of the set of variables, constructs + * an m-homogeneous Bezout number for the system in + * the standard systems container. + * On input are two arguments: + * 1) the number of characters in the string (second argument); and + * 2) the string representation for a partition of the variables. + * On return is the m-homogeneous Bezout number. */ + +/* The wrapping of functions with prototypes in celcon.h starts here. */ + +static PyObject *py2c_celcon_initialize_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the cell container with the number of distinct supports, + * this number is given as the one input parameter. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_set_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the type of mixture of the support sets. + * On input are two parameters, an integer and a string: + * 1) the integer equals the number of distinct supports; + * 2) the string is a string representation of a Python list of integers, + * there are as many integers as the value of the first parameter. + * Each integer is a positive number, equal to the number of occurrences + * of each support set. */ + +static PyObject *py2c_celcon_type_of_mixture + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the type of mixture + * of the support sets. This string is the string representation + * of a Python list of integers. */ + +static PyObject *py2c_celcon_append_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Appends a lifted point to the cells container. + * There are three input parameters: + * 1) the dimension of the point; + * 2) the index of the support to where to append to; and + * 3) the string representation of the lifted point. + * Returns the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_retrieve_lifted_point + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string representation of a lifted point. + * On input are three integer numbers: + * 1) the number of coordinates in the lifted point; + * 2) the index to the support set; and + * 3) the index to the point in that support set. */ + +static PyObject *py2c_celcon_mixed_volume_of_supports + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the mixed volume of the supports stored + * in the cell container. */ + +static PyObject *py2c_celcon_number_of_cells + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of cells in the cell container. */ + +static PyObject *py2c_celcon_standard_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in standard double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_dobldobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in double double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_quaddobl_random_coefficient_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifted supports stored in the container, + * a random coefficient system with coefficients in quad double + * precision is stored in the cell container. */ + +static PyObject *py2c_celcon_copy_into_standard_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in standard double precision is copied + * from the cell container to the container for systems with + * coefficients in standard double precision. */ + +static PyObject *py2c_celcon_copy_into_dobldobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in double double precision is copied + * from the cell container to the container for systems with + * coefficients in double double precision. */ + +static PyObject *py2c_celcon_copy_into_quaddobl_systems_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * The random coefficient system in quad double precision is copied + * from the cell container to the container for systems with + * coefficients in quad double precision. */ + +static PyObject *py2c_celcon_standard_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in standard double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_dobldobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in double double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_quaddobl_polyhedral_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Based on the lifting and the random coefficient system, + * the polyhedral homotopy to solve the random coefficient system + * in quad double precision is constructed. + * This function also initializes the internal data structures to store + * the solutions of start and target systems. + * The lifted supports and the random coefficient system are defined. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_solve_standard_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using standard double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in standard double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_dobldobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using double double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in double double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_solve_quaddobl_start_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the start system corresponding to the k-th mixed cell, + * using quad double precision arithmetic. + * The precondition for this function is that the creation of + * the polyhedral homotopy in quad double precision ended well. + * On return is the number of solution found, which must equal + * the mixed volume of the k-th mixed cell. */ + +static PyObject *py2c_celcon_track_standard_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using standard double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in standard double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_dobldobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using double double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in double double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_track_quaddobl_solution_path + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks a solution path starting at the i-th solution of the k-th cell, + * using quad double precision arithmetic. + * The precondition for this function is that the start system defined + * by the k-th mixed cell is solved in quad double precision. + * There are three input parameters: + * 1) k, the index to a mixed cell in the cell container; + * 2) i, the index to a solution path defined by that mixed cell; + * 3) otp, the level for intermediate output during path tracking. + * A target solution corresponding to the k-th cell is added on return. */ + +static PyObject *py2c_celcon_copy_target_standard_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in standard double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_dobldobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in double double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_copy_target_quaddobl_solution_to_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Copies the i-th target solution corresponding to the k-th mixed cell + * to the container for solutions in quad double precision. + * There are two input parameters for this function: + * 1) k, the index to the mixed cell; + * 2) i, the index to the i-th solution path defined by the cell. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_celcon_permute_standard_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with standard double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_dobldobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with double double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_permute_quaddobl_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Permutes the systems in the container for polynomial and Laurent systems + * with quad double coefficients corresponding to the permutation + * used to compute the mixed-cell configuration. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_celcon_clear_container + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the data in the cell container. */ + +/* wrapping functions to scale polynomial systems and solutions */ + +static PyObject *py2c_scale_standard_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the standard systems container, + * with standard double precision arithmetic. The system in the standard + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_dobldobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the dobldobl systems container, + * with double double precision arithmetic. The system in the dobldobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_quaddobl_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Applies scaling to the system in the quaddobl systems container, + * with quad double precision arithmetic. The system in the quaddobl + * systems container is replaced by the scaled system. + * On entry is one integer, which should be either 0, 1, or 2: + * 0 for only scaling of the equations, + * 1 variable scaling without variability reduction, + * 2 variable scaling with variability reduction. + * On return is a tuple with the scaling coefficients (if mode > 0) + * and the estimated inverse condition number of the scaling problem. */ + +static PyObject *py2c_scale_standard_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the standard solutions container with + * the scaled solutions, scaled with standard double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_dobldobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the dobldobl solutions container with + * the scaled solutions, scaled with double double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +static PyObject *py2c_scale_quaddobl_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the solutions in the quaddobl solutions container with + * the scaled solutions, scaled with quad double precision arithmetic, + * using the given scaling coefficients. + * On entry are two parameters: an integer and a string. + * The integer contains the number of elements in the list + * of scaling coefficients (doubles) stored in a the string. + * The format of the string is the Python string representation + * of a list of doubles, i.e.: starting with '[' and ending with ']'. */ + +/* wrapping functions to manipulate algebraic sets */ + +static PyObject *py2c_embed_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Replaces the system with coefficients in standard double precision + * in the container with its embedding of dimension d. + * The dimension d is given as an integer parameter on input. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_standard_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in standard double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_dobldobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in double double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_quaddobl_cascade_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a homotopy in quad double precision using the stored + * systems to go one level down the cascade, removing one slice. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_set_to_mute ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Sets the state of monodromy permutations to silent. */ + +static PyObject *py2c_factor_define_output_file_with_string + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Defines the output file for the factorization. + * On input are an integer and a string: + * 1) the integer equals the number of characters in the string; and + * 2) the string contains the name of a file. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_assign_labels ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns labels, replacing the multiplicity field of each solution + * in standard double precision stored in the container. + * On entry are two integers: + * 1) n, the number of coordinates of the solutions; + * 2) nbsols, the number of solutions in the container. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_factor_initialize_sampler + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the sampling machine with a witness set. + * On entry is the dimension or the number of hyperplanes + * to slide the positive dimensional solution set. */ + +static PyObject *py2c_factor_initialize_monodromy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the internal data structures for n loops, + * to factor a k-dimensional solution component of degree d. + * There are three integers on input, in the following order: + * 1) n, the number of loops; + * 2) d, the degree of the solution set; + * 3) k, the dimensional of the solution set. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_factor_store_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the solutions in the container to the data for monodromy loops. */ + +static PyObject *py2c_factor_restore_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Restores the first initialized solutions from sampler to the container. */ + +static PyObject *py2c_factor_track_paths ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks as many paths as defined by witness set. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_swap_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Swaps the current slices with new slices and takes new solutions + * as start to turn back. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_new_slices ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Generates k random slides in n-space. + * The k and the n are the two input parameters. + * On return is the failure code, which is zero when all went well. */ + +static PyObject *py2c_factor_set_trace_slice + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Assigns the constant coefficient of the first slice. + * On entry is a flag to indicate if it was the first time or not. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_store_gammas ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Stores the gamma constants for the sampler in the monodromy loops. + * Generates as many random complex constants as the value on input. + * On return is the failure code, which is zero if all went well. */ + +static PyObject *py2c_factor_permutation_after_loop + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * For a solution set of degree d, computes the permutation using the + * solutions most recently stored, after a loop. + * The number d is the input parameter of this function. + * On return is the string representation of the permutation. */ + +static PyObject *py2c_factor_update_decomposition + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Updates the decomposition with the given permutation of d elements. + * On entry are two integers and one string: + * 1) d, the number of elements in the permutation; + * 2) nc, the number of characters in the string; + * 3) p, the string representation of the permutation. + * Returns one if the current decomposition is certified, + * otherwise returns zero. */ + +static PyObject *py2c_factor_number_of_components + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of irreducible factors in the current + * decomposition of the witness set. */ + +static PyObject *py2c_factor_witness_points_of_component + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns a string which represents an irreducible component. + * On entry are two integers: + * 1) the sum of the degrees of all components; + * 2) the index of the component. */ + +static PyObject *py2c_factor_trace_sum_difference + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the difference between the actual sum at the samples + * defined by the labels to the generic points in the factor, + * and the trace sum. + * On entry are three integer numbers and one string: + * 1) d, the number of points in the witness set; + * 2) k, the dimension of the solution set; + * 3) nc, the number of characters in the string; + * 4) ws, the string representing the labels of the witness set. */ + +static PyObject *py2c_witness_set_of_hypersurface + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given in the string p of nc characters a polynomial in nv variables, + * terminated by a semicolon, the systems and solutions container on + * return contain a witness set for the hypersurface defined by p. + * On entry are two integers and one string, in the following order: + * 1) nv, the number of variables of the polynomials; + * 2) nc, the number of characters in the string p; + * 3) p, string representation of a polynomial, terminates with ';'. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_create_diagonal_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Creates a diagonal homotopy to intersect two solution sets of + * dimensions a and b respectively, where a >= b. + * The two input parameters are values for a and b. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. */ + +static PyObject *py2c_start_diagonal_cascade_solutions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Makes the start solutions to start the cascade homotopy to + * intersect two solution sets of dimensions a and b, where a >= b. + * The dimensions a and b are given as input parameters. + * The systems stored as target and start system in the container + * define the witness sets for these two solution sets. + * On return is the failure code, which equals zero when all went well. */ + +static PyObject *py2c_extrinsic_top_diagonal_dimension + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the dimension of the start and target system to + * start the extrinsic cascade to intersect two witness sets, + * respectively of dimensions a and b, with ambient dimensions + * respectively equal to n1 and n2. + * There are four integers as parameters on input: n1, n2, a and b. */ + +static PyObject *py2c_collapse_diagonal ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Eliminates the extrinsic diagonal for the system and solutions + * in the containers. On input are two integers: + * 1) k, the current number of slack variables in the embedding; + * 2) d, the number of slack variables to add to the final embedding. + * The system in the container has its diagonal eliminated and is + * embedded with k+d slack variables. The solutions corresponding + * to this system are in the solutions container. + * On return is the failure code, which equals zero if all went well. */ + +/* The wrapping of Pieri and Littlewood-Richardson homotopies, + * with prototypes in schubert.h starts here. */ + +static PyObject *py2c_schubert_pieri_count + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of p-plane producing curves of degree q + * that meet m*p + q*(m+p) given general m-planes. + * On input are three integer numbers: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; and + * 3) q, the degree of the curve that produces p-planes. + * The dimension of the ambient space of this Pieri problem is m+p. */ + +static PyObject *py2c_schubert_resolve_conditions + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Resolves a general Schubert intersection condition in n-space + * for k-planes subject to conditions defined by brackers. + * On return is the root count, the number of k-planes that satisfy + * the intersection conditions imposed by the brackets for general flags. + * On entry are five integers and one string: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c, the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen. */ + +static PyObject *py2c_schubert_littlewood_richardson_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Littlewood-Richardson homotopies to resolve a number of + * general Schubert intersection conditions on k-planes in n-space. + * The polynomial system that was solved is in the container for + * systems with coefficients in standard double precision and the + * corresponding solutions are in the standard solutions container. + * On entry are six integers and two strings, in the following order: + * 1) n, the ambient dimension, where the k-planes live; + * 2) k, the dimension of the solution planes; + * 3) c,the number of intersection conditions; + * 4) nc, the number of characters in the string brackets; + * 5) brackets is a string representation of c brackets, where the numbers + * in each bracket are separated by spaces; + * 6) the flag verbose: when 0, no intermediate output is written, + * when 1, then the resolution is dispayed on screen; + * 7) nbchar, the number of characters in the string filename; + * 8) filename is the name of the output file. + * The function returns a tuple of an integer and a string: + * 0) r is the formal root count as the number of k-planes + * for conditions imposed by the brackets for general flags; + * 1) flags, a string with the coefficients of the general flags. */ + +static PyObject *py2c_schubert_localization_poset + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of the localization poset for the + * Pieri root count for m, p, and q. The input parameters are the + * integer values for m, p, and q: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the curves that produce p-planes. */ + +static PyObject *py2c_schubert_pieri_homotopies + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs the Pieri homotopies for (m,p,q) dimensions on generic input data. + * On return the systems container for systems with coefficients in standard + * double precision contains the polynomial system solved and in the + * solutions in standard double precision are in the solutions container. + * On entry are four integers and two strings: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, the string with m*p + q*(m+p) random complex input m-planes, + * where the real and imaginary parts are separated by a space; + * 6) pts, the string with m*p + q*(m+p) random complex interpolation + * points, only needed if q > 0. + * The function returns the combinatorial Pieri root count, + * which should equal the number of solutions in the container. */ + +static PyObject *py2c_schubert_osculating_planes + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the string representation of n real m-planes in + * d-space osculating a rational normal curve + * at the n points in s, where n = m*p + q*(m+p) and d = m+p. + * On entry are four integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string pts; and + * 5) pts, the string with m*p + q*(m+p) interpolation points. */ + +static PyObject *py2c_schubert_pieri_system + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Fills the container of systems with coefficients in standard + * double precision with a polynomial system that expresses the + * intersection conditions of a general Pieri problem. + * On input are five integers and one string: + * 1) m, the dimension of the input planes; + * 2) p, the dimension of the output planes; + * 3) q, the degree of the solution maps; + * 4) nc, the number of characters in the string A; + * 5) A, m*p + q*(m+p) random complex input m-planes, where + * the real and imaginary parts are separated by a space; + * 6) a flag is_real: if == 1, then the coefficients of A are real, + * if == 0, then the coefficients of A are complex. + * Returns the failure code, which equals zero if all went well. */ + +/* The wrapping functions in mapcon.h starts here. */ + +static PyObject *py2c_mapcon_solve_system ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Solves the binomial system stored in the Laurent systems container. + * There is one input argument, either one or zero. + * If one, then only the pure top dimensional solutions are computed. + * If zero, then all solution sets are computed. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_write_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Writes the maps stored in the container to screen. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_clear_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates the maps stored in the container. + * Returns the failure code, which equals zero if all went well. */ + +static PyObject *py2c_mapcon_top_dimension ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the top dimension of the maps in the container. */ + +static PyObject *py2c_mapcon_number_of_maps ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the number of maps in the container. */ + +static PyObject *py2c_mapcon_degree_of_map ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Given the dimension and index of a map, given as two integers as + * input parameters, returns the degree of that map. */ + +static PyObject *py2c_mapcon_coefficients_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the coefficients of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of complex doubles. */ + +static PyObject *py2c_mapcon_exponents_of_map + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Returns the exponents of a monomial map stored in the container. + * On entry are three parameters: + * 1) the dimension of the map; + * 2) the index of the map in all maps of that dimension; + * 3) the number of variables. + * On return is a Python list of integers. */ + +/* The wrapping of functions with prototypes in next_track.h starts below. */ + +static PyObject *py2c_initialize_standard_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using standard double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the standard systems container. */ + +static PyObject *py2c_initialize_dobldobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using double double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the dobldobl systems container. */ + +static PyObject *py2c_initialize_quaddobl_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using quad double precision arithmetic. + * There is one integer number on input to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used. + * Before calling this routine the target and start system must + * be copied over from the quaddobl systems container. */ + +static PyObject *py2c_initialize_multprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the homotopy to track a path with a generator, + * using arbitrary multiprecision arithmetic. + * There is are two integer numbers on input: + * 1) one to be considered as a boolean, + * as an indicator whether a fixed gamma constant will be used; and + * 2) the number of decimal places in the working precision. + * Before calling this routine the target and start system must + * be copied over from the multprec systems container. */ + +static PyObject *py2c_initialize_varprec_homotopy + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the variable precision homotopy with the target and + * start system stored in the strings. + * On entry are three integers and two strings, in the following order: + * 1) fixed_gamma is a flag: if 1, then a fixed value for the gamma constant + * is used, if 0, a random value for gamma will be generated; + * 2) nc_target, the number of characters in the string target; + * 3) target, the string representation of the target system; + * 4) nc_start, the number of characters in the string start; + * 5) start, the string representation of the start system. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_initialize_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the standard solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the dobldobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the quaddobl solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Initializes the path tracker with a generator with a solution + * from the multprec solutions container. The index to the solution + * is given as an integer input parameter. The counting of the + * indices starts at one, so the first solution has index one. */ + +static PyObject *py2c_initialize_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Uses the string representation of a solution to initialize the + * variable precision path tracker with. + * There are three input parameters, two integers and one string: + * 1) nv, the number of variables in the solution; + * 2) nc, the number of characters in the string sol; + * 3) sol, the string representation of a solution. + * On return is the failure code, which equals zero if all went well. */ + +static PyObject *py2c_next_standard_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with standard double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the standard solutions container. + * The functions py2c_initialized_standard_tracker and + * py2c_initialize_standard_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_dobldobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with double double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the dobldobl solutions container. + * The functions py2c_initialized_dobldobl_tracker and + * py2c_initialize_dobldobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_quaddobl_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with quad double + * precision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the quaddobl solutions container. + * The functions py2c_initialized_quaddobl_tracker and + * py2c_initialize_quaddobl_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_multprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on the solution path with arbitrary + * multiprecision for the given index. This index is given as an input + * parameter. The index to the solution path starts its count at one. + * The point itself is stored in the multprec solutions container. + * The functions py2c_initialized_multprec_tracker and + * py2c_initialize_multprec_solution must have been executed earlier. + * The failcode is returned, which equals zero if all is well. */ + +static PyObject *py2c_next_varbprec_solution + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Computes the next point on a solution path in variable precision. + * There are four integer input parameters: + * 1) the number of correct decimal places in the solution; + * 2) an upper bound on the number of decimal places in the precision; + * 3) the maximum number of Newton iterations; + * 4) a flag zero or one to indicate the verbose level. + * On return is a tuple: + * 0) the failure code, which equals zero if all went well; and + * 1) the string representation of the next solution on the path. */ + +static PyObject *py2c_clear_standard_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the standard double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_dobldobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the double double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_quaddobl_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the quad double precision tracker + * with a generator. */ + +static PyObject *py2c_clear_multprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the arbitrary multiprecision tracker + * with a generator. */ + +static PyObject *py2c_clear_varbprec_tracker + ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Deallocates data used in the variable precision tracker + * with a generator. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in quad double precision by the + * functions in adepath_qd.h, starts here. */ + +static PyObject *py2c_ade_newton_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The quaddobl systems container contains a valid polynomial system + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_ade_onepath_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_ade_manypaths_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation in quad + * double precision on the data in the systems and solutions container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ + +/* The wrapping of Newton's method and path trackers with the evaluation + * done by algorithmic differentiation in quad double precision on the GPU + * by the functions in gpupath_qd.h, starts here. */ + +static PyObject *py2c_gpu_newton_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Runs Newton's method with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The quaddobl systems container contains a valid polynomial system + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen. + * + * ON RETURN : + * fail 0 if all went well, and the corrected solution is in the + * solution container, + * if different from zero, then an error happened. */ + +static PyObject *py2c_gpu_onepath_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks one solution path with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds a valid solution. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solution at the end of the path + * is in the solution container, + * if different from 0, then an error happened. */ + +static PyObject *py2c_gpu_manypaths_qd ( PyObject *self, PyObject *args ); +/* + * DESCRIPTION : + * Tracks many solution paths with algorithmic differentation on CPU and GPU + * in quad double precision on the data in the systems and solutions + * container. + * + * REQUIRED : + * The start and target systems have been defined + * and the quaddobl solutions container holds valid solutions. + * + * ON ENTRY : + * mode execution mode is 0 (CPU+GPU), 1 (CPU), or 2 (GPU); + * verbose 0 if no intermediate output is wanted, + * 1 if extra information should be written to screen; + * regamma real part of the random gamma constant; + * imgamma imaginary part of the random constant. + * + * ON RETURN : + * fail 0 if all went well, and the solutions at the end of paths + * are in the solution container, + * if different from 0, then an error happened. */ diff -Nru phcpack-2.4.84/src/Mod/READ_ME phcpack-2.4.85/src/Mod/READ_ME --- phcpack-2.4.84/src/Mod/READ_ME 1970-01-01 00:00:00.000000000 +0000 +++ phcpack-2.4.85/src/Mod/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -0,0 +1,31 @@ +The extension module for phcpy in PHCv2.4.85 + +The C extension module phcpy2c was initiated with Kathy Piret, +to extend the Python interpreter with what would become phcpy. + +Version 2.4 added code to integrate the Path library of Xiangcheng Yu. + +In 2.4.09, the phcpy2c3.c defines the code of the phcpy2c3 extension +module for use with Python 3.5. + +------------------------------------------------------------------------------ +file name : short description +------------------------------------------------------------------------------ +adepath_d : algorithmic diff in trackers with doubles +adepath_dd : algorithmic diff in trackers with double doubles +adepath_qd : algorithmic diff in trackers with quad doubles +lib_adepath_d : test on functions in adepath_d +lib_adepath_dd : test on functions in adepath_dd +lib_adepath_qd : test on functions in adepath_qd +gpupath_d : interface to Path library on GPU for doubles +gpupath_dd : interface to Path library on GPU for double doubles +gpupath_qd : interface to Path library on GPU for quad doubles +lib_gpupath_d : test on functions in gpupath_d +lib_gpupath_dd : test on functions in gpupath_dd +lib_gpupath_qd : test on functions in gpupath_qd +------------------------------------------------------------------------------ +phcpy2c.c : C extension module for Python 2.6 and 2.7 +phcpy2cadepath_d.cpp : C++ extension of phcpy2c with Path (CPU) for doubles +phcpy2cpath_d.cpp : C++ extension of phcpy2c with Path (GPU) for doubles +phcpy2c3.c : C extension module for Python 3.5 +------------------------------------------------------------------------------ diff -Nru phcpack-2.4.84/src/Objects/makefile phcpack-2.4.85/src/Objects/makefile --- phcpack-2.4.84/src/Objects/makefile 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Objects/makefile 2021-06-30 23:22:40.000000000 +0000 @@ -115,7 +115,7 @@ test_math_lib: test_numbers test_qd test_vectors test_matrices test_divisors \ test_reduction test_polynomials test_functions test_supports \ - test_circuits test_ad + test_circuits test_series test_laurent test_ad # Test programs for the library Math_Lib/Numbers : @@ -770,6 +770,22 @@ ts_sercffpol: make -f $(MAKEFILE) ts_sercffpol +# Test programs for the Math_Lib/Laurent library : + +test_laurent: ts_pslaur ts_laurmat ts_lserpol ts_lsernew + +ts_pslaur: + make -f $(MAKEFILE) ts_pslaur + +ts_laurmat: + make -f $(MAKEFILE) ts_laurmat + +ts_lserpol: + make -f $(MAKEFILE) ts_lserpol + +ts_lsernew: + make -f $(MAKEFILE) ts_lsernew + # Test programs for the Math_Lib/AD library : test_ad: ts_monom ts_monvec ts_polvec ts_sys2vec @@ -1291,10 +1307,10 @@ # Test programs for the Root_Counts/MixedVol library : -test_mixedvol: convsub ts_mv2c ts_mva +test_mixedvol: ts_convsub ts_mv2c ts_mv ts_mva -convsub: - make -f $(MAKEFILE) convsub +ts_convsub: + make -f $(MAKEFILE) ts_convsub ts_mv2c: make -f $(MAKEFILE) ts_mv2c diff -Nru phcpack-2.4.84/src/Objects/makefile_mac phcpack-2.4.85/src/Objects/makefile_mac --- phcpack-2.4.84/src/Objects/makefile_mac 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Objects/makefile_mac 2021-06-30 23:22:40.000000000 +0000 @@ -39,6 +39,7 @@ PHCAda=../Ada MPILib=../MPI PHCgpu=../GPU +PHCmod=../Mod BIN=../bin INCLULIBS=-I$(PHCAda)/System -I$(PHCAda)/System/Unix_Timer \ -I$(PHCAda)/Math_Lib/Numbers -I$(PHCAda)/Math_Lib/QD \ @@ -46,7 +47,8 @@ -I$(PHCAda)/Math_Lib/Divisors -I$(PHCAda)/Math_Lib/Reduction \ -I$(PHCAda)/Math_Lib/Polynomials -I$(PHCAda)/Math_Lib/Functions \ -I$(PHCAda)/Math_Lib/Supports -I$(PHCAda)/Math_Lib/Circuits \ - -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/AD \ + -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/Laurent \ + -I$(PHCAda)/Math_Lib/AD \ -I$(PHCAda)/Deformations/Solutions -I$(PHCAda)/Deformations/Homotopy \ -I$(PHCAda)/Deformations/Newton -I$(PHCAda)/Deformations/Curves \ -I$(PHCAda)/Deformations/End_Games -I$(PHCAda)/Deformations/Sweep \ @@ -61,8 +63,9 @@ -I$(PHCAda)/Components/Samplers -I$(PHCAda)/Components/Interpolators \ -I$(PHCAda)/Components/Factorization -I$(PHCAda)/Components/Decomposition \ -I$(PHCAda)/Components/Solver -I$(PHCAda)/Components/Tropical \ - -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State -I$(MPILib) \ - -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main + -I$(PHCAda)/CtoPHC/Types -I$(PHCAda)/CtoPHC/Structures \ + -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State \ + -I$(MPILib) -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main # flags with full optimization # GNATFLAGS=-gnatv -O3 -gnatp -gnatf # GNATOPTFLAGS=-gnatv -O3 -gnatp -gnatf @@ -90,7 +93,7 @@ phc: lib.a parameter.o lib2path.o feedback.o get_clock.o get_clocks_per_sec.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecount.o + simplex4phc.o mvc4phc.o demicsrun4phc.o $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c @@ -100,7 +103,7 @@ gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb gnatbind phctop use_c2phc pieri_solver gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ - parameter.o lib2path.o corecount.o \ + parameter.o lib2path.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ simplex4phc.o mvc4phc.o demicsrun4phc.o \ lib.a $(QD_LIB)/libqd.a \ @@ -111,7 +114,7 @@ phc_noqd: lib.a feedback.o get_clock.o get_clocks_per_sec.o \ inputData.o outputData.o iTest.o fTest.o reltab.o parameter.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecount.o lib2path_d.o + simplex4phc.o mvc4phc.o demicsrun4phc.o lib2path_d.o $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c @@ -121,7 +124,7 @@ gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb gnatbind phctop use_c2phc pieri_solver gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ - corecount.o parameter.o lib2path_d.o \ + parameter.o lib2path_d.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ simplex4phc.o mvc4phc.o demicsrun4phc.o lib.a \ /usr/lib/libc++.dylib /usr/lib/libstdc++.dylib \ @@ -552,10 +555,6 @@ ts_danorm: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_danorm.adb -o $(BIN)/ts_danorm -ts_errfree: - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_errfree.adb \ - -o $(BIN)/ts_errfree - # Test programs for Math_Lib/Polynomials : ts_poly: @@ -868,6 +867,24 @@ gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_sercffpol.adb \ -o $(BIN)/ts_sercffpol +# Test programs for the Math_Lib/Laurent library : + +ts_pslaur: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_pslaur.adb \ + -o $(BIN)/ts_pslaur + +ts_laurmat: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_laurmat.adb \ + -o $(BIN)/ts_laurmat + +ts_lserpol: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_lserpol.adb \ + -o $(BIN)/ts_lserpol + +ts_lsernew: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_lsernew.adb \ + -o $(BIN)/ts_lsernew + # Test programs for the Math_Lib/AD library : ts_monom: @@ -1430,23 +1447,24 @@ # Test programs for the Root_Counts/MixedVol library : -convsub: - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) convsub.adb -o $(BIN)/convsub +ts_convsub: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_convsub.adb \ + -o $(BIN)/ts_convsub ts_mv2c: - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/mv.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/cell_stack.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/form_lp.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/index_tree_lp.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/zero_index_tree.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/one_level_lp.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/mixed_volume.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/relation_table.c - $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/prepare_for_mv.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/mv1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/cell_stack1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/form_lp1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/index_tree_lp1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/zero_index_tree1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/one_level_lp1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/mixed_volume1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/relation_table1.c + $(gcc) -c $(PHCAda)/Root_Counts/MixedVol/prepare_for_mv1.c gnatmake -o $(BIN)/ts_mv2c $(INCLULIBS) $(GNATOPTFLAGS) ts_mv2c.adb \ - -largs mv.o cell_stack.o form_lp.o index_tree_lp.o \ - zero_index_tree.o one_level_lp.o mixed_volume.o \ - relation_table.o prepare_for_mv.o -lm + -largs mv1.o cell_stack1.o form_lp1.o index_tree_lp1.o \ + zero_index_tree1.o one_level_lp1.o mixed_volume1.o \ + relation_table1.o prepare_for_mv1.o -lm ts_mv: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mv.adb -o $(BIN)/ts_mv @@ -1980,10 +1998,10 @@ gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_cpm.adb -o $(BIN)/ts_cpm ts_pieri_count: - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) pieri_count.adb + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) pieri_root_count.adb $(gcc) -c $(PHCAda)/CtoPHC/Funky/ts_pieri_count.c - gnatbind -n pieri_count - gnatlink -C pieri_count ts_pieri_count.o -o $(BIN)/ts_pieri_count + gnatbind -n pieri_root_count + gnatlink -C pieri_root_count ts_pieri_count.o -o $(BIN)/ts_pieri_count ts_pieri_solver: gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) pieri_solver.adb @@ -2547,18 +2565,22 @@ corecount.o: $(gcc) -c $(PHCAda)/Tasking/corecount.c -o corecount.o -ts_corecount: corecount.o - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb - gnatbind ts_corecount - gnatlink ts_corecount corecount.o -o $(BIN)/ts_corecount +# ts_corecount: corecount.o +# gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb +# gnatbind ts_corecount +# gnatlink ts_corecount corecount.o -o $(BIN)/ts_corecount + +ts_corecount: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb \ + -o $(BIN)/ts_corecount ts_mtmatvec: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mtmatvec.adb \ - -o $(BIN)/ts_mtmatvec + -o $(BIN)/ts_mtmatvec ts_mtpolval: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mtpolval.adb \ - -o $(BIN)/ts_mtpolval + -o $(BIN)/ts_mtpolval ts_mtlinsol: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mtlinsol.adb \ @@ -2721,12 +2743,15 @@ gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_greet.adb \ -o $(BIN)/ts_greet -ts_actopt: corecount.o - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_actopt.adb - gnatbind ts_actopt - gnatlink ts_actopt corecount.o -o $(BIN)/ts_actopt +# ts_actopt: corecount.o +# gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_actopt.adb +# gnatbind ts_actopt +# gnatlink ts_actopt corecount.o -o $(BIN)/ts_actopt -ts_opthand: corecount.o inputData.o outputData.o iTest.o fTest.o \ +ts_actopt: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_actopt.adb -o $(BIN)/actopt + +ts_opthand: inputData.o outputData.o iTest.o fTest.o \ simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o mvc4phc.o \ parameter.o lib2path.o feedback.o lib.a $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c @@ -2737,7 +2762,7 @@ gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) pieri_solver.adb gnatbind ts_opthand use_c2phc mainfeed pieri_solver - gnatlink ts_opthand corecount.o inputData.o outputData.o iTest.o \ + gnatlink ts_opthand inputData.o outputData.o iTest.o \ fTest.o simplex4phc.o reltab.o mvc4phc.o \ demicsrun4phc.o lib2path.o $(QD_LIB)/libqd.a \ syscon.o solcon.o phcpack.o parameter.o \ @@ -3503,7 +3528,7 @@ $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/series.c $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/padcon.c $(gpp) -Dcompilewgpp=1 -c -I$(PYTHON) -I$(PYTHON)/Include \ - $(PHCLib)/phcpy2c2.c + -I$(PHCLib) $(PHCmod)/phcpy2c2.c gnatmake -c -static -O3 $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb gnatbind -n use_c2phc gnatlink -dynamiclib -C use_c2phc phcpy2c2.o phcpack.o syscon.o \ @@ -3552,7 +3577,7 @@ $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/series.c $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/padcon.c $(gpp) -Dcompilewgpp=1 -c -O3 \ - -I$(PYTHON) -I$(PYTHON)/Include $(PHCLib)/phcpy2c2.c + -I$(PYTHON) -I$(PYTHON)/Include $(PHCmod)/phcpy2c2.c gnatmake -c -O3 -static $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb gnatbind -n -static use_c2phc gnatlink -dynamiclib -C use_c2phc phcpy2c2.o phcpack.o syscon.o \ @@ -3611,8 +3636,8 @@ $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/syspool.c $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/series.c $(gpp) -Dcompilewgpp=1 -c -O3 $(PHCLib)/padcon.c - $(gpp) -Dcompilewgpp=1 -c -O3 \ - -I/opt/miniconda3/include -I$(PYTHON38) $(PHCLib)/phcpy2c3.c + $(gpp) -Dcompilewgpp=1 -c -O3 -I$(PHCLib) \ + -I/opt/miniconda3/include -I$(PYTHON38) $(PHCmod)/phcpy2c3.c gnatmake -c -O3 -static $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb gnatbind -n -static use_c2phc -o use_c2phc_binder.adb gnatmake -static -c use_c2phc_binder.adb diff -Nru phcpack-2.4.84/src/Objects/makefile_unix phcpack-2.4.85/src/Objects/makefile_unix --- phcpack-2.4.84/src/Objects/makefile_unix 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Objects/makefile_unix 2021-06-30 23:22:40.000000000 +0000 @@ -1,4475 +1,4499 @@ -# The beginning of this makefile defines the names of the locations -# of the Python development headers for phcpy, followed by the home -# of MPI (message passing), and the QD library (with its GPU version). -# The next set of names defines by this makefile refers to the -# general directory structure of the library of PHCpack. -# The targets are then listed, grouped by each directory. - -# The makefile works on RHEL 6.6, Centos Linux 7.3, -# with python2.6, python3, openmpi, GNAT GPL 2016 and 2017, -# GNAT Community 2018 and 2019. - -# Location of Python for 2.7 and 3.6 development headers for phcpy - -PYTHON=/usr/include/python2.7 -PYTHON3=/usr/local/include/python3.6m - -# The location of the Sage Python lib: - -SAGEPYTHONLIB=/home/microway/Downloads/sage-7.3/local/lib - -# The location of the adalib folder for the GNAT GPL compiler: - -# for GNAT GPL 2016 : -# ADALIB=/usr/gnat-gpl-2016/lib/gcc/x86_64-pc-linux-gnu/4.9.4/adalib -# FOR GNAT GPL 2017 : -# ADALIB=/usr/gnat/lib/gcc/x86_64-pc-linux-gnu/6.3.1/adalib -# GNAT Community 2018 : -# ADALIB=/home/microway/opt/GNAT/2018/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib -# GNAT Community 2019 : -# ADALIB=/home/jan/opt/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib -# GNAT Community 2020 : -ADALIB=/home/microway/opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1/adalib - -# The location of the g++ compiler - -gpp=g++ - -# before GNAT GPL 2017 : -# gpp=/usr/bin/g++ -# for GNAT GPL 2017 : -# gpp=g++ - -# The location of the MPI: - -MPI_HOME=/home/microway/Downloads/openmpi-4.0.0 - -# Location of the QD library and its GPU version: - -QD_ROOT=/usr/local/qd-2.3.17 -QD_LIB=/usr/local/lib -GQD_HOME=/usr/local/gqd_1_2 -SDK_HOME=/usr/local/cuda/sdk - -# Definitions of PHCpack specific names start here: - -PHCLib=../Lib -PHCAda=../Ada -MPILib=../MPI -PHCgpu=../GPU -BIN=../bin -INCLULIBS=-I$(PHCAda)/System -I$(PHCAda)/System/Unix_Timer \ - -I$(PHCAda)/Math_Lib/Numbers -I$(PHCAda)/Math_Lib/QD \ - -I$(PHCAda)/Math_Lib/Vectors -I$(PHCAda)/Math_Lib/Matrices \ - -I$(PHCAda)/Math_Lib/Divisors -I$(PHCAda)/Math_Lib/Reduction \ - -I$(PHCAda)/Math_Lib/Polynomials -I$(PHCAda)/Math_Lib/Functions \ - -I$(PHCAda)/Math_Lib/Supports -I$(PHCAda)/Math_Lib/Circuits \ - -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/AD \ - -I$(PHCAda)/Deformations/Solutions -I$(PHCAda)/Deformations/Homotopy \ - -I$(PHCAda)/Deformations/Newton -I$(PHCAda)/Deformations/Curves \ - -I$(PHCAda)/Deformations/End_Games -I$(PHCAda)/Deformations/Sweep \ - -I$(PHCAda)/Deformations/Trackers -I$(PHCAda)/Deformations/Continuation \ - -I$(PHCAda)/Root_Counts/Product -I$(PHCAda)/Root_Counts/Binomials \ - -I$(PHCAda)/Root_Counts/Implift -I$(PHCAda)/Root_Counts/Stalift \ - -I$(PHCAda)/Root_Counts/Dynlift -I$(PHCAda)/Root_Counts/Symmetry \ - -I$(PHCAda)/Root_Counts/MixedVol -I$(PHCAda)/Root_Counts/DEMiCs \ - -I$(PHCAda)/Root_Counts/Puiseux \ - -I$(PHCAda)/Schubert/SAGBI -I$(PHCAda)/Schubert/Pieri \ - -I$(PHCAda)/Schubert/Induction \ - -I$(PHCAda)/Components/Samplers -I$(PHCAda)/Components/Interpolators \ - -I$(PHCAda)/Components/Factorization -I$(PHCAda)/Components/Decomposition \ - -I$(PHCAda)/Components/Solver -I$(PHCAda)/Components/Tropical \ - -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State -I$(MPILib) \ - -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main -# flags with full optimization -GNATFLAGS=-gnatv -O3 -gnatp -gnatf -GNATOPTFLAGS=-gnatv -O3 -gnatp -gnatf -# GNATFLAGS=-gnatv -O3 -gnatp -gnatf --GNATBIND="gnatbind -static" -# flags to turn on all warnings and validity checks -# GNATFLAGS=-gnatv -gnatwa -gnatVa -GNATNOPFLAGS=-gnatv -gnatwa -gnatVa -# GNATFLAGS=-gnatv --GNATBIND="gnatbind -static" - -COFLAGS = -O2 - -# the main executable is phc : - -phc: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o lib2path.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecount.o - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ - $(GNATFLAGS) phctop.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind phctop use_c2phc pieri_solver - gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ - parameter.o lib2path.o corecount.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o \ - lib.a $(QD_LIB)/libqd.a \ - get_clock.o get_clocks_per_sec.o \ - -o $(BIN)/phc -lm --LINK=$(gpp) - -phc_noqd: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o \ - lib2path_d.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecount.o - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_noqd \ - $(GNATFLAGS) phctop.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind phctop use_c2phc pieri_solver - gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ - parameter.o lib2path_d.o corecount.o \ - inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o \ - lib.a $(QD_LIB)/libqd.a \ - get_clock.o get_clocks_per_sec.o \ - -o $(BIN)/phc -lm --LINK=$(gpp) - -# some settings for MPI : - -CC = /usr/local/bin/mpicc -CLINKER = $(CC) -CCC = /usr/local/bin/mpiCC -CCLINKER = $(CCC) - -# Test program to see if compiler works, "hello world" : - -hello: - gnatmake $(INCLULIBS) $(GNATFLAGS) hello.adb -o $(BIN)/hello - -ada_hello: - gnatmake $(INCLULIBS) $(GNATFLAGS) ada_hello.adb -o $(BIN)/ada_hello - -# Test programs for the System library : - -ts_time: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_time.adb -o $(BIN)/ts_time - -ts_clock: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_clock.adb -o $(BIN)/ts_clock - -ts_stamps: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stamps.adb -o $(BIN)/ts_stamps - -ts_timer: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_timer.adb -o $(BIN)/ts_timer - -get_clock.o: - gcc -c $(PHCAda)/System/Basic_Timer/get_clock.c - -get_clocks_per_sec.o: - gcc -c $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c - -ts_ctimer: get_clock.o get_clocks_per_sec.o - gnatmake -o $(BIN)/ts_ctimer $(INCLULIBS) ts_ctimer.adb \ - -largs get_clock.o get_clocks_per_sec.o - -ts_wintimer: get_clock.o get_clocks_per_sec.o - gnatmake -o $(BIN)/ts_wintimer $(INCLULIBS) ts_wintimer.adb \ - -largs get_clock.o get_clocks_per_sec.o - -ts_syscall: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syscall.adb -o $(BIN)/ts_syscall - -ts_mach: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mach.adb -o $(BIN)/ts_mach - -ts_cmdline: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmdline.adb -o $(BIN)/ts_cmdline - -ts_byemess: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_byemess.adb -o $(BIN)/ts_byemess - -ts_commuser: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_commuser.adb \ - -o $(BIN)/ts_commuser - -ts_filescan: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filescan.adb \ - -o $(BIN)/ts_filescan - -ts_strsplit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strsplit.adb \ - -o $(BIN)/ts_strsplit - -ts_striscan: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_striscan.adb \ - -o $(BIN)/ts_striscan - -ts_threads: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_threads.adb -o $(BIN)/ts_threads - -# Test programs for the library Math_Lib/Numbers : - -ts_strnum: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strnum.adb -o $(BIN)/ts_strnum - -ts_printf: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_printf.adb -o $(BIN)/ts_printf - -ts_intnum: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intnum.adb -o $(BIN)/ts_intnum - -ts_natnum: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natnum.adb -o $(BIN)/ts_natnum - -ts_natdiv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natdiv.adb -o $(BIN)/ts_natdiv - -ts_longflt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_longflt.adb -o $(BIN)/ts_longflt - -ts_fltnum: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltnum.adb -o $(BIN)/ts_fltnum - -ts_cmpnum: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpnum.adb -o $(BIN)/ts_cmpnum - -ts_plrexp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_plrexp.adb -o $(BIN)/ts_plrexp - -ts_random: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_random.adb -o $(BIN)/ts_random - -ts_extran: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extran.adb -o $(BIN)/ts_extran - -ts_matfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_matfun.adb \ - -o $(BIN)/ts_matfun -largs -lm - -ts_intval: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intval.adb -o $(BIN)/ts_intval - -ts_mpcst: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpcst.adb -o $(BIN)/ts_mpcst - -ts_numbio: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_numbio.adb -o $(BIN)/ts_numbio - -ts_isnan: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_isnan.adb -o $(BIN)/ts_isnan - -# Test programs for the Math_Lib/QD library : - -ts_dbldbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dbldbl.adb -o $(BIN)/ts_dbldbl - -ts_qddbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qddbl.adb -o $(BIN)/ts_qddbl - -ts_ddcmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddcmplx.adb -o $(BIN)/ts_ddcmplx - -ts_qdcmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdcmplx.adb -o $(BIN)/ts_qdcmplx - -ts_mpddcv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpddcv.adb -o $(BIN)/ts_mpddcv - -ts_mpqdcv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpqdcv.adb -o $(BIN)/ts_mpqdcv - -ts_ddfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddfun.adb -o $(BIN)/ts_ddfun - -ts_qdfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdfun.adb -o $(BIN)/ts_qdfun - -ts_tdfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdfun.adb -o $(BIN)/ts_tdfun - -ts_pdfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdfun.adb -o $(BIN)/ts_pdfun - -ts_odfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odfun.adb -o $(BIN)/ts_odfun - -ts_dafun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dafun.adb -o $(BIN)/ts_dafun - -ts_cmpexp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpexp.adb -o $(BIN)/ts_cmpexp - -ts_tridbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tridbl.adb -o $(BIN)/ts_tridbl - -ts_octdbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_octdbl.adb -o $(BIN)/ts_octdbl - -ts_tdcmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdcmplx.adb \ - -o $(BIN)/ts_tdcmplx - -ts_odcmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odcmplx.adb \ - -o $(BIN)/ts_odcmplx - -ts_pentadbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pentadbl.adb \ - -o $(BIN)/ts_pentadbl - -ts_decadbl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_decadbl.adb \ - -o $(BIN)/ts_decadbl - -ts_pdcmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdcmplx.adb \ - -o $(BIN)/ts_pdcmplx - -ts_dacmplx: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dacmplx.adb \ - -o $(BIN)/ts_dacmplx - -ts_mpcasts: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpcasts.adb \ - -o $(BIN)/ts_mpcasts - -# Test programs for Math_Lib/Vectors : - -ts_natvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natvec.adb -o $(BIN)/ts_natvec - -ts_intvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intvec.adb -o $(BIN)/ts_intvec - -ts_fltvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltvec.adb -o $(BIN)/ts_fltvec - -ts_cmpvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpvec.adb -o $(BIN)/ts_cmpvec - -ts_nesvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nesvec.adb -o $(BIN)/ts_nesvec - -ts_ddvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddvec.adb -o $(BIN)/ts_ddvec - -ts_qdvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdvec.adb -o $(BIN)/ts_qdvec - -ts_strvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strvec.adb -o $(BIN)/ts_strvec - -ts_perfddvc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfddvc.adb \ - -o $(BIN)/ts_perfddvc - -ts_perfqdvc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfqdvc.adb \ - -o $(BIN)/ts_perfqdvc - -ts_tdvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdvec.adb -o $(BIN)/ts_tdvec - -ts_pdvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdvec.adb -o $(BIN)/ts_pdvec - -ts_odvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odvec.adb -o $(BIN)/ts_odvec - -ts_davec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_davec.adb -o $(BIN)/ts_davec - -# Test programs for Math_Lib/Matrices : - -ts_natmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natmat.adb -o $(BIN)/ts_natmat - -ts_intmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intmat.adb -o $(BIN)/ts_intmat - -ts_fltmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltmat.adb -o $(BIN)/ts_fltmat - -ts_fltdls: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltdls.adb -o $(BIN)/ts_fltdls - -ts_cmpmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpmat.adb -o $(BIN)/ts_cmpmat - -ts_ddmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddmat.adb -o $(BIN)/ts_ddmat - -ts_qdmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdmat.adb -o $(BIN)/ts_qdmat - -ts_tdmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdmat.adb -o $(BIN)/ts_tdmat - -ts_pdmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdmat.adb -o $(BIN)/ts_pdmat - -ts_odmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odmat.adb -o $(BIN)/ts_odmat - -ts_damat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_damat.adb -o $(BIN)/ts_damat - -# Test programs for Math_Lib/Divisors : - -ts_gcd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_gcd.adb -o $(BIN)/ts_gcd - -ts_intlina: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intlina.adb -o $(BIN)/ts_intlina - -ts_smith: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_smith.adb -o $(BIN)/ts_smith - -ts_intinv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intinv.adb -o $(BIN)/ts_intinv - -ts_circuit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_circuit.adb \ - -o $(BIN)/ts_circuit - -# Test programs for Math_Lib/Reduction : - -ts_fltlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltlu.adb -o $(BIN)/ts_fltlu - -ts_cmplu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmplu.adb -o $(BIN)/ts_cmplu - -ts_ddlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddlu.adb -o $(BIN)/ts_ddlu - -ts_qdlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdlu.adb -o $(BIN)/ts_qdlu - -ts_qrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qrd.adb -o $(BIN)/ts_qrd - -ts_dqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dqrd.adb -o $(BIN)/ts_dqrd - -ts_ddqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddqrd.adb -o $(BIN)/ts_ddqrd - -ts_tdqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdqrd.adb -o $(BIN)/ts_tdqrd - -ts_qdqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdqrd.adb -o $(BIN)/ts_qdqrd - -ts_pdqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdqrd.adb -o $(BIN)/ts_pdqrd - -ts_odqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odqrd.adb -o $(BIN)/ts_odqrd - -ts_daqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_daqrd.adb -o $(BIN)/ts_daqrd - -ts_mpqrd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpqrd.adb -o $(BIN)/ts_mpqrd - -ts_svd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_svd.adb -o $(BIN)/ts_svd - -ts_dsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dsvd.adb -o $(BIN)/ts_dsvd - -ts_ddsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddsvd.adb -o $(BIN)/ts_ddsvd - -ts_tdsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdsvd.adb -o $(BIN)/ts_tdsvd - -ts_qdsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdsvd.adb -o $(BIN)/ts_qdsvd - -ts_pdsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdsvd.adb -o $(BIN)/ts_pdsvd - -ts_odsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odsvd.adb -o $(BIN)/ts_odsvd - -ts_dasvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dasvd.adb -o $(BIN)/ts_dasvd - -ts_mpsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpsvd.adb -o $(BIN)/ts_mpsvd - -ts_rowred: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rowred.adb -o $(BIN)/ts_rowred - -ts_eigval: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_eigval.adb -o $(BIN)/ts_eigval - -ts_mgs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mgs.adb -o $(BIN)/ts_mgs - -ts_mgsrnk: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mgsrnk.adb -o $(BIN)/ts_mgsrnk - -ts_backsubs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_backsubs.adb \ - -o $(BIN)/ts_backsubs - -ts_perflu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perflu.adb -o $(BIN)/ts_perflu - -ts_perfdlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfdlu.adb -o $(BIN)/ts_perfdlu - -ts_perfdsvd: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfdsvd.adb \ - -o $(BIN)/ts_perfdsvd - -ts_vvlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vvlu.adb -o $(BIN)/ts_vvlu - -ts_vmplu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmplu.adb -o $(BIN)/ts_vmplu - -ts_tdlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdlu.adb -o $(BIN)/ts_tdlu - -ts_pdlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdlu.adb -o $(BIN)/ts_pdlu - -ts_odlu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odlu.adb -o $(BIN)/ts_odlu - -ts_dalu: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dalu.adb -o $(BIN)/ts_dalu - -ts_ddnorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddnorm.adb -o $(BIN)/ts_ddnorm - -ts_tdnorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdnorm.adb -o $(BIN)/ts_tdnorm - -ts_qdnorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdnorm.adb -o $(BIN)/ts_qdnorm - -ts_pdnorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdnorm.adb -o $(BIN)/ts_pdnorm - -ts_odnorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odnorm.adb -o $(BIN)/ts_odnorm - -ts_danorm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_danorm.adb -o $(BIN)/ts_danorm - -ts_errfree: - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_errfree.adb \ - -o $(BIN)/ts_errfree - -# Test programs for Math_Lib/Polynomials : - -ts_poly: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poly.adb -o $(BIN)/ts_poly - -ts_laurpoly: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_laurpoly.adb \ - -o $(BIN)/ts_laurpoly - -ts_randpoly: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_randpoly.adb \ - -o $(BIN)/ts_randpoly - -ts_laurlist: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_laurlist.adb \ - -o $(BIN)/ts_laurlist - -ts_rpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rpol.adb -o $(BIN)/ts_rpol - -ts_ddpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddpol.adb -o $(BIN)/ts_ddpol - -ts_tdpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdpol.adb -o $(BIN)/ts_tdpol - -ts_qdpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdpol.adb -o $(BIN)/ts_qdpol - -ts_pdpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdpol.adb -o $(BIN)/ts_pdpol - -ts_odpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odpol.adb -o $(BIN)/ts_odpol - -ts_dapol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddpol.adb -o $(BIN)/ts_dapol - -ts_polmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polmat.adb -o $(BIN)/ts_polmat - -ts_jaco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jaco.adb -o $(BIN)/ts_jaco - -ts_parse: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_parse.adb -o $(BIN)/ts_parse - -ts_subs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_subs.adb -o $(BIN)/ts_subs - -ts_tabform: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tabform.adb -o $(BIN)/ts_tabform - -ts_str2pol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_str2pol -o $(BIN)/ts_str2pol - -ts_termlist: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_termlist \ - -o $(BIN)/ts_termlist - -ts_rwspol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rwspol -o $(BIN)/ts_rwspol - -ts_nbrvar: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nbrvar -o $(BIN)/ts_nbrvar - -ts_hessian: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hessian -o $(BIN)/ts_hessian - -# Test programs for Math_Lib/Functions : - -ts_evaline: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evaline.adb -o $(BIN)/ts_evaline - -ts_evalpoly: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalpoly.adb \ - -o $(BIN)/ts_evalpoly - -ts_evalform: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalform.adb \ - -o $(BIN)/ts_evalform - -ts_lineva: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lineva.adb -o $(BIN)/ts_lineva - -ts_polyflat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polyflat.adb \ - -o $(BIN)/ts_polyflat - -ts_perfeval: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfeval.adb \ - -o $(BIN)/ts_perfeval - -ts_expvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_expvec.adb -o $(BIN)/ts_expvec - -ts_evddpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evddpol.adb -o $(BIN)/ts_evddpol - -# Test programs for Math_Lib/Circuits : - -ts_cffsup: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cffsup.adb -o $(BIN)/ts_cffsup - -ts_speel: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speel.adb -o $(BIN)/ts_speel - -ts_speelsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelsys.adb \ - -o $(BIN)/ts_speelsys - -ts_cycfun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cycfun.adb -o $(BIN)/ts_cycfun - -ts_vmpeval: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpeval.adb \ - -o $(BIN)/ts_vmpeval - -ts_vmpdiff: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpdiff.adb \ - -o $(BIN)/ts_vmpdiff - -ts_gradcirc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_gradcirc.adb \ - -o $(BIN)/ts_gradcirc - -ts_speelser: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelser.adb \ - -o $(BIN)/ts_speelser - -ts_speelcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelcnv.adb \ - -o $(BIN)/ts_speelcnv - -ts_fabry: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fabry.adb -o $(BIN)/ts_fabry - -ts_evalcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalcnv.adb -o $(BIN)/ts_evalcnv - -ts_hesscnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesscnv.adb -o $(BIN)/ts_hesscnv - -ts_jacocnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jacocnv.adb -o $(BIN)/ts_jacocnv - -ts_shiftcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_shiftcnv.adb \ - -o $(BIN)/ts_shiftcnv - -ts_perfconv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfconv.adb \ - -o $(BIN)/ts_perfconv - -ts_perfcirc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfcirc.adb \ - -ts_perfade: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfade.adb \ - -o $(BIN)/ts_perfade - -ts_perfhess: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfhess.adb \ - -o $(BIN)/ts_perfhess - -# Test programs for Math_Lib/Supports : - -ts_basex: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_basex.adb -o $(BIN)/ts_basex - -ts_feasi: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_feasi.adb -o $(BIN)/ts_feasi - -ts_enurs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_enurs.adb -o $(BIN)/ts_enurs - -ts_diclp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_diclp.adb -o $(BIN)/ts_diclp - -ts_givrot: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_givrot.adb -o $(BIN)/ts_givrot - -ts_lstvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lstvec.adb -o $(BIN)/ts_lstvec - -ts_fvector: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fvector.adb -o $(BIN)/ts_fvector - -ts_giftwrap: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_giftwrap.adb \ - -o $(BIN)/ts_giftwrap - -# Test programs for the Math_Lib/Series library : - -ts_pstrunc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pstrunc.adb -o $(BIN)/ts_pstrunc - -ts_series: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_series.adb -o $(BIN)/ts_series - -ts_series2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_series2.adb -o $(BIN)/ts_series2 - -ts_cseries: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cseries.adb -o $(BIN)/ts_cseries - -ts_bincff: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_bincff.adb -o $(BIN)/ts_bincff - -ts_servec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_servec.adb -o $(BIN)/ts_servec - -ts_servec2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_servec2.adb -o $(BIN)/ts_servec2 - -ts_cservec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cservec.adb -o $(BIN)/ts_cservec - -ts_sermat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sermat.adb -o $(BIN)/ts_sermat - -ts_sermat2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sermat2.adb -o $(BIN)/ts_sermat2 - -ts_csermat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csermat.adb -o $(BIN)/ts_csermat - -ts_seritp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_seritp.adb -o $(BIN)/ts_seritp - -ts_seritp2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_seritp2.adb -o $(BIN)/ts_seritp2 - -ts_cseritp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cseritp.adb -o $(BIN)/ts_cseritp - -ts_sersin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersin.adb -o $(BIN)/ts_sersin - -ts_sersin2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersin2.adb -o $(BIN)/ts_sersin2 - -ts_csersin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csersin.adb -o $(BIN)/ts_csersin - -ts_serlin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serlin.adb -o $(BIN)/ts_serlin - -ts_serlin2: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serlin2.adb -o $(BIN)/ts_serlin2 - -ts_cserlin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserlin.adb -o $(BIN)/ts_cserlin - -ts_perfserlin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfserlin.adb \ - -o $(BIN)/ts_perfserlin - -ts_serinv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serinv.adb -o $(BIN)/ts_serinv - -ts_cserinv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserinv.adb -o $(BIN)/ts_cserinv - -ts_serpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpol.adb -o $(BIN)/ts_serpol - -ts_cserpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserpol.adb -o $(BIN)/ts_cserpol - -ts_sersys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersys.adb -o $(BIN)/ts_sersys - -ts_csersys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csersys.adb -o $(BIN)/ts_csersys - -ts_sercffpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sercffpol.adb \ - -o $(BIN)/ts_sercffpol - -# Test programs for the Math_Lib/AD library : - -ts_monom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monom.adb -o $(BIN)/ts_monom - -ts_monvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monvec.adb -o $(BIN)/ts_monvec - -ts_polvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polvec.adb -o $(BIN)/ts_polvec - -ts_sys2vec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sys2vec.adb -o $(BIN)/ts_sys2vec - -# Test programs for the Deformations/Solutions library : - -ts_solfilt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solfilt.adb -o $(BIN)/ts_solfilt - -ts_sols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sols.adb -o $(BIN)/ts_sols - -ts_ddsols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddsols.adb -o $(BIN)/ts_ddsols - -ts_qdsols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdsols.adb -o $(BIN)/ts_qdsols - -ts_solar: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solar.adb -o $(BIN)/ts_solar - -ts_dicsols_io: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dicsols_io.adb \ - -o $(BIN)/ts_dicsols_io - -ts_mapsols_io: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mapsols_io.adb \ - -o $(BIN)/ts_mapsols_io - -ts_grepsols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_grepsols.adb \ - -o $(BIN)/ts_grepsols - -ts_selsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_selsol.adb -o $(BIN)/ts_selsol - -ts_solstr: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solstr.adb -o $(BIN)/ts_solstr - -ts_quad: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_quad.adb -o $(BIN)/ts_quad - -ts_quadpart: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_quadpart.adb \ - -o $(BIN)/ts_quadpart - -ts_contab: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_contab.adb -o $(BIN)/ts_contab - -ts_soldrop: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_soldrop.adb -o $(BIN)/ts_soldrop - -ts_ptlists: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ptlists.adb -o $(BIN)/ts_ptlists - -ts_trasols_io: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_trasols_io.adb \ - -o $(BIN)/ts_trasols_io - -ts_mixres: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixres.adb -o $(BIN)/ts_mixres - -ts_getstart: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_getstart.adb \ - -o $(BIN)/ts_getstart - -# Test programs for the Deformations/Homotopy library : - -ts_mainscal: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainscal.adb \ - -o $(BIN)/ts_mainscal - -ts_scal: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scal.adb -o $(BIN)/ts_scal - -ts_reduce: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_reduce.adb \ - -o $(BIN)/ts_reduce - -ts_homotopy: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homotopy.adb \ - -o $(BIN)/ts_homotopy - -ts_homline: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homline.adb -o $(BIN)/ts_homline - -ts_linsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_linsol.adb -o $(BIN)/ts_linsol - -ts_qdhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdhom.adb -o $(BIN)/ts_qdhom - -ts_poldrop: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poldrop.adb -o $(BIN)/ts_poldrop - -ts_evalhomt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalhomt.adb \ - -o $(BIN)/ts_evalhomt - -ts_vmphom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmphom.adb -o $(BIN)/ts_vmphom - -ts_scalplane: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scalplane.adb \ - -o $(BIN)/ts_scalplane - -ts_multproj: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_multproj.adb \ - -o $(BIN)/ts_multproj - -ts_homcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homcnv.adb \ - -o $(BIN)/ts_homcnv - -# Test programs for the Deformations/Newton library : - -ts_mreseva: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mreseva.adb -o $(BIN)/ts_mreseva - -ts_rootrefi: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rootrefi.adb \ - -o $(BIN)/ts_rootrefi - -ts_newton: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newton.adb -o $(BIN)/ts_newton - -ts_realnewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_realnewt.adb \ - -o $(BIN)/ts_realnewt - -ts_numdif: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_numdif.adb -o $(BIN)/ts_numdif - -ts_jactrees: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jactrees.adb \ - -o $(BIN)/ts_jactrees - -ts_deftrees: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deftrees.adb \ - -o $(BIN)/ts_deftrees - -ts_deflate: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deflate.adb -o $(BIN)/ts_deflate - -ts_straight: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_straight.adb \ - -o $(BIN)/ts_straight - -ts_stair: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stair.adb -o $(BIN)/ts_stair - -ts_defmat: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_defmat.adb -o $(BIN)/ts_defmat - -ts_multip: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_multip.adb -o $(BIN)/ts_multip - -ts_muldef: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_muldef.adb -o $(BIN)/ts_muldef - -ts_deflop: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deflop.adb -o $(BIN)/ts_deflop - -ts_ddnewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddnewt.adb -o $(BIN)/ts_ddnewt - -ts_qdnewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdnewt.adb -o $(BIN)/ts_qdnewt - -ts_vmpnewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpnewt.adb \ - -o $(BIN)/ts_vmpnewt - -ts_newcirc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newcirc.adb \ - -o $(BIN)/ts_newcirc - -# Test programs for the Deformations/Curves library : - -ts_durker: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_durker.adb -o $(BIN)/ts_durker - -ts_extrapol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extrapol.adb \ - -o $(BIN)/ts_extrapol - -ts_extrapts: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extrapts.adb \ - -o $(BIN)/ts_extrapts - -ts_sernew: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sernew.adb \ - -o $(BIN)/ts_sernew - -ts_sersol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersol.adb \ - -o $(BIN)/ts_sersol - -ts_serhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serhom.adb \ - -o $(BIN)/ts_serhom - -ts_serpred: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpred.adb \ - -o $(BIN)/ts_serpred - -ts_serpath: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpath.adb \ - -o $(BIN)/ts_serpath - -ts_serpade: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpade.adb \ - -o $(BIN)/ts_serpade - -ts_padepred: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_padepred.adb \ - -o $(BIN)/ts_padepred - -ts_padepcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_padepcnv.adb \ - -o $(BIN)/ts_padepcnv - -ts_jacrabin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jacrabin.adb \ - -o $(BIN)/ts_jacrabin - -ts_nxtpadsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nxtpadsol.adb \ - -o $(BIN)/ts_nxtpadsol - -ts_hesscrit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesscrit.adb \ - -o $(BIN)/ts_hesscrit - -ts_hesspred: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesspred.adb \ - -o $(BIN)/ts_hesspred - -ts_hesspcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesspcnv.adb \ - -o $(BIN)/ts_hesspcnv - -ts_predstep: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_predstep.adb \ - -o $(BIN)/ts_predstep - -ts_sernewcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sernewcnv.adb \ - -o $(BIN)/ts_sernewcnv - -ts_ratapp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ratapp.adb \ - -o $(BIN)/ts_ratapp - -ts_corcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_corcnv.adb \ - -o $(BIN)/ts_corcnv - -ts_pcscnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pcscnv.adb \ - -o $(BIN)/ts_pcscnv - -ts_scalecnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scalecnv.adb \ - -o $(BIN)/ts_scalecnv - -ts_wrappade: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_wrappade.adb \ - -o $(BIN)/ts_wrappade - -ts_fabryhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fabryhom.adb \ - -o $(BIN)/ts_fabryhom - -# Test programs for the Deformations/End_Games library : - -ts_vlprs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vlprs.adb -o $(BIN)/ts_vlprs - -postpoco: - gnatmake $(INCLULIBS) $(GNATFLAGS) postpoco.adb -o $(BIN)/postpoco - -valipoco: - gnatmake $(INCLULIBS) $(GNATFLAGS) valipoco.adb -o $(BIN)/valipoco - -# Test programs for the Deformations/Sweep library : - -ts_parcon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_parcon.adb -o $(BIN)/ts_parcon - -ts_realcont: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_realcont.adb \ - -o $(BIN)/ts_realcont - -# Test programs for the Deformations/Trackers library : - -ts_preco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_preco.adb -o $(BIN)/ts_preco - -ts_correct: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_correct.adb \ - -o $(BIN)/ts_correct - -ts_ortocor: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ortocor.adb \ - -o $(BIN)/ts_ortocor - -ts_path: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_path.adb -o $(BIN)/ts_path - -ts_track: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_track.adb -o $(BIN)/ts_track - -ts_nxtsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nxtsol.adb -o $(BIN)/ts_nxtsol - -# Test programs for the Deformations/Continuation library : - -ts_pactun: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pactun.adb -o $(BIN)/ts_pactun - -ts_autotune: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_autotune.adb \ - -o $(BIN)/ts_autotune - -ts_poco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poco.adb -o $(BIN)/ts_poco - -ts_bbpoco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_bbpoco.adb \ - -o $(BIN)/ts_bbpoco - -ts_exp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_exp.adb -o $(BIN)/ts_exp - -mypoco: - gnatmake $(INCLULIBS) $(GNATFLAGS) mypoco.adb -o $(BIN)/mypoco - -# Test programs for the Root_Counts/Product homotopies library : - -ts_startsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_startsys.adb \ - -o $(BIN)/ts_startsys - -ts_permanent: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_permanent.adb \ - -o $(BIN)/ts_permanent - -ts_prodsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_prodsys.adb -o $(BIN)/ts_prodsys - -ts_mainmhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainmhom.adb \ - -o $(BIN)/ts_mainmhom - -ts_mainmuho: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainmuho.adb \ - -o $(BIN)/ts_mainmuho - -ts_mainsets: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainsets.adb \ - -o $(BIN)/ts_mainsets - -ts_strset: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strset.adb -o $(BIN)/ts_strset - -ts_strpart: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strpart.adb -o $(BIN)/ts_strpart - -ts_permstar: - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_permstar.adb \ - -o $(BIN)/ts_permstar - -ts_pivsel: - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_pivsel.adb \ - -o $(BIN)/ts_pivsel - -# Test programs in the Root_Counts/Binomials library : - -ts_binsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binsys.adb -o $(BIN)/ts_binsys - -ts_kernel: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_kernel.adb -o $(BIN)/ts_kernel - -ts_binset: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binset.adb -o $(BIN)/ts_binset - -ts_incols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_incols.adb -o $(BIN)/ts_incols - -ts_monmap: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monmap.adb -o $(BIN)/ts_monmap - -ts_binsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binsol.adb -o $(BIN)/ts_binsol - -ts_affpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_affpol.adb -o $(BIN)/ts_affpol - -ts_simsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_simsys.adb -o $(BIN)/ts_simsys - -ts_simposol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_simposol.adb \ - -o $(BIN)/ts_simposol - -ts_powtrans: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_powtrans.adb \ - -o $(BIN)/ts_powtrans - -ts_binpser: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binpser.adb \ - -o $(BIN)/ts_binpser - -ts_cspsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cspsol.adb -o $(BIN)/ts_cspsol - -ts_unimod: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unimod.adb -o $(BIN)/ts_unimod - -ts_mapsubs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mapsubs.adb -o $(BIN)/ts_mapsubs - -# Test programs for the Root_Counts/Implift library : - -ts_supports: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supports.adb \ - -o $(BIN)/ts_supports - -ts_supspan: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supspan.adb \ - -o $(BIN)/ts_supspan - -ts_transfo: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_transfo.adb \ - -o $(BIN)/ts_transfo - -ts_tropelim: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropelim.adb \ - -o $(BIN)/ts_tropelim - -ts_mainvpts: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainvpts.adb \ - -o $(BIN)/ts_mainvpts - -ts_impvol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_impvol.adb -o $(BIN)/ts_impvol - -ts_drivimpl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivimpl.adb \ - -o $(BIN)/ts_drivimpl - -# Test programs for the Root_Counts/Stalift library : - -ts_rndcff: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rndcff.adb -o $(BIN)/ts_rndcff - -ts_supsub: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supsub.adb -o $(BIN)/ts_supsub - -ts_conint: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_conint.adb -o $(BIN)/ts_conint - -ts_mixture: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixture.adb -o $(BIN)/ts_mixture - -ts_mixvol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixvol.adb -o $(BIN)/ts_mixvol - -ts_mixlab: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixlab.adb -o $(BIN)/ts_mixlab - -ts_jpmix: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jpmix.adb -o $(BIN)/ts_jpmix - -ts_drivcrit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivcrit.adb \ - -o $(BIN)/ts_drivcrit - -ts_drivstal: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivstal.adb \ - -o $(BIN)/ts_drivstal - -ts_mvasta: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mvasta.adb -o $(BIN)/ts_mvasta - -ts_exptrack: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_exptrack.adb \ - -o $(BIN)/ts_exptrack - -ts_stable: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stable.adb -o $(BIN)/ts_stable - -ts_balance: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_balance.adb \ - -o $(BIN)/ts_balance - -ts_userlift: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_userlift.adb \ - -o $(BIN)/ts_userlift - -ts_demics: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_demics.adb - gnatbind ts_demics use_c2phc - gnatlink ts_demics inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_demics --LINK=$(gpp) - -# Test programs for the Root_Counts/Dynlift library : - -ts_dyntri: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dyntri.adb -o $(BIN)/ts_dyntri - -ts_drivmink: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivmink.adb \ - -o $(BIN)/ts_drivmink - -ts_drivdynl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivdynl.adb \ - -o $(BIN)/ts_drivdynl - -# Test programs for the Root_Counts/Symmetry library : - -ts_group: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_group.adb -o $(BIN)/ts_group - -ts_equpol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_equpol.adb -o $(BIN)/ts_equpol - -ts_drivsss: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivsss.adb -o $(BIN)/ts_drivsss - -# Test programs for the Root_Counts/MixedVol library : - -convsub: - gnatmake $(INCLULIBS) $(GNATFLAGS) convsub.adb -o $(BIN)/convsub - -ts_mv2c: - gcc -c $(PHCAda)/Root_Counts/MixedVol/mv.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/cell_stack.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/form_lp.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/index_tree_lp.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/zero_index_tree.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/one_level_lp.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/mixed_volume.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/relation_table.c - gcc -c $(PHCAda)/Root_Counts/MixedVol/prepare_for_mv.c - gnatmake -o $(BIN)/ts_mv2c $(INCLULIBS) $(GNATOPTFLAGS) ts_mv2c.adb \ - -largs mv.o cell_stack.o form_lp.o index_tree_lp.o \ - zero_index_tree.o one_level_lp.o mixed_volume.o \ - relation_table.o prepare_for_mv.o -lm - -ts_mv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mv.adb -o $(BIN)/ts_mv - -ts_mva: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mva.adb -o $(BIN)/ts_mva - -# Test programs for the Root_Counts/DEMiCs library : - -ts_calldemics: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_calldemics.adb \ - -o $(BIN)/ts_calldemics - -DEMiCs_CFLAGS = -O3 -DNDEBUG - -inputData.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp - -iTest.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp - -fTest.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp - -simplex.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp - -reltab.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp - -mvc.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp - -main.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/main.cpp - -demics_objects = inputData.o iTest.o fTest.o simplex.o reltab.o mvc.o main.o - -demics: $(demics_objects) - $(gpp) -o $(BIN)/demics $(DEMiCs_CFLAGS) $(demics_objects) -lm - -ts_inputData: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp - $(gpp) $(DEMiCs_CFLAGS) -c \ - $(PHCAda)/Root_Counts/DEMiCs/ts_inputData.cpp - $(gpp) -o $(BIN)/ts_inputData $(DEMiCs_CFLAGS) ts_inputData.o \ - inputData.o -lm - -ts_outdata: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_outdata.adb \ - -o $(BIN)/ts_outdata - -ts_outputData: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - $(gpp) -O2 -Dcompilewgpp=1 \ - -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp - $(gpp) -O2 -Dcompilewgpp=1 \ - -c $(PHCAda)/Root_Counts/DEMiCs/ts_outputData.cpp - gnatbind -n use_c2phc - gnatlink -C use_c2phc ts_outputData.o outputData.o \ - -o $(BIN)/ts_outputData -lm --LINK=$(gpp) - -outputData.o: - $(gpp) -O2 -Dcompilewgpp=1 \ - -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp - -simplex4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o - -mvc4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o - -demicsrun4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o - -demicsrun.o: - $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp - -ts_demicsrun: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_demicsrun.adb \ - -o ts_demicsrun.o - gnatbind ts_demicsrun use_c2phc - gnatlink ts_demicsrun inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_demicsrun --LINK=$(gpp) - -# Test programs for the Root_Counts/Puiseux library : - -ts_degcurve: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_degcurve.adb \ - -o $(BIN)/ts_degcurve - -ts_puiseux: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_puiseux.adb \ - -o $(BIN)/ts_puiseux - -# Test programs for SAGBI library in numerical Schubert calculus : - -ts_subsets: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_subsets.adb -o $(BIN)/ts_subsets - -ts_brackets: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackets.adb \ - -o $(BIN)/ts_brackets - -ts_brackmons: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackmons.adb \ - -o $(BIN)/ts_brackmons - -ts_brackpols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackpols.adb \ - -o $(BIN)/ts_brackpols - -ts_straighten: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_straighten.adb \ - -o $(BIN)/ts_straighten - -ts_expand: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_expand.adb -o $(BIN)/ts_expand - -ts_local: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_local.adb -o $(BIN)/ts_local - -ts_mathom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mathom.adb -o $(BIN)/ts_mathom - -ts_cheby: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cheby.adb -o $(BIN)/ts_cheby - -ts_shapiro: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_shapiro.adb \ - -o $(BIN)/ts_shapiro - -ts_eremenko: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_eremenko.adb \ - -o $(BIN)/ts_eremenko - -ts_detrock: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_detrock.adb -o $(BIN)/ts_detrock - -ts_sagbi: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sagbi.adb -o $(BIN)/ts_sagbi - -ts_topos: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_topos.adb -o $(BIN)/ts_topos - -# Test programs for Pieri library in numerical Schubert calculus : - -ts_org_pieri: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_org_pieri.adb \ - -o $(BIN)/ts_org_pieri - -ts_canocurv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_canocurv.adb \ - -o $(BIN)/ts_canocurv - -ts_matinv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_matinv.adb -o $(BIN)/ts_matinv - -ts_pieri: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pieri.adb -o $(BIN)/ts_pieri - -ts_posets: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_posets.adb -o $(BIN)/ts_posets - -ts_detsys: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_detsys.adb -o $(BIN)/ts_detsys - -ts_defpos: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_defpos.adb -o $(BIN)/ts_defpos - -ts_piroco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_piroco.adb -o $(BIN)/ts_piroco - -# Test programs for Induction library in numerical Schubert calculus : - -ts_checkers: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_checkers.adb \ - -o $(BIN)/ts_checkers - -ts_induce: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_induce.adb -o $(BIN)/ts_induce - -ts_flagcond: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_flagcond.adb \ - -o $(BIN)/ts_flagcond - -ts_lrhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lrhom.adb -o $(BIN)/ts_lrhom - -# Test programs for the evaluators : - -ts_cyclic7: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_cyclic7.adb - gnatbl -o $(BIN)/ts_cyclic7 ts_cyclic7.ali - -solve_cyclic7: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) solve_cyclic7.adb - gnatbl -o $(BIN)/solve_cyclic7 solve_cyclic7.ali - -# Test programs for the Components/Samplers library : - -ts_roots: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_roots.adb -o $(BIN)/ts_roots - -ts_hypsam: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypsam.adb -o $(BIN)/ts_hypsam - -ts_hyprts: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hyprts.adb -o $(BIN)/ts_hyprts - -ts_hyppts: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hyppts.adb -o $(BIN)/ts_hyppts - -ts_unisam: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unisam.adb -o $(BIN)/ts_unisam - -ts_planes: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_planes.adb -o $(BIN)/ts_planes - -ts_flag: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_flag.adb -o $(BIN)/ts_flag - -ts_coords: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_coords.adb -o $(BIN)/ts_coords - -ts_itrack: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_itrack.adb -o $(BIN)/ts_itrack - -ts_ispan: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ispan.adb -o $(BIN)/ts_ispan - -ts_inewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_inewt.adb -o $(BIN)/ts_inewt - -ts_iddnewt: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_iddnewt.adb \ - -o $(BIN)/ts_iddnewt - -ts_iwset: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_iwset.adb -o $(BIN)/ts_iwset - -ts_ilocal: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ilocal.adb -o $(BIN)/ts_ilocal - -ts_sampar: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sampar.adb -o $(BIN)/ts_sampar - -ts_sample: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sample.adb -o $(BIN)/ts_sample - -ts_mulsam: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mulsam.adb -o $(BIN)/ts_mulsam - -ts_mulhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mulhom.adb -o $(BIN)/ts_mulhom - -ts_endgm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_endgm.adb -o $(BIN)/ts_endgm - -ts_locdim: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_locdim.adb -o $(BIN)/ts_locdim - -ts_ddqdsam: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddqdsam.adb -o $(BIN)/ts_ddqdsam - -# Test programs for the Components/Interpolators libary : - -ts_stpolin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stpolin.adb \ - -o $(BIN)/ts_stpolin - -ts_mupolin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mupolin.adb \ - -o $(BIN)/ts_mupolin - -ts_adpolin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_adpolin.adb \ - -o $(BIN)/ts_adpolin - -ts_project: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_project.adb -o $(BIN)/ts_project - -ts_span: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_span.adb -o $(BIN)/ts_span - -ts_filter: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filter.adb -o $(BIN)/ts_filter - -ts_nbterms: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nbterms.adb -o $(BIN)/ts_nbterms - -ts_divdif: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_divdif.adb -o $(BIN)/ts_divdif - -ts_dvdexp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dvdexp.adb -o $(BIN)/ts_dvdexp - -ts_newint: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newint.adb -o $(BIN)/ts_newint - -ts_powtrc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_powtrc.adb -o $(BIN)/ts_powtrc - -ts_traces: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_traces.adb -o $(BIN)/ts_traces - -ts_trapol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_trapol.adb -o $(BIN)/ts_trapol - -ts_rewrite: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rewrite.adb -o $(BIN)/ts_rewrite - -ts_elim: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_elim.adb -o $(BIN)/ts_elim - -ts_embed: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_embed.adb -o $(BIN)/ts_embed - -ts_square: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_square.adb -o $(BIN)/ts_square - -ts_squemb: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_squemb.adb -o $(BIN)/ts_squemb - -# Test programs in the Components/Factorization library : - -ts_rwpoly: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rwpoly.adb -o $(BIN)/ts_rwpoly - -ts_irco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_irco.adb -o $(BIN)/ts_irco - -ts_combfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_combfac.adb -o $(BIN)/ts_combfac - -ts_newfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newfac.adb -o $(BIN)/ts_newfac - -ts_factor: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_factor.adb -o $(BIN)/ts_factor - -ts_ifactor: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ifactor.adb -o $(BIN)/ts_ifactor - -ts_hypfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypfac.adb -o $(BIN)/ts_hypfac - -ts_monfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monfac.adb -o $(BIN)/ts_monfac - -ts_serwit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serwit.adb -o $(BIN)/ts_serwit - -# Test programs in the Components/Decomposition library : - -ts_irdeco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_irdeco.adb -o $(BIN)/ts_irdeco - -ts_breakup: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_breakup.adb -o $(BIN)/ts_breakup - -ts_cascade: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cascade.adb -o $(BIN)/ts_cascade - -ts_intcas: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intcas.adb -o $(BIN)/ts_intcas - -ts_intdia: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intdia.adb -o $(BIN)/ts_intdia - -ts_reorder: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_reorder.adb -o $(BIN)/ts_reorder - -ts_filfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filfac.adb -o $(BIN)/ts_filfac - -ts_squeeze: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_squeeze.adb -o $(BIN)/ts_squeeze - -ts_dimred: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dimred.adb -o $(BIN)/ts_dimred - -ts_mbthom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mbthom.adb -o $(BIN)/ts_mbthom - -ts_diahom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_diahom.adb -o $(BIN)/ts_diahom - -ts_fillit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fillit.adb -o $(BIN)/ts_fillit - -ts_jmpdia: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jmpdia.adb -o $(BIN)/ts_jmpdia - -ts_witsols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_witsols.adb -o $(BIN)/ts_witsols - -# Test programs in the Components/Solver library : - -ts_hypwit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypwit.adb \ - -o $(BIN)/ts_hypwit - -ts_solver: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solver.adb \ - -o $(BIN)/ts_solver - -ts_rdisol: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_rdisol.adb \ - -o $(BIN)/ts_rdisol - -testnine: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) testnine.adb - gnatbl -o $(BIN)/testnine testnine.ali - -# Test programs in the Components/Tropical library : - -ts_tropawit: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropawit.adb \ - -o $(BIN)/ts_tropawit - -ts_tropisms: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropisms.adb \ - -o $(BIN)/ts_tropisms - -ts_inform: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_inform.adb -o $(BIN)/ts_inform - -ts_comfac: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_comfac.adb -o $(BIN)/ts_comfac - -ts_intorto: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intorto.adb \ - -o $(BIN)/ts_intorto - -ts_convhull: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_convhull.adb \ - -o $(BIN)/ts_convhull - -ts_ptlstr: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ptlstr.adb \ - -o $(BIN)/ts_ptlstr - -ts_pretrop: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pretrop.adb \ - -o $(BIN)/ts_pretrop - -# test programs for CtoPHC/Funky directory : - -ts_arrays: - gnatmake -o $(BIN)/ts_arrays $(INCLULIBS) $(GNATFLAGS) ts_arrays.adb - -pass_poly: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) print_poly.adb - gcc -c $(PHCAda)/CtoPHC/Funky/pass_poly.c - gnatbind -n print_poly - gnatlink -C print_poly pass_poly.o -o $(BIN)/pass_poly - -ts_cosup: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cosup.adb -o $(BIN)/ts_cosup - -ts_cosupoly: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) cosupoly.adb - gcc -c $(PHCAda)/CtoPHC/Funky/ts_cosupoly.c - gnatbind -n cosupoly - gnatlink -C cosupoly ts_cosupoly.o -o $(BIN)/ts_cosupoly - -ts_cosupsys: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) cosupsys.adb - gcc -c $(PHCAda)/CtoPHC/Funky/ts_cosupsys.c - gnatbind -n cosupsys - gnatlink -C cosupsys ts_cosupsys.o -o $(BIN)/ts_cosupsys - -cosupoly_to_c.o: - gcc -c $(PHCAda)/CtoPHC/Funky/cosupoly_to_c.c - -cosupsys_to_c.o: - gcc -c $(PHCAda)/CtoPHC/Funky/cosupsys_to_c.c - -ts_cosuptoc: cosupoly_to_c.o cosupsys_to_c.o - gnatmake -o $(BIN)/ts_cosuptoc $(INCLULIBS) $(GNATFLAGS) \ - ts_cosuptoc.adb -largs cosupoly_to_c.o cosupsys_to_c.o - -ts_getsys: - gcc -c $(PHCAda)/CtoPHC/Funky/getsys2.c - gcc -c $(PHCAda)/CtoPHC/Funky/ts_getsys.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) getsys1.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) getsys3.adb - gnatbind -n getsys1 getsys3 - gnatlink -C getsys3 ts_getsys.o getsys2.o -o $(BIN)/ts_getsys - -ts_phc_sys_rw: - gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_sys_rw.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_sys_rw.adb - gnatbind -n phc_sys_rw - gnatlink -C phc_sys_rw ts_phc_sys_rw.o -o $(BIN)/ts_phc_sys_rw - -ts_phc_sol_rw: - gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_sol_rw.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_sol_rw.adb - gnatbind -n phc_sol_rw - gnatlink -C phc_sol_rw ts_phc_sol_rw.o -o $(BIN)/ts_phc_sol_rw - -ts_cpm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpm.adb -o $(BIN)/ts_cpm - -ts_pieri_count: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_count.adb - gcc -c $(PHCAda)/CtoPHC/Funky/ts_pieri_count.c - gnatbind -n pieri_count - gnatlink -C pieri_count ts_pieri_count.o -o $(BIN)/ts_pieri_count - -ts_pieri_solver: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gcc -c $(PHCAda)/CtoPHC/Funky/ts_pieri_solver.c - gcc -c $(PHCAda)/CtoPHC/Funky/pieri_sols.c - gnatbind -n pieri_solver - gnatlink -C pieri_solver ts_pieri_solver.o pieri_sols.o \ - -o $(BIN)/ts_pieri_solver -lm - -ts_phc_solver: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_solver.adb - gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_solver.c - gcc -c $(PHCAda)/CtoPHC/Funky/phc_sols.c - gnatbind -n phc_solver - gnatlink -C phc_solver ts_phc_solver.o phc_sols.o \ - -o $(BIN)/ts_phc_solver - -ts_csols: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_csols.adb -o $(BIN)/ts_csols - -# test programs for the CtoPHC/State directory : - -ts_filman: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filman.adb -o $(BIN)/ts_filman - -ts_solcon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solcon.adb -o $(BIN)/ts_solcon - -ts_solpool: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solpool.adb -o $(BIN)/ts_solpool - -ts_use_solcon: - gcc -c $(PHCAda)/CtoPHC/State/ts_use_solcon.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solcon.adb - gnatbind -n use_solcon - gnatlink -C use_solcon ts_use_solcon.o -o $(BIN)/ts_use_solcon - -ts_use_solpool: - gcc -c $(PHCAda)/CtoPHC/State/ts_use_solpool.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solpool.adb - gnatbind -n use_solpool - gnatlink -C use_solpool ts_use_solpool.o -o $(BIN)/ts_use_solpool - -ts_syscon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syscon.adb -o $(BIN)/ts_syscon - -ts_syspool: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syspool.adb -o $(BIN)/ts_syspool - -ts_use_syscon: - gcc -c $(PHCAda)/CtoPHC/State/ts_use_syscon.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syscon.adb - gnatbind -n use_syscon - gnatlink -C use_syscon ts_use_syscon.o -o $(BIN)/ts_use_syscon - -ts_use_syspool: - gcc -c $(PHCAda)/CtoPHC/State/ts_use_syspool.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syspool.adb - gnatbind -n use_syspool - gnatlink -C use_syspool ts_use_syspool.o -o $(BIN)/ts_use_syspool - -ts_c2phc: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) c_to_phcpack.adb - gcc -c $(PHCAda)/CtoPHC/State/ts_c2phc.c - gnatbind -n c_to_phcpack - gnatlink -C c_to_phcpack ts_c2phc.o -o $(BIN)/ts_c2phc - -ts_c2str: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCAda)/CtoPHC/State/ts_c2str.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc ts_c2str.o \ - inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_c2str --LINK=$(gpp) - -ts_use_c2phc: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2phc.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc ts_use_c2phc.o \ - inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_use_c2phc --LINK=$(gpp) - -ts_pirhom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pirhom.adb -o $(BIN)/ts_pirhom - -ts_use_c2pieri: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb - gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2pieri.c - gnatbind -n use_c2pieri - gnatlink -C use_c2pieri ts_use_c2pieri.o -o $(BIN)/ts_use_c2pieri - -ts_use_c2fac: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2fac.adb - gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2fac.c - gnatbind -n use_c2fac - gnatlink -C use_c2fac ts_use_c2fac.o -o $(BIN)/ts_use_c2fac - -ts_celcon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_celcon.adb -o $(BIN)/ts_celcon - -ts_use_celcon: - gcc -c $(PHCAda)/CtoPHC/State/ts_use_celcon.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_celcon.adb - gnatbind -n use_celcon - gnatlink -C use_celcon ts_use_celcon.o -o $(BIN)/ts_use_celcon - -ts_unisolve: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unisolve.adb \ - -o $(BIN)/ts_unisolve - -ts_use_giftwrap: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_use_giftwrap.adb \ - -o $(BIN)/ts_use_giftwrap - -ts_giftwcon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_giftwcon.adb \ - -o $(BIN)/ts_giftwcon - -ts_use_sweep: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_use_sweep.adb \ - -o $(BIN)/ts_use_sweep - -ts_runtrack: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_runtrack.adb \ - -o $(BIN)/ts_runtrack - -# files in feedback : - -lib.a:$(PHCAda)/../Feedback/*.c $(PHCAda)/../Feedback/*.h - gcc -c $(PHCAda)/../Feedback/*.c - ar ruv lib.a dc_interpolation.o dcmplx.o poly_matrix.o\ - append_dcmatrix.o dc_inverse.o pieri_sols.o poly_smith.o\ - c2ada_dc_matrix.o dc_matrix.o poly_dcmplx.o realization.o\ - c2ada_poly_matrix.o dc_roots.o poly_gcd.o ts_feedback.o\ - poly_hermite.o append_polymatrix.o timer.o - ranlib lib.a - -ts_feedback: lib.a get_clock.o get_clocks_per_sec.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gnatbind -n pieri_solver - gnatlink -C pieri_solver lib.a \ - -o $(BIN)/ts_feedback -lm \ - get_clock.o get_clocks_per_sec.o - -feedback.o: - gcc -c $(PHCAda)/../Feedback/feedback.c - -# Test program to test the C interface to GPU acceleration : - -ts_cpu2norm_d: - gcc -c $(PHCAda)/PHCtoC/cpu2norm_d_in_c.c -o cpu2norm_d_in_c.o - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_d.adb \ - -o $(BIN)/ts_cpu2norm_d -largs cpu2norm_d_in_c.o -lm - -ts_cpu2norm_dd: - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/PHCtoC/cpu2norm_dd_in_c.c \ - -o cpu2norm_dd_in_c.o - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_dd.adb \ - -o $(BIN)/ts_cpu2norm_dd \ - -largs double_double.o cpu2norm_dd_in_c.o -lm - -ts_cpu2norm_qd: - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/PHCtoC/cpu2norm_qd_in_c.c \ - -o cpu2norm_qd_in_c.o - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_qd.adb \ - -o $(BIN)/ts_cpu2norm_qd \ - -largs double_double.o quad_double.o cpu2norm_qd_in_c.o -lm - -ts_cpu2norm: - gcc -c $(PHCAda)/PHCtoC/cpu2norm_d_in_c.c -o cpu2norm_d_in_c.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/PHCtoC/cpu2norm_dd_in_c.c \ - -o cpu2norm_dd_in_c.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/PHCtoC/cpu2norm_qd_in_c.c \ - -o cpu2norm_qd_in_c.o - gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_cpu2norm.adb \ - -o $(BIN)/ts_cpu2norm -largs cpu2norm_d_in_c.o \ - double_double.o cpu2norm_dd_in_c.o \ - quad_double.o cpu2norm_qd_in_c.o -lm - -ts_gpu2norm_d_in_c: - @-echo ">>> compiling kernels ..." - nvcc --define-macro precision=d -I$(PHCgpu)/DefineTypesD \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ - -o norm_kernels.o - @-echo ">>> compiling code for execution on the host ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o - @-echo ">>> compiling the caller function ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o - @-echo ">>> compiling the main C program ..." - gcc -c $(PHCAda)/PHCtoC/ts_gpu2norm_d_in_c.c -o ts_gpu2norm_d_in_c.o - @-echo ">>> linking ..." - $(gpp) norm_host.o norm_kernels.o gpu2norm_d.o ts_gpu2norm_d_in_c.o \ - -o $(BIN)/ts_gpu2norm_d_in_c -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib - -ts_gpu2norm_d: - @-echo ">>> compiling kernels ..." - nvcc --define-macro precision=d -I$(PHCgpu)/DefineTypesD \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ - -o norm_kernels.o - @-echo ">>> compiling code for execution on the host ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o - @-echo ">>> compiling the caller function ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o - @-echo ">>> compiling and binding the main Ada program ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_d.adb \ - -o ts_gpu2norm_d.o - gnatbind ts_gpu2norm_d - @-echo ">>> linking ..." - gnatlink -o $(BIN)/ts_gpu2norm_d ts_gpu2norm_d \ - norm_host.o norm_kernels.o gpu2norm_d.o -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpu2norm_dd: - @-echo ">>> compiling kernels ..." - nvcc --define-macro precision=dd -I$(PHCgpu)/DefineTypesDD \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ - -o norm_kernels.o - @-echo ">>> compiling code for execution on the host ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o - @-echo ">>> compiling the caller function ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ - -I$(PHCAda)/Math_Lib/QD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_dd.cpp -o gpu2norm_dd.o - @-echo ">>> compiling main Ada program ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_dd.adb \ - -o ts_gpu2norm_dd.o - gnatbind ts_gpu2norm_dd - @-echo ">>> linking ..." - gnatlink -o $(BIN)/ts_gpu2norm_dd ts_gpu2norm_dd \ - norm_host.o norm_kernels.o gpu2norm_dd.o -lm \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -L$(PHCAda)/Math_Lib/QD --LINK=$(gpp) - -ts_gpu2norm_qd: - @-echo ">>> compiling kernels ..." - nvcc --define-macro precision=qd -I$(PHCgpu)/DefineTypesQD \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ - -o norm_kernels.o - @-echo ">>> compiling code for execution on the host ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o - @-echo ">>> compiling the caller function ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ - -I$(PHCAda)/Math_Lib/QD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_qd.cpp -o gpu2norm_qd.o - @-echo ">>> compiling main Ada program ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_qd.adb \ - -o ts_gpu2norm_qd.o - gnatbind ts_gpu2norm_qd - @-echo ">>> linking ..." - gnatlink -o $(BIN)/ts_gpu2norm_qd ts_gpu2norm_qd \ - norm_host.o norm_kernels.o gpu2norm_qd.o -lm \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -L$(PHCAda)/Math_Lib/QD --LINK=$(gpp) - -ts_gpu2norm: - @-echo ">>> compiling kernels for all precisions ..." - nvcc -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/all_norm_kernels.cu \ - -o all_norm_kernels.o - @-echo ">>> compiling host code in double precision ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_d.o - @-echo ">>> compiling host code in double double precision ..." - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_dd.o - @-echo ">>> compiling host code in quad double precision ..." - gcc -I $(PHCAda)/Math_Lib/QD \ - -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_qd.o - @-echo ">>> compiling the caller in double precision ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o - @-echo ">>> compiling the caller in double double precision ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ - -I$(PHCAda)/Math_Lib/QD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_dd.cpp -o gpu2norm_dd.o - @-echo ">>> compiling the caller in quad double precision ..." - $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ - -I$(PHCAda)/Math_Lib/QD \ - -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCAda)/PHCtoC/gpu2norm_qd.cpp -o gpu2norm_qd.o - @-echo ">>> compiling and binding the main Ada program ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm.adb \ - -o ts_gpu2norm.o - gnatbind ts_gpu2norm - @-echo ">>> linking ..." - gnatlink -o $(BIN)/ts_gpu2norm ts_gpu2norm \ - all_norm_kernels.o norm_host_d.o gpu2norm_d.o \ - double_double.o norm_host_dd.o gpu2norm_dd.o \ - quad_double.o norm_host_qd.o gpu2norm_qd.o -lm \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -utilities_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_d.o - -utilities_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_dd.o -utilities_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_qd.o - -poly_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_d.o - -poly_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_dd.o - -poly_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_qd.o - -polysol_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_d.o - -polysol_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_dd.o - -polysol_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_qd.o - -workspace_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ - -o workspace_host_d.o - -workspace_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ - -o workspace_host_dd.o - -workspace_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ - -o workspace_host_qd.o - -eval_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ - -o eval_host_d.o - -eval_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ - -o eval_host_dd.o - -eval_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ - -o eval_host_qd.o - -mgs_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ - -o mgs_host_d.o - -mgs_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ - -o mgs_host_dd.o - -mgs_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ - -o mgs_host_qd.o - -newton_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ - -o newton_host_d.o - -newton_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ - -o newton_host_dd.o - -newton_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ - -o newton_host_qd.o - -ada_test.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ - -c $(PHCgpu)/Path/Main/ada_test.cpp -o ada_test.o - -ada_test_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ - -c $(PHCgpu)/Path/Main/ada_test_dd.cpp -o ada_test_dd.o - -ada_test_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ - -c $(PHCgpu)/Path/Main/ada_test_qd.cpp -o ada_test_qd.o - -gqd_qd_util.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCLib) -I$(PHCgpu)/Path/Complex -I$(GQD_HOME)/inc \ - -I/usr/local/cuda/include \ - -c $(PHCgpu)/Path/Complex/gqd_qd_util.cpp -o gqd_qd_util.o - -gpunewton_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_d.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpunewton_d.o - -gpunewton_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_dd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpunewton_dd.o - -gpunewton_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_qd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpunewton_qd.o - -path_gpu_d.o: - @-echo ">>> compiling kernels ..." - nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cd \ - -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Complex \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -o path_gpu_d.o \ - -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v - -path_gpu_dd.o: - @-echo ">>> compiling kernels ..." - nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cdd \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Complex \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -o path_gpu_dd.o \ - -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v - -path_gpu_qd.o: - @-echo ">>> compiling kernels ..." - nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cqd \ - -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Complex \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -o path_gpu_qd.o \ - -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v - -ts_gpunewton: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - gqd_qd_util.o path_gpu_d.o gpunewton_d.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton.adb \ - -o ts_gpunewton.o - gnatbind ts_gpunewton use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpunewton \ - gpunewton_d.o syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ - path_gpu_d.o \ - -o $(BIN)/ts_gpunewton -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpunewton_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ - ada_test_dd.o path_gpu_dd.o gpunewton_dd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton_dd.adb \ - -o ts_gpunewton.o - gnatbind ts_gpunewton_dd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpunewton_dd \ - gpunewton_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ - path_gpu_dd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpunewton_dd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpunewton_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ - ada_test_qd.o path_gpu_qd.o gpunewton_qd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton_qd.adb \ - -o ts_gpunewton_qd.o - gnatbind ts_gpunewton_qd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpunewton_qd \ - gpunewton_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ - path_gpu_qd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpunewton_qd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -predictor_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ - -o predictor_host_d.o - -predictor_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ - -o predictor_host_dd.o - -predictor_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ - -o predictor_host_qd.o - -path_host_d.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ - -o path_host_d.o - -path_host_dd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ - -o path_host_dd.o - -path_host_qd.o: - $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ - -o path_host_qd.o - -gpuonepath_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_d.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpuonepath_d.o - -gpuonepath_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_dd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpuonepath_dd.o - -gpuonepath_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_qd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpuonepath_qd.o - -ts_gpuonepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - gqd_qd_util.o path_gpu_d.o predictor_host_d.o path_host_d.o \ - gpuonepath_d.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_d.adb \ - -o ts_gpuonepath_d.o - gnatbind ts_gpuonepath_d use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpuonepath_d \ - gpuonepath_d.o syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ - path_gpu_d.o predictor_host_d.o path_host_d.o \ - -o $(BIN)/ts_gpuonepath_d -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpuonepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o \ - path_host_dd.o gpuonepath_dd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_dd.adb \ - -o ts_gpuonepath_dd.o - gnatbind ts_gpuonepath_dd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpuonepath_dd \ - gpuonepath_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ - path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpuonepath_dd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpuonepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o \ - path_host_qd.o gpuonepath_qd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_qd.adb \ - -o ts_gpuonepath_qd.o - gnatbind ts_gpuonepath_qd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpuonepath_qd \ - gpuonepath_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ - path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpuonepath_qd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -err_check_d.o: - $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Main/err_check.cpp \ - -o err_check_d.o - -path_data_d.o: - $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Main/path_data.cpp \ - -o path_data_d.o - -path_test_d.o: - $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ - -I$(PHCgpu)/Path/Main \ - -c $(PHCgpu)/Path/Main/path_test.cpp \ - -o path_test_d.o - -gpumanypaths_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_d.cpp -I$(PHCLib) \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpumanypaths_d.o - -gpumanypaths_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_dd.cpp -I$(PHCLib) \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpumanypaths_dd.o - -gpumanypaths_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_qd.cpp -I$(PHCLib) \ - -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ - -I/usr/local/cuda/include \ - -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -I$(PHCgpu)/Path/Path_GPU \ - -o gpumanypaths_qd.o - -ts_gpumanypaths_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - gqd_qd_util.o path_gpu_d.o predictor_host_d.o \ - path_host_d.o gpumanypaths_d.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_d.adb \ - -o ts_gpumanypaths_d.o - gnatbind ts_gpumanypaths_d use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpumanypaths_d \ - gpumanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ - path_gpu_d.o predictor_host_d.o path_host_d.o \ - -o $(BIN)/ts_gpumanypaths_d -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpumanypaths_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o \ - path_host_dd.o gpumanypaths_dd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_dd.adb \ - -o ts_gpumanypaths_dd.o - gnatbind ts_gpumanypaths_dd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpumanypaths_dd \ - gpumanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ - path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpumanypaths_dd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpumanypaths_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o \ - path_host_qd.o gpumanypaths_qd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_qd.adb \ - -o ts_gpumanypaths_qd.o - gnatbind ts_gpumanypaths_qd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpumanypaths_qd \ - gpumanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ - path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpumanypaths_qd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpupath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - gqd_qd_util.o path_gpu_d.o predictor_host_d.o \ - path_host_d.o gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_d.adb \ - -o ts_gpupath_d.o - gnatbind ts_gpupath_d use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpupath_d gpunewton_d.o gpuonepath_d.o \ - gpumanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ - path_gpu_d.o predictor_host_d.o path_host_d.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_gpupath_d -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpupath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ - gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_dd.adb \ - -o ts_gpupath_dd.o - gnatbind ts_gpupath_dd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpupath_dd gpunewton_dd.o gpuonepath_dd.o \ - gpumanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ - path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpupath_dd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -ts_gpupath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ - gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_qd.adb \ - -o ts_gpupath_qd.o - gnatbind ts_gpupath_qd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_gpupath_qd gpunewton_qd.o gpuonepath_qd.o \ - gpumanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ - path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_gpupath_qd -lm \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - --LINK=$(gpp) - -adenewton_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_d.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adenewton_d.o -adenewton_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_dd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adenewton_dd.o -adenewton_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_qd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adenewton_qd.o - -adeonepath_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_d.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adeonepath_d.o -adeonepath_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_dd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adeonepath_dd.o -adeonepath_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_qd.cpp -I$(PHCLib) \ - -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ - -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o adeonepath_qd.o - -ademanypaths_d.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_d.cpp -I$(PHCLib) \ - -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o ademanypaths_d.o -ademanypaths_dd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_dd.cpp -I$(PHCLib) \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o ademanypaths_dd.o -ademanypaths_qd.o: - $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_qd.cpp -I$(PHCLib) \ - -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Main \ - -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ - -o ademanypaths_qd.o - -ts_adepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o \ - path_host_d.o adenewton_d.o adeonepath_d.o ademanypaths_d.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_d.adb \ - -o ts_adepath_d.o - gnatbind ts_adepath_d use_c2phc - @-echo ">>> linking ..." - gnatlink ts_adepath_d adenewton_d.o adeonepath_d.o \ - ademanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o \ - predictor_host_d.o path_host_d.o \ - -o $(BIN)/ts_adepath_d -lm --LINK=$(gpp) - -ts_adepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - predictor_host_dd.o path_host_dd.o \ - adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_dd.adb \ - -o ts_adepath_dd.o - gnatbind ts_adepath_dd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_adepath_dd adenewton_dd.o adeonepath_dd.o \ - ademanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ - predictor_host_dd.o path_host_dd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_adepath_dd -lm --LINK=$(gpp) - -ts_adepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - predictor_host_qd.o path_host_qd.o \ - adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_qd.adb \ - -o ts_adepath_qd.o - gnatbind ts_adepath_qd use_c2phc - @-echo ">>> linking ..." - gnatlink ts_adepath_qd adenewton_qd.o adeonepath_qd.o \ - ademanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ - predictor_host_qd.o path_host_qd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_adepath_qd -lm --LINK=$(gpp) - -parameter.o: - $(gpp) -O3 -fPIC -I$(PHCgpu)/Path/Host2 \ - -c $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o - -lib2path_d.o: - $(gpp) -O3 -fPIC -I$(PHCLib) \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ - -I$(PHCgpu)/Path/Host2 \ - -c $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o - -lib2path.o: - $(gpp) -O3 -fPIC -I$(PHCLib) -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ - -I$(PHCgpu)/Path/Host2 \ - -c $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o - -ademanypaths.o: - $(gpp) -O2 -I$(PHCLib) -I$(QD_ROOT)/include \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ - -I$(PHCgpu)/Path/Host2 \ - -c $(PHCAda)/PHCtoC/ademanypaths.cpp \ - -o ademanypaths.o - -ts_ademanypaths: lib2path.o - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main Ada procedure ..." - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_ademanypaths.adb \ - -o ts_ademanypaths.o - gnatbind ts_ademanypaths use_c2phc - @-echo ">>> linking ..." - gnatlink ts_ademanypaths syscon.o solcon.o phcpack.o \ - lib2path.o $(QD_LIB)/libqd.a \ - -o $(BIN)/ts_ademanypaths -lm --LINK=$(gpp) - -ts_pathpars: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pathpars.adb \ - -o $(BIN)/ts_pathpars - -# Test programs for the Tasking : - -corecount.o: - gcc -c $(PHCAda)/Tasking/corecount.c - -ts_corecount: corecount.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_corecount.adb - gnatbind ts_corecount - gnatlink ts_corecount corecount.o -o $(BIN)/ts_corecount - -ts_mtmatvec: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmatvec.adb \ - -o $(BIN)/ts_mtmatvec - -ts_mtpolval: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpolval.adb \ - -o $(BIN)/ts_mtpolval - -ts_mtlinsol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsol.adb \ - -o $(BIN)/ts_mtlinsol - -ts_mtlinsolV0: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsolV0.adb \ - -o $(BIN)/ts_mtlinsolV0 - -ts_mtlinsolv1: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsolv1.adb \ - -o $(BIN)/ts_mtlinsolv1 - -ts_tasking: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tasking.adb \ - -o $(BIN)/ts_tasking - -ts_mutex: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mutex.adb -o $(BIN)/ts_mutex - -ts_jobs: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jobs.adb -o $(BIN)/ts_jobs - -ts_mtsols: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtsols.adb -o $(BIN)/ts_mtsols - -ts_mtcont: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtcont.adb -o $(BIN)/ts_mtcont - -ts_mtstref: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtstref.adb -o $(BIN)/ts_mtstref - -ts_mtddref: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtddref.adb -o $(BIN)/ts_mtddref - -ts_mtqdref: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtqdref.adb -o $(BIN)/ts_mtqdref - -ts_mtsharp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtsharp.adb -o $(BIN)/ts_mtsharp - -ts_mtvol: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtvol.adb -o $(BIN)/ts_mtvol - -ts_mtvolcon: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtvolcon.adb \ - -o $(BIN)/ts_mtvolcon - -ts_mtverify: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtverify.adb \ - -o $(BIN)/ts_mtverify - -ts_mtmva: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmva.adb -o $(BIN)/ts_mtmva - -ts_mtperm: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtperm.adb -o $(BIN)/ts_mtperm - -ts_mtpermctl: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpermctl.adb \ - -o $(BIN)/ts_mtpermctl - -ts_mtmbthom: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmbthom.adb \ - -o $(BIN)/ts_mtmbthom - -ts_mtcelidx: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_mtcelidx.adb \ - -o ts_mtcelidx.o - gnatbind ts_mtcelidx use_c2phc - gnatlink ts_mtcelidx inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_mtcelidx --LINK=$(gpp) - -ts_mtadcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtadcnv.adb \ - -o $(BIN)/ts_mtadcnv - -ts_mtserlin: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtserlin.adb \ - -o $(BIN)/ts_mtserlin - -ts_mtnewton: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtnewton.adb \ - -o $(BIN)/ts_mtnewton - -ts_mthessian: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mthessian.adb \ - -o $(BIN)/ts_mthessian - -ts_mthesscrc: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mthesscrc.adb \ - -o $(BIN)/ts_mthesscrc - -ts_mtratapp: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtratapp.adb \ - -o $(BIN)/ts_mtratapp - -ts_mtshiftcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtshiftcnv.adb \ - -o $(BIN)/ts_mtshiftcnv - -ts_mtpcscnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpcscnv.adb \ - -o $(BIN)/ts_mtpcscnv - -ts_mtprdcnv: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtprdcnv.adb \ - -o $(BIN)/ts_mtprdcnv - -# Test programs for the Main interactive drivers : - -ts_mainroco: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_mainroco.adb \ - -o ts_mainroco.o - gnatbind ts_mainroco use_c2phc - gnatlink ts_mainroco inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_mainroco --LINK=$(gpp) - -ts_blkroco: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_blkroco.adb \ - -o $(BIN)/ts_blkroco - -use_phc: - gnatmake $(INCLULIBS) $(GNATFLAGS) use_phc.adb \ - -o $(BIN)/use_phc - -ts_greet: - gnatmake $(INCLULIBS) $(GNATFLAGS) ts_greet.adb \ - -o $(BIN)/ts_greet - -ts_actopt: corecount.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_actopt.adb - gnatbind ts_actopt - gnatlink ts_actopt corecount.o -o $(BIN)/ts_actopt - -ts_opthand: corecount.o inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o mvc4phc.o \ - parameter.o lib2path.o feedback.o lib.a - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ - $(GNATFLAGS) ts_opthand.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb - gnatbind ts_opthand use_c2phc pieri_solver - gnatlink ts_opthand corecount.o inputData.o outputData.o iTest.o \ - fTest.o simplex4phc.o reltab.o mvc4phc.o \ - demicsrun4phc.o lib2path.o $(QD_LIB)/libqd.a \ - syscon.o solcon.o phcpack.o parameter.o \ - feedback.o lib.a \ - -o $(BIN)/ts_opthand --LINK=$(gpp) - -ts_bbsolve: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_bbsolve.adb \ - -o ts_bbsolve.o - gnatbind ts_bbsolve use_c2phc - gnatlink ts_bbsolve inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ - -o $(BIN)/ts_bbsolve --LINK=$(gpp) - -# Test programs for the Library Lib : - -phcpack.o: - gcc -c $(PHCLib)/phcpack.c - -use_c2phc.o: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - -ts_list2str: - gcc -c $(PHCLib)/lists_and_strings.c - gcc -c $(PHCLib)/ts_list2str.c - gcc lists_and_strings.o ts_list2str.o -o $(BIN)/ts_list2str - -lib_syscon: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/lib_syscon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o lib_syscon.o \ - -o $(BIN)/lib_syscon - -lib_syscon_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_syscon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o lib_syscon.o \ - -o $(BIN)/lib_syscon --LINK=$(gpp) - -lib_tabform: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/tabform.c - gcc -c $(PHCLib)/lib_tabform.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o tabform.o lib_tabform.o \ - -o $(BIN)/lib_tabform - -lib_tabform_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/tabform.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_tabform.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o tabform.o lib_tabform.o \ - -o $(BIN)/lib_tabform --LINK=$(gpp) - -lib_solcon: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/lib_solcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c solcon.o lib_solcon.o \ - -o $(BIN)/lib_solcon - -lib_solcon_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_solcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c solcon.o lib_solcon.o \ - -o $(BIN)/lib_solcon --LINK=$(gpp) - -lib_solrep: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/lib_solrep.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o lib_solrep.o \ - -o $(BIN)/lib_solrep - -lib_solrep_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_solrep.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o lib_solrep.o \ - -o $(BIN)/lib_solrep --LINK=$(gpp) - -lib_read: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/lib_read.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o solcon.o lib_read.o \ - -o $(BIN)/lib_read -lm - -lib_read_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_read.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o solcon.o lib_read.o \ - -o $(BIN)/lib_read -lm --LINK=$(gpp) - -lib_newton: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/lib_newton.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o lib_newton.o \ - -o $(BIN)/lib_newton -lm --LINK=$(gpp) - -lib_newton_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_newton.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o lib_newton.o \ - -o $(BIN)/lib_newton -lm --LINK=$(gpp) - -lib_multip: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/multiplicity.c - gcc -c $(PHCLib)/lib_multip.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o multiplicity.o \ - lib_multip.o -o $(BIN)/lib_multip -lm - -lib_multip_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/multiplicity.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_multip.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o multiplicity.o \ - lib_multip.o -o $(BIN)/lib_multip -lm --LINK=$(gpp) - -lib_roco: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/product.c - gcc -c $(PHCLib)/lib_roco.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o product.o \ - lib_roco.o -o $(BIN)/lib_roco -lm --LINK=$(gpp) - -lib_roco_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/product.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_roco.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o product.o \ - lib_roco.o -o $(BIN)/lib_roco -lm --LINK=$(gpp) - -lib_celcon: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/celcon.c - gcc -c $(PHCLib)/intcelcon.c - gcc -c $(PHCLib)/lib_celcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o celcon.o \ - intcelcon.o lib_celcon.o -o $(BIN)/lib_celcon -lm - -lib_celcon_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/celcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/intcelcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_celcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o celcon.o \ - intcelcon.o lib_celcon.o -o $(BIN)/lib_celcon -lm \ - --LINK=$(gpp) - -lib_celphc: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/celcon.c - gcc -c $(PHCLib)/lib_celphc.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o celcon.o \ - lib_celphc.o -o $(BIN)/lib_celphc -lm - -lib_celphc_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/celcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_celphc.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o celcon.o \ - lib_celphc.o -o $(BIN)/lib_celphc -lm --LINK=$(gpp) - -lib_scale: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/scalers.c - gcc -c $(PHCLib)/lib_scale.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o scalers.o lib_scale.o \ - -o $(BIN)/lib_scale -lm - -lib_scale_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/scalers.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_scale.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o scalers.o lib_scale.o \ - -o $(BIN)/lib_scale -lm --LINK=$(gpp) - -lib_reduce: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/reducers.c - gcc -c $(PHCLib)/lib_reduce.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o reducers.o lib_reduce.o \ - -o $(BIN)/lib_reduce -lm - -lib_reduce_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/reducers.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_reduce.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o reducers.o lib_reduce.o \ - -o $(BIN)/lib_reduce -lm --LINK=$(gpp) - -lib_conpar: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/lib_conpar.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_conpar.o \ - -o $(BIN)/lib_conpar -lm - -lib_conpar_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_conpar.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_conpar.o \ - -o $(BIN)/lib_conpar -lm --LINK=$(gpp) - -lib_poco: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/lib_poco.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_poco.o \ - -o $(BIN)/lib_poco -lm - -lib_poco_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_poco.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_poco.o \ - -o $(BIN)/lib_poco -lm --LINK=$(gpp) - -lib_track: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/lib_track.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - jump_track.o lib_track.o -o $(BIN)/lib_track -lm - -lib_track_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/jump_track.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_track.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - jump_track.o lib_track.o -o $(BIN)/lib_track -lm \ - --LINK=$(gpp) - -lib_nxtsol: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(PHCLib)/next_track.c - gcc -c $(PHCLib)/lib_nxtsol.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o jump_track.o \ - next_track.o lib_nxtsol.o -lm \ - -o $(BIN)/lib_nxtsol - -lib_nxtsol_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/jump_track.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/next_track.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_nxtsol.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o jump_track.o \ - next_track.o lib_nxtsol.o -o $(BIN)/lib_nxtsol -lm \ - --LINK=$(gpp) - -lib_sweep: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c -O2 $(PHCLib)/sweep.c - gcc -c -O2 $(PHCLib)/lib_sweep.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c sweep.o lib_sweep.o \ - -o $(BIN)/lib_sweep -lm - -lib_sweep_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/sweep.c - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_sweep.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c sweep.o lib_sweep.o \ - -o $(BIN)/lib_sweep -lm --LINK=$(gpp) - -lib_pieri: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb - gcc -c -O2 $(PHCLib)/lib_pieri.c - gnatbind -n use_c2pieri - gnatlink -C use_c2pieri lib_pieri.o -o $(BIN)/lib_pieri - -lib_pieri_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_pieri.c - gnatbind -n use_c2pieri - gnatlink -C use_c2pieri lib_pieri.o -o $(BIN)/lib_pieri --LINK=$(gpp) - -lib_lrhom: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c -O2 $(PHCLib)/syscon.c - gcc -c -O2 $(PHCLib)/solcon.c - gcc -c -O2 $(PHCLib)/schubert.c - gcc -c -O2 $(PHCLib)/lib_lrhom.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o schubert.o lib_lrhom.o \ - -o $(BIN)/lib_lrhom -lm - -lib_lrhom_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/schubert.c - $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_lrhom.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o schubert.o lib_lrhom.o \ - -o $(BIN)/lib_lrhom -lm --LINK=$(gpp) - -lib_factor: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/lib_factor.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - lib_factor.o -o $(BIN)/lib_factor -lm - -lib_factor_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_factor.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - lib_factor.o -o $(BIN)/lib_factor -lm --LINK=$(gpp) - -lib_member: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/lib_member.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - lib_member.o -o $(BIN)/lib_member -lm - -lib_member_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_member.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ - lib_member.o -o $(BIN)/lib_member -lm --LINK=$(gpp) - -lib_usolve: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/unisolvers.c - gcc -c $(PHCLib)/lib_usolve.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o unisolvers.o lib_usolve.o \ - -o $(BIN)/lib_usolve -lm - -lib_usolve_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/unisolvers.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_usolve.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o unisolvers.o lib_usolve.o \ - -o $(BIN)/lib_usolve -lm --LINK=$(gpp) - -lib_giftwrap: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/giftwrappers.c - gcc -c $(PHCLib)/lib_giftwrap.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c giftwrappers.o lib_giftwrap.o \ - -o $(BIN)/lib_giftwrap -lm - -lib_giftwrap_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/giftwrappers.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_giftwrap.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c giftwrappers.o lib_giftwrap.o \ - -o $(BIN)/lib_giftwrap -lm --LINK=$(gpp) - -lib_numbtrop: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/numbtrop.c - gcc -c $(PHCLib)/lib_numbtrop.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c numbtrop.o lib_numbtrop.o \ - -o $(BIN)/lib_numbtrop -lm - -lib_numbtrop_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/numbtrop.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_numbtrop.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c numbtrop.o lib_numbtrop.o \ - -o $(BIN)/lib_numbtrop -lm --LINK=$(gpp) - -lib_series: - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/syspool.c - gcc -c $(PHCLib)/series.c - gcc -c $(PHCLib)/lib_series.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o syspool.o series.o \ - lib_series.o -o $(BIN)/lib_series -lm - -lib_series_cpp: - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syspool.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/series.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_series.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o syscon.o syspool.o series.o \ - lib_series.o -o $(BIN)/lib_series -lm --LINK=$(gpp) - -lib_padcon: - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/padcon.c - gcc -c $(PHCLib)/lib_padcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o padcon.o \ - lib_padcon.o -o $(BIN)/lib_padcon -lm - -lib_padcon_cpp: - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/padcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_padcon.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c solcon.o phcpack.o padcon.o lib_padcon.o \ - -o $(BIN)/lib_padcon -lm --LINK=$(gpp) - -lib_nbrvar: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/lib_nbrvar.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_nbrvar.o \ - -o $(BIN)/lib_nbrvar -lm - -lib_nbrvar_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_nbrvar.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o lib_nbrvar.o \ - -o $(BIN)/lib_nbrvar -lm --LINK=$(gpp) - -adepath_d.o: adenewton_d.o adeonepath_d.o ademanypaths_d.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/adepath_d.c -gpupath_d.o: gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/gpupath_d.c -adepath_dd.o: adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/adepath_dd.c -gpupath_dd.o: gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/gpupath_dd.c -adepath_qd.o: adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/adepath_qd.c -gpupath_qd.o: gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o - $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ - -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ - -c $(PHCLib)/gpupath_qd.c - -lib_adepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o adepath_d.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_d.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c lib_adepath_d.o adepath_d.o \ - adenewton_d.o adeonepath_d.o ademanypaths_d.o \ - syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o \ - predictor_host_d.o path_host_d.o \ - -o $(BIN)/lib_adepath_d -lm --LINK=$(gpp) - -lib_gpupath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o path_gpu_d.o gpupath_d.o \ - gqd_qd_util.o \ - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_d.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c lib_gpupath_d.o gpupath_d.o \ - gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o \ - syscon.o solcon.o phcpack.o ada_test.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o \ - predictor_host_d.o path_host_d.o path_gpu_d.o \ - gqd_qd_util.o \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -o $(BIN)/lib_gpupath_d -lm --LINK=$(gpp) - -lib_gpupath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - predictor_host_dd.o path_host_dd.o path_gpu_dd.o gpupath_dd.o \ - gqd_qd_util.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_dd.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c lib_gpupath_dd.o gpupath_dd.o \ - gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o \ - syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ - predictor_host_dd.o path_host_dd.o path_gpu_dd.o \ - gqd_qd_util.o \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -o $(BIN)/lib_gpupath_dd -lm --LINK=$(gpp) - -lib_gpupath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - predictor_host_qd.o path_host_qd.o path_gpu_qd.o gpupath_qd.o \ - gqd_qd_util.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_qd.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c lib_gpupath_qd.o gpupath_qd.o \ - gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o \ - syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ - predictor_host_qd.o path_host_qd.o path_gpu_qd.o \ - gqd_qd_util.o \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -o $(BIN)/lib_gpupath_qd -lm --LINK=$(gpp) - -lib_adepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - predictor_host_dd.o path_host_dd.o adepath_dd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_dd.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc - gnatlink -C use_c2phc lib_adepath_dd.o adepath_dd.o \ - adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o \ - syscon.o solcon.o phcpack.o ada_test_dd.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ - predictor_host_dd.o path_host_dd.o \ - inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ - reltab.o mvc4phc.o demicsrun4phc.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/lib_adepath_dd -lm --LINK=$(gpp) - -lib_adepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - predictor_host_qd.o path_host_qd.o adepath_qd.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - @-echo ">>> compiling code for the containers ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c - @-echo ">>> compiling the main C program ..." - $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_qd.c - @-echo ">>> linking ..." - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c lib_adepath_qd.o adepath_qd.o \ - adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o \ - syscon.o solcon.o phcpack.o ada_test_qd.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ - predictor_host_qd.o path_host_qd.o \ - $(QD_LIB)/libqd.a \ - -o $(BIN)/lib_adepath_qd -lm --LINK=$(gpp) - -phc_solve: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/phcpack4c.c - gcc -c $(PHCLib)/phc_solve.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o phcpack4c.o phc_solve.o \ - -o $(BIN)/phc_solve -lm - -phc_solve_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack4c.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phc_solve.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o phcpack4c.o phc_solve.o \ - -o $(BIN)/phc_solve -lm --LINK=$(gpp) - -lib_witsols: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witsols.c - gcc -c $(PHCLib)/lib_witsols.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o witsols.o lib_witsols.o \ - -o $(BIN)/lib_witsols -lm - -lib_witsols_cpp: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witsols.c - $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_witsols.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c syscon.o solcon.o witsols.o lib_witsols.o \ - -o $(BIN)/phc_solve -lm --LINK=$(gpp) - -# Before typing make phcpy2c2.so, do make clean because everthing must -# be compiled with the -fPIC option. -# All statically compiled .o files are collected into one archive. -# Because there is no main Ada program we call gnatbind with -n -# and must compile the output of gnatbind separately. -# Normally, the output of gnatbind is automatically compiled with -# gnatlink, but we use gcc to link, so the output of the binder, -# which contains the adainit must go into the archive phcpy2c2.a. - -phcpy2c2.so: parameter.o lib2path.o - /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ - $(PHCLib)/lists_and_strings.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PHCLib) \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ - -I$(PHCgpu)/Path/Poly3 -I$(PYTHON) \ - -I$(PYTHON)/Include $(PHCLib)/phcpy2c2.c - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -static use_c2phc -o use_c2phc_binder.adb - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb - ar ruv phcpy2c2.a *.o - ranlib phcpy2c2.a - $(gpp) -v -shared -o ../Python/PHCpy2/phcpy/phcpy2c2.so -lm \ - -Wl,-whole-archive phcpy2c2.a $(QD_LIB)/libqd.a \ - $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ - -Wl,-no-whole-archive -lrt - -phcpy2c3.so: parameter.o lib2path.o - /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ - $(PHCLib)/lists_and_strings.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o - $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ - -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o - $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PYTHON3) -I$(PHCLib) \ - -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ - -I$(PHCgpu)/Path/Poly3 $(PHCLib)/phcpy2c3.c - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -static use_c2phc -o use_c2phc_binder.adb - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb - ar ruv phcpy2c3.a *.o - ranlib phcpy2c3.a - $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ - -Wl,-whole-archive phcpy2c3.a $(QD_LIB)/libqd.a \ - $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ - -Wl,-no-whole-archive -lrt - -# phcpy2c with double version of Path library : - -phcpy2cadepath_d.so: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o adepath_d.o - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ - -I$(PYTHON) -I$(PYTHON)/Include \ - $(PHCLib)/phcpy2cadepath_d.cpp -o phcpy2cadepath_d.o - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -shared use_c2phc - gnatlink -shared -C use_c2phc phcpy2cpath_d.o \ - phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ - giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ - scalers.o schubert.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o \ - adenewton_d.o adeonepath_d.o ademanypaths_d.o adepath_d.o \ - -lm --LINK=$(gpp) -fPIC \ - -o ../Python/PHCpy/phcpy/phcpy2cadepath_d.so - -phcpy2cpath_d.so: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o adepath_d.o path_gpu_d.o \ - gqd_qd_util.o gpupath_d.o - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ - -I$(PYTHON) -I$(PYTHON)/Include \ - $(PHCLib)/phcpy2cpath_d.cpp -o phcpy2cpath_d.o - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -shared use_c2phc - gnatlink -shared -C use_c2phc phcpy2cpath_d.o \ - phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ - giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ - scalers.o schubert.o \ - utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ - eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ - predictor_host_d.o path_host_d.o gqd_qd_util.o path_gpu_d.o \ - adenewton_d.o adeonepath_d.o ademanypaths_d.o adepath_d.o \ - gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o gpupath_d.o \ - -lcutil_x86_64 -lcudart \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -lm --LINK=$(gpp) -fPIC \ - -o ../Python/PHCpy/phcpy/phcpy2cpath_d.so - -phcpy2cpath_dd.so: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - predictor_host_dd.o path_host_dd.o adepath_dd.o path_gpu_dd.o \ - gqd_qd_util.o gpupath_dd.o - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ - -I$(PYTHON) -I$(PYTHON)/Include \ - $(PHCLib)/phcpy2cpath_dd.cpp -o phcpy2cpath_dd.o - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -shared use_c2phc - gnatlink -shared -C use_c2phc phcpy2cpath_dd.o \ - phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ - giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ - scalers.o schubert.o \ - utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ - eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ - predictor_host_dd.o path_host_dd.o gqd_qd_util.o path_gpu_dd.o \ - adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o adepath_dd.o \ - gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o gpupath_dd.o \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -lm --LINK=$(gpp) -fPIC \ - -o ../Python/PHCpy/phcpy/phcpy2cpath_dd.so - -phcpy2cpath_qd.so: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - predictor_host_qd.o path_host_qd.o adepath_qd.o path_gpu_qd.o \ - gqd_qd_util.o gpupath_qd.o - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c - $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ - -I$(PYTHON) -I$(PYTHON)/Include \ - $(PHCLib)/phcpy2cpath_qd.cpp -o phcpy2cpath_qd.o - gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n -shared use_c2phc - gnatlink -shared -C use_c2phc phcpy2cpath_qd.o \ - phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ - giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ - scalers.o schubert.o \ - utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ - eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ - predictor_host_qd.o path_host_qd.o gqd_qd_util.o path_gpu_qd.o \ - adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o adepath_qd.o \ - gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o gpupath_qd.o \ - -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ - -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ - -lm --LINK=$(gpp) -fPIC \ - -o ../Python/PHCpy/phcpy/phcpy2cpath_qd.so - -# how to make the executables with MPI: - -adatest: - $(CC) -c $(MPILib)/call_hello.c - $(CC) -c $(MPILib)/adatest.c - gnatmake -c $(MPILib)/hello.adb - gnatbind -n hello - gnatlink -C hello call_hello.o adatest.o -o ../bin/adatest \ - --LINK=$(CLINKER) - -mpi2sys: - $(CC) -c $(MPILib)/mpi2sys.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syscon.adb - gnatbind -n use_syscon - gnatlink -C use_syscon mpi2sys.o -o ../bin/mpi2sys \ - --LINK=$(CLINKER) - -mpi2sol: - $(CC) -c $(MPILib)/mpi2sol.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solcon.adb - gnatbind -n use_solcon - gnatlink -C use_solcon mpi2sol.o -o ../bin/mpi2sol \ - --LINK=$(CLINKER) - -mpi2hom: - $(CC) -c $(PHCLib)/syscon.c - $(CC) -c $(PHCLib)/solcon.c - $(CC) -c $(PHCLib)/phcpack.c - $(CC) -c $(PHCLib)/jump_track.c - $(CC) -c $(MPILib)/parallel_phcpack.c - $(CC) -c $(MPILib)/mpi2hom.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c mpi2hom.o syscon.o solcon.o phcpack.o \ - jump_track.o parallel_phcpack.o \ - -o ../bin/mpi2hom \ - --LINK=$(CLINKER) - -mpi2phc_s: - $(CC) -c $(MPILib)/mpi2phc_s.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c mpi2phc_s.o -o ../bin/mpi2phc_s \ - --LINK=$(CLINKER) - -mpi2phc_d2: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - $(CC) -c $(MPILib)/mpi2phc_d2.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o \ - mpi2phc_d2.o -o ../bin/mpi2phc_d2 \ - --LINK=$(CLINKER) - -double_double.o: - gcc -c -I$(PHCAda)/Math_Lib/QD $(PHCAda)/Math_Lib/QD/double_double.c \ - -o double_double.o - -quad_double.o: - gcc -c -I$(PHCAda)/Math_Lib/QD $(PHCAda)/Math_Lib/QD/quad_double.c \ - -o quad_double.o - -mpi2phc_dd: double_double.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - $(CC) -c -I$(PHCAda)/Math_Lib/QD $(MPILib)/mpi2phc_dd.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o double_double.o \ - mpi2phc_dd.o -o ../bin/mpi2phc_dd \ - --LINK=$(CLINKER) -lm - -mpi2phc_qd: double_double.o quad_double.o - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - $(CC) -c -I$(PHCAda)/Math_Lib/QD $(MPILib)/mpi2phc_qd.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o double_double.o \ - quad_double.o mpi2phc_qd.o -o ../bin/mpi2phc_qd \ - --LINK=$(CLINKER) -lm - -mpi2track: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - gcc -c $(COFLAGS) $(PHCLib)/phcpack.c - gcc -c $(COFLAGS) $(PHCLib)/syscon.c - gcc -c $(COFLAGS) $(PHCLib)/solcon.c - gcc -c $(COFLAGS) $(PHCLib)/witset.c - gcc -c $(COFLAGS) $(PHCLib)/jump_track.c - $(CC) -c $(COFLAGS) $(MPILib)/parallel_phcpack.c - $(CC) -c $(COFLAGS) $(MPILib)/mpi2track.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o witset.o \ - jump_track.o parallel_phcpack.o mpi2track.o \ - -o ../bin/mpi2track -lm \ - --LINK=$(CLINKER) - -parallel_pieri: - gcc -c $(MPILib)/parallel_pieri.c $(MPILib)/parallel_tree.c \ - $(MPILib)/queue.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb - gnatbind -n use_c2pieri - gnatlink -C use_c2pieri parallel_pieri.o parallel_tree.o queue.o \ - -o $(BIN)/parallel_pieri --LINK=$(CLINKER) - -parallel_subsystem: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_subsystem.c - gcc -c $(MPILib)/job_queue.c - gcc -c $(MPILib)/idle_queue.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/from_mpi2track.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ - jump_track.o from_mpi2track.o parallel_phcpack.o \ - job_queue.o idle_queue.o parallel_subsystem.o -lm \ - -o ../bin/parallel_subsystem --LINK=$(CLINKER) - -mpi2fac: -# mpicc -c $(MPILib)/mpi2fac.c - gcc -c $(MPILib)/mpi2fac.c - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gnatbind -n use_c2phc - gnatlink -C use_c2phc mpi2fac.o -o ../bin/mpi2fac -lm \ - --LINK=$(CLINKER) - -mpi2fac_s: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/parallel_monodromy.c - gcc -c $(MPILib)/mpi2fac_s.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ - jump_track.o parallel_phcpack.o parallel_monodromy.o \ - mpi2fac_s.o -lm \ - -o ../bin/mpi2fac_s --LINK=$(CLINKER) - -mpi2fac_d: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/parallel_monodromy.c - gcc -c $(MPILib)/manage_components.c - gcc -c $(MPILib)/mpi2fac_d.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ - jump_track.o parallel_phcpack.o parallel_monodromy.o \ - manage_components.o mpi2fac_d.o -lm \ - -o ../bin/mpi2fac_d --LINK=$(CLINKER) - -monodromyMPI: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/witset.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/parallel_monodromy.c - gcc -c $(MPILib)/manage_components.c - gcc -c $(MPILib)/monodromyMPI.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ - jump_track.o parallel_phcpack.o parallel_monodromy.o \ - manage_components.o monodromyMPI.o -lm \ - -o ../bin/monodrom --LINK=$(CLINKER) - -mpi2cell_s: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/celcon.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/parallel_cells.c - gcc -c $(MPILib)/mpi2cell_s.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o celcon.o \ - jump_track.o parallel_phcpack.o parallel_cells.o \ - mpi2cell_s.o \ - -o ../bin/mpi2cell_s --LINK=$(CLINKER) - -mpi2cell_d: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/celcon.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(MPILib)/parallel_phcpack.c - gcc -c $(MPILib)/parallel_cells.c - gcc -c $(MPILib)/mpi2cell_d.c - gnatbind -n use_c2phc - gnatlink -C use_c2phc phcpack.o solcon.o syscon.o celcon.o \ - jump_track.o parallel_phcpack.o parallel_cells.o \ - mpi2cell_d.o \ - -o ../bin/mpi2cell_d --LINK=$(CLINKER) - -mpi2padcon: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb - $(CC) -c -I$(PHCLib) $(COFLAGS) $(MPILib)/mpi2padcon.c - gcc -c $(PHCLib)/phcpack.c - gcc -c $(PHCLib)/syscon.c - gcc -c $(PHCLib)/solcon.c - gcc -c $(PHCLib)/jump_track.c - gcc -c $(PHCLib)/padcon.c - gcc -c $(MPILib)/parallel_phcpack.c - gnatbind -n use_c2phc4c - gnatlink -C use_c2phc4c mpi2padcon.o syscon.o solcon.o phcpack.o \ - jump_track.o padcon.o parallel_phcpack.o \ - -o ../bin/mpi2padcon -lm \ - --LINK=$(CLINKER) - -# cleaning up the object files : - -clean: - /bin/rm -f b* *.o *.ali lib.a phcpy2c2.a phcpy2c3.a +# The beginning of this makefile defines the names of the locations +# of the Python development headers for phcpy, followed by the home +# of MPI (message passing), and the QD library (with its GPU version). +# The next set of names defines by this makefile refers to the +# general directory structure of the library of PHCpack. +# The targets are then listed, grouped by each directory. + +# The makefile works on RHEL 6.6, Centos Linux 7.3, +# with python2.6, python3, openmpi, GNAT GPL 2016 and 2017, +# GNAT Community 2018 and 2019. + +# Location of Python for 2.7 and 3.6 development headers for phcpy + +PYTHON=/usr/include/python2.7 +PYTHON3=/usr/local/include/python3.6m + +# The location of the Sage Python lib: + +SAGEPYTHONLIB=/home/microway/Downloads/sage-7.3/local/lib + +# The location of the adalib folder for the GNAT GPL compiler: + +# for GNAT GPL 2016 : +# ADALIB=/usr/gnat-gpl-2016/lib/gcc/x86_64-pc-linux-gnu/4.9.4/adalib +# FOR GNAT GPL 2017 : +# ADALIB=/usr/gnat/lib/gcc/x86_64-pc-linux-gnu/6.3.1/adalib +# GNAT Community 2018 : +# ADALIB=/home/microway/opt/GNAT/2018/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adalib +# GNAT Community 2019 : +# ADALIB=/home/jan/opt/GNAT/2019/lib/gcc/x86_64-pc-linux-gnu/8.3.1/adalib +# GNAT Community 2020 : +ADALIB=/home/microway/opt/GNAT/2020/lib/gcc/x86_64-pc-linux-gnu/9.3.1/adalib + +# The location of the g++ compiler + +gpp=g++ + +# before GNAT GPL 2017 : +# gpp=/usr/bin/g++ +# for GNAT GPL 2017 : +# gpp=g++ + +# The location of the MPI: + +MPI_HOME=/home/microway/Downloads/openmpi-4.0.0 + +# Location of the QD library and its GPU version: + +QD_ROOT=/usr/local/qd-2.3.17 +QD_LIB=/usr/local/lib +GQD_HOME=/usr/local/gqd_1_2 +SDK_HOME=/usr/local/cuda/sdk + +# Definitions of PHCpack specific names start here: + +PHCLib=../Lib +PHCAda=../Ada +MPILib=../MPI +PHCgpu=../GPU +PHCmod=../Mod +BIN=../bin +INCLULIBS=-I$(PHCAda)/System -I$(PHCAda)/System/Unix_Timer \ + -I$(PHCAda)/Math_Lib/Numbers -I$(PHCAda)/Math_Lib/QD \ + -I$(PHCAda)/Math_Lib/Vectors -I$(PHCAda)/Math_Lib/Matrices \ + -I$(PHCAda)/Math_Lib/Divisors -I$(PHCAda)/Math_Lib/Reduction \ + -I$(PHCAda)/Math_Lib/Polynomials -I$(PHCAda)/Math_Lib/Functions \ + -I$(PHCAda)/Math_Lib/Supports -I$(PHCAda)/Math_Lib/Circuits \ + -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/Laurent \ + -I$(PHCAda)/Math_Lib/AD \ + -I$(PHCAda)/Deformations/Solutions -I$(PHCAda)/Deformations/Homotopy \ + -I$(PHCAda)/Deformations/Newton -I$(PHCAda)/Deformations/Curves \ + -I$(PHCAda)/Deformations/End_Games -I$(PHCAda)/Deformations/Sweep \ + -I$(PHCAda)/Deformations/Trackers -I$(PHCAda)/Deformations/Continuation \ + -I$(PHCAda)/Root_Counts/Product -I$(PHCAda)/Root_Counts/Binomials \ + -I$(PHCAda)/Root_Counts/Implift -I$(PHCAda)/Root_Counts/Stalift \ + -I$(PHCAda)/Root_Counts/Dynlift -I$(PHCAda)/Root_Counts/Symmetry \ + -I$(PHCAda)/Root_Counts/MixedVol -I$(PHCAda)/Root_Counts/DEMiCs \ + -I$(PHCAda)/Root_Counts/Puiseux \ + -I$(PHCAda)/Schubert/SAGBI -I$(PHCAda)/Schubert/Pieri \ + -I$(PHCAda)/Schubert/Induction \ + -I$(PHCAda)/Components/Samplers -I$(PHCAda)/Components/Interpolators \ + -I$(PHCAda)/Components/Factorization -I$(PHCAda)/Components/Decomposition \ + -I$(PHCAda)/Components/Solver -I$(PHCAda)/Components/Tropical \ + -I$(PHCAda)/CtoPHC/Types -I$(PHCAda)/CtoPHC/Structures \ + -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State \ + -I$(MPILib) -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main +# flags with full optimization +GNATFLAGS=-gnatv -O3 -gnatp -gnatf +GNATOPTFLAGS=-gnatv -O3 -gnatp -gnatf +# GNATFLAGS=-gnatv -O3 -gnatp -gnatf --GNATBIND="gnatbind -static" +# flags to turn on all warnings and validity checks +# GNATFLAGS=-gnatv -gnatwa -gnatVa +GNATNOPFLAGS=-gnatv -gnatwa -gnatVa +# GNATFLAGS=-gnatv --GNATBIND="gnatbind -static" + +COFLAGS = -O2 + +# the main executable is phc : + +phc: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o lib2path.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ + $(GNATFLAGS) phctop.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind phctop use_c2phc pieri_solver + gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ + parameter.o lib2path.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o \ + lib.a $(QD_LIB)/libqd.a \ + get_clock.o get_clocks_per_sec.o \ + -o $(BIN)/phc -lm --LINK=$(gpp) + +phc_noqd: lib.a feedback.o get_clock.o get_clocks_per_sec.o parameter.o \ + lib2path_d.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_noqd \ + $(GNATFLAGS) phctop.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind phctop use_c2phc pieri_solver + gnatlink phctop syscon.o solcon.o phcpack.o feedback.o \ + parameter.o lib2path_d.o \ + inputData.o outputData.o iTest.o fTest.o reltab.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o \ + lib.a $(QD_LIB)/libqd.a \ + get_clock.o get_clocks_per_sec.o \ + -o $(BIN)/phc -lm --LINK=$(gpp) + +# some settings for MPI : + +CC = /usr/local/bin/mpicc +CLINKER = $(CC) +CCC = /usr/local/bin/mpiCC +CCLINKER = $(CCC) + +# Test program to see if compiler works, "hello world" : + +hello: + gnatmake $(INCLULIBS) $(GNATFLAGS) hello.adb -o $(BIN)/hello + +ada_hello: + gnatmake $(INCLULIBS) $(GNATFLAGS) ada_hello.adb -o $(BIN)/ada_hello + +# Test programs for the System library : + +ts_time: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_time.adb -o $(BIN)/ts_time + +ts_clock: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_clock.adb -o $(BIN)/ts_clock + +ts_stamps: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stamps.adb -o $(BIN)/ts_stamps + +ts_timer: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_timer.adb -o $(BIN)/ts_timer + +get_clock.o: + gcc -c $(PHCAda)/System/Basic_Timer/get_clock.c + +get_clocks_per_sec.o: + gcc -c $(PHCAda)/System/Basic_Timer/get_clocks_per_sec.c + +ts_ctimer: get_clock.o get_clocks_per_sec.o + gnatmake -o $(BIN)/ts_ctimer $(INCLULIBS) ts_ctimer.adb \ + -largs get_clock.o get_clocks_per_sec.o + +ts_wintimer: get_clock.o get_clocks_per_sec.o + gnatmake -o $(BIN)/ts_wintimer $(INCLULIBS) ts_wintimer.adb \ + -largs get_clock.o get_clocks_per_sec.o + +ts_syscall: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syscall.adb -o $(BIN)/ts_syscall + +ts_mach: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mach.adb -o $(BIN)/ts_mach + +ts_cmdline: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmdline.adb -o $(BIN)/ts_cmdline + +ts_byemess: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_byemess.adb -o $(BIN)/ts_byemess + +ts_commuser: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_commuser.adb \ + -o $(BIN)/ts_commuser + +ts_filescan: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filescan.adb \ + -o $(BIN)/ts_filescan + +ts_strsplit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strsplit.adb \ + -o $(BIN)/ts_strsplit + +ts_striscan: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_striscan.adb \ + -o $(BIN)/ts_striscan + +ts_threads: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_threads.adb -o $(BIN)/ts_threads + +# Test programs for the library Math_Lib/Numbers : + +ts_strnum: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strnum.adb -o $(BIN)/ts_strnum + +ts_printf: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_printf.adb -o $(BIN)/ts_printf + +ts_intnum: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intnum.adb -o $(BIN)/ts_intnum + +ts_natnum: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natnum.adb -o $(BIN)/ts_natnum + +ts_natdiv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natdiv.adb -o $(BIN)/ts_natdiv + +ts_longflt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_longflt.adb -o $(BIN)/ts_longflt + +ts_fltnum: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltnum.adb -o $(BIN)/ts_fltnum + +ts_cmpnum: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpnum.adb -o $(BIN)/ts_cmpnum + +ts_plrexp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_plrexp.adb -o $(BIN)/ts_plrexp + +ts_random: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_random.adb -o $(BIN)/ts_random + +ts_extran: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extran.adb -o $(BIN)/ts_extran + +ts_matfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_matfun.adb \ + -o $(BIN)/ts_matfun -largs -lm + +ts_intval: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intval.adb -o $(BIN)/ts_intval + +ts_mpcst: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpcst.adb -o $(BIN)/ts_mpcst + +ts_numbio: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_numbio.adb -o $(BIN)/ts_numbio + +ts_isnan: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_isnan.adb -o $(BIN)/ts_isnan + +# Test programs for the Math_Lib/QD library : + +ts_dbldbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dbldbl.adb -o $(BIN)/ts_dbldbl + +ts_qddbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qddbl.adb -o $(BIN)/ts_qddbl + +ts_ddcmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddcmplx.adb -o $(BIN)/ts_ddcmplx + +ts_qdcmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdcmplx.adb -o $(BIN)/ts_qdcmplx + +ts_mpddcv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpddcv.adb -o $(BIN)/ts_mpddcv + +ts_mpqdcv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpqdcv.adb -o $(BIN)/ts_mpqdcv + +ts_ddfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddfun.adb -o $(BIN)/ts_ddfun + +ts_qdfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdfun.adb -o $(BIN)/ts_qdfun + +ts_tdfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdfun.adb -o $(BIN)/ts_tdfun + +ts_pdfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdfun.adb -o $(BIN)/ts_pdfun + +ts_odfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odfun.adb -o $(BIN)/ts_odfun + +ts_dafun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dafun.adb -o $(BIN)/ts_dafun + +ts_cmpexp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpexp.adb -o $(BIN)/ts_cmpexp + +ts_tridbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tridbl.adb -o $(BIN)/ts_tridbl + +ts_octdbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_octdbl.adb -o $(BIN)/ts_octdbl + +ts_tdcmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdcmplx.adb \ + -o $(BIN)/ts_tdcmplx + +ts_odcmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odcmplx.adb \ + -o $(BIN)/ts_odcmplx + +ts_pentadbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pentadbl.adb \ + -o $(BIN)/ts_pentadbl + +ts_decadbl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_decadbl.adb \ + -o $(BIN)/ts_decadbl + +ts_pdcmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdcmplx.adb \ + -o $(BIN)/ts_pdcmplx + +ts_dacmplx: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dacmplx.adb \ + -o $(BIN)/ts_dacmplx + +ts_mpcasts: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpcasts.adb \ + -o $(BIN)/ts_mpcasts + +# Test programs for Math_Lib/Vectors : + +ts_natvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natvec.adb -o $(BIN)/ts_natvec + +ts_intvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intvec.adb -o $(BIN)/ts_intvec + +ts_fltvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltvec.adb -o $(BIN)/ts_fltvec + +ts_cmpvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpvec.adb -o $(BIN)/ts_cmpvec + +ts_nesvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nesvec.adb -o $(BIN)/ts_nesvec + +ts_ddvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddvec.adb -o $(BIN)/ts_ddvec + +ts_qdvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdvec.adb -o $(BIN)/ts_qdvec + +ts_strvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strvec.adb -o $(BIN)/ts_strvec + +ts_perfddvc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfddvc.adb \ + -o $(BIN)/ts_perfddvc + +ts_perfqdvc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfqdvc.adb \ + -o $(BIN)/ts_perfqdvc + +ts_tdvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdvec.adb -o $(BIN)/ts_tdvec + +ts_pdvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdvec.adb -o $(BIN)/ts_pdvec + +ts_odvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odvec.adb -o $(BIN)/ts_odvec + +ts_davec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_davec.adb -o $(BIN)/ts_davec + +# Test programs for Math_Lib/Matrices : + +ts_natmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_natmat.adb -o $(BIN)/ts_natmat + +ts_intmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intmat.adb -o $(BIN)/ts_intmat + +ts_fltmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltmat.adb -o $(BIN)/ts_fltmat + +ts_fltdls: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltdls.adb -o $(BIN)/ts_fltdls + +ts_cmpmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmpmat.adb -o $(BIN)/ts_cmpmat + +ts_ddmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddmat.adb -o $(BIN)/ts_ddmat + +ts_qdmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdmat.adb -o $(BIN)/ts_qdmat + +ts_tdmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdmat.adb -o $(BIN)/ts_tdmat + +ts_pdmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdmat.adb -o $(BIN)/ts_pdmat + +ts_odmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odmat.adb -o $(BIN)/ts_odmat + +ts_damat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_damat.adb -o $(BIN)/ts_damat + +# Test programs for Math_Lib/Divisors : + +ts_gcd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_gcd.adb -o $(BIN)/ts_gcd + +ts_intlina: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intlina.adb -o $(BIN)/ts_intlina + +ts_smith: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_smith.adb -o $(BIN)/ts_smith + +ts_intinv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intinv.adb -o $(BIN)/ts_intinv + +ts_circuit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_circuit.adb \ + -o $(BIN)/ts_circuit + +# Test programs for Math_Lib/Reduction : + +ts_fltlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fltlu.adb -o $(BIN)/ts_fltlu + +ts_cmplu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cmplu.adb -o $(BIN)/ts_cmplu + +ts_ddlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddlu.adb -o $(BIN)/ts_ddlu + +ts_qdlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdlu.adb -o $(BIN)/ts_qdlu + +ts_qrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qrd.adb -o $(BIN)/ts_qrd + +ts_dqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dqrd.adb -o $(BIN)/ts_dqrd + +ts_ddqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddqrd.adb -o $(BIN)/ts_ddqrd + +ts_tdqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdqrd.adb -o $(BIN)/ts_tdqrd + +ts_qdqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdqrd.adb -o $(BIN)/ts_qdqrd + +ts_pdqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdqrd.adb -o $(BIN)/ts_pdqrd + +ts_odqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odqrd.adb -o $(BIN)/ts_odqrd + +ts_daqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_daqrd.adb -o $(BIN)/ts_daqrd + +ts_mpqrd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpqrd.adb -o $(BIN)/ts_mpqrd + +ts_svd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_svd.adb -o $(BIN)/ts_svd + +ts_dsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dsvd.adb -o $(BIN)/ts_dsvd + +ts_ddsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddsvd.adb -o $(BIN)/ts_ddsvd + +ts_tdsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdsvd.adb -o $(BIN)/ts_tdsvd + +ts_qdsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdsvd.adb -o $(BIN)/ts_qdsvd + +ts_pdsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdsvd.adb -o $(BIN)/ts_pdsvd + +ts_odsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odsvd.adb -o $(BIN)/ts_odsvd + +ts_dasvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dasvd.adb -o $(BIN)/ts_dasvd + +ts_mpsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mpsvd.adb -o $(BIN)/ts_mpsvd + +ts_rowred: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rowred.adb -o $(BIN)/ts_rowred + +ts_eigval: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_eigval.adb -o $(BIN)/ts_eigval + +ts_mgs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mgs.adb -o $(BIN)/ts_mgs + +ts_mgsrnk: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mgsrnk.adb -o $(BIN)/ts_mgsrnk + +ts_backsubs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_backsubs.adb \ + -o $(BIN)/ts_backsubs + +ts_perflu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perflu.adb -o $(BIN)/ts_perflu + +ts_perfdlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfdlu.adb -o $(BIN)/ts_perfdlu + +ts_perfdsvd: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfdsvd.adb \ + -o $(BIN)/ts_perfdsvd + +ts_vvlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vvlu.adb -o $(BIN)/ts_vvlu + +ts_vmplu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmplu.adb -o $(BIN)/ts_vmplu + +ts_tdlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdlu.adb -o $(BIN)/ts_tdlu + +ts_pdlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdlu.adb -o $(BIN)/ts_pdlu + +ts_odlu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odlu.adb -o $(BIN)/ts_odlu + +ts_dalu: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dalu.adb -o $(BIN)/ts_dalu + +ts_ddnorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddnorm.adb -o $(BIN)/ts_ddnorm + +ts_tdnorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdnorm.adb -o $(BIN)/ts_tdnorm + +ts_qdnorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdnorm.adb -o $(BIN)/ts_qdnorm + +ts_pdnorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdnorm.adb -o $(BIN)/ts_pdnorm + +ts_odnorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odnorm.adb -o $(BIN)/ts_odnorm + +ts_danorm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_danorm.adb -o $(BIN)/ts_danorm + +# Test programs for Math_Lib/Polynomials : + +ts_poly: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poly.adb -o $(BIN)/ts_poly + +ts_laurpoly: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_laurpoly.adb \ + -o $(BIN)/ts_laurpoly + +ts_randpoly: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_randpoly.adb \ + -o $(BIN)/ts_randpoly + +ts_laurlist: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_laurlist.adb \ + -o $(BIN)/ts_laurlist + +ts_rpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rpol.adb -o $(BIN)/ts_rpol + +ts_ddpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddpol.adb -o $(BIN)/ts_ddpol + +ts_tdpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tdpol.adb -o $(BIN)/ts_tdpol + +ts_qdpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdpol.adb -o $(BIN)/ts_qdpol + +ts_pdpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pdpol.adb -o $(BIN)/ts_pdpol + +ts_odpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_odpol.adb -o $(BIN)/ts_odpol + +ts_dapol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddpol.adb -o $(BIN)/ts_dapol + +ts_polmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polmat.adb -o $(BIN)/ts_polmat + +ts_jaco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jaco.adb -o $(BIN)/ts_jaco + +ts_parse: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_parse.adb -o $(BIN)/ts_parse + +ts_subs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_subs.adb -o $(BIN)/ts_subs + +ts_tabform: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tabform.adb -o $(BIN)/ts_tabform + +ts_str2pol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_str2pol -o $(BIN)/ts_str2pol + +ts_termlist: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_termlist \ + -o $(BIN)/ts_termlist + +ts_rwspol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rwspol -o $(BIN)/ts_rwspol + +ts_nbrvar: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nbrvar -o $(BIN)/ts_nbrvar + +ts_hessian: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hessian -o $(BIN)/ts_hessian + +# Test programs for Math_Lib/Functions : + +ts_evaline: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evaline.adb -o $(BIN)/ts_evaline + +ts_evalpoly: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalpoly.adb \ + -o $(BIN)/ts_evalpoly + +ts_evalform: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalform.adb \ + -o $(BIN)/ts_evalform + +ts_lineva: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lineva.adb -o $(BIN)/ts_lineva + +ts_polyflat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polyflat.adb \ + -o $(BIN)/ts_polyflat + +ts_perfeval: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfeval.adb \ + -o $(BIN)/ts_perfeval + +ts_expvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_expvec.adb -o $(BIN)/ts_expvec + +ts_evddpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evddpol.adb -o $(BIN)/ts_evddpol + +# Test programs for Math_Lib/Circuits : + +ts_cffsup: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cffsup.adb -o $(BIN)/ts_cffsup + +ts_speel: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speel.adb -o $(BIN)/ts_speel + +ts_speelsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelsys.adb \ + -o $(BIN)/ts_speelsys + +ts_cycfun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cycfun.adb -o $(BIN)/ts_cycfun + +ts_vmpeval: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpeval.adb \ + -o $(BIN)/ts_vmpeval + +ts_vmpdiff: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpdiff.adb \ + -o $(BIN)/ts_vmpdiff + +ts_gradcirc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_gradcirc.adb \ + -o $(BIN)/ts_gradcirc + +ts_speelser: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelser.adb \ + -o $(BIN)/ts_speelser + +ts_speelcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_speelcnv.adb \ + -o $(BIN)/ts_speelcnv + +ts_fabry: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fabry.adb -o $(BIN)/ts_fabry + +ts_evalcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalcnv.adb -o $(BIN)/ts_evalcnv + +ts_hesscnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesscnv.adb -o $(BIN)/ts_hesscnv + +ts_jacocnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jacocnv.adb -o $(BIN)/ts_jacocnv + +ts_shiftcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_shiftcnv.adb \ + -o $(BIN)/ts_shiftcnv + +ts_perfconv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfconv.adb \ + -o $(BIN)/ts_perfconv + +ts_perfcirc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfcirc.adb \ + +ts_perfade: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfade.adb \ + -o $(BIN)/ts_perfade + +ts_perfhess: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfhess.adb \ + -o $(BIN)/ts_perfhess + +# Test programs for Math_Lib/Supports : + +ts_basex: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_basex.adb -o $(BIN)/ts_basex + +ts_feasi: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_feasi.adb -o $(BIN)/ts_feasi + +ts_enurs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_enurs.adb -o $(BIN)/ts_enurs + +ts_diclp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_diclp.adb -o $(BIN)/ts_diclp + +ts_givrot: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_givrot.adb -o $(BIN)/ts_givrot + +ts_lstvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lstvec.adb -o $(BIN)/ts_lstvec + +ts_fvector: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fvector.adb -o $(BIN)/ts_fvector + +ts_giftwrap: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_giftwrap.adb \ + -o $(BIN)/ts_giftwrap + +# Test programs for the Math_Lib/Series library : + +ts_pstrunc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pstrunc.adb -o $(BIN)/ts_pstrunc + +ts_series: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_series.adb -o $(BIN)/ts_series + +ts_series2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_series2.adb -o $(BIN)/ts_series2 + +ts_cseries: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cseries.adb -o $(BIN)/ts_cseries + +ts_bincff: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_bincff.adb -o $(BIN)/ts_bincff + +ts_servec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_servec.adb -o $(BIN)/ts_servec + +ts_servec2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_servec2.adb -o $(BIN)/ts_servec2 + +ts_cservec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cservec.adb -o $(BIN)/ts_cservec + +ts_sermat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sermat.adb -o $(BIN)/ts_sermat + +ts_sermat2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sermat2.adb -o $(BIN)/ts_sermat2 + +ts_csermat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csermat.adb -o $(BIN)/ts_csermat + +ts_seritp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_seritp.adb -o $(BIN)/ts_seritp + +ts_seritp2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_seritp2.adb -o $(BIN)/ts_seritp2 + +ts_cseritp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cseritp.adb -o $(BIN)/ts_cseritp + +ts_sersin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersin.adb -o $(BIN)/ts_sersin + +ts_sersin2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersin2.adb -o $(BIN)/ts_sersin2 + +ts_csersin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csersin.adb -o $(BIN)/ts_csersin + +ts_serlin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serlin.adb -o $(BIN)/ts_serlin + +ts_serlin2: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serlin2.adb -o $(BIN)/ts_serlin2 + +ts_cserlin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserlin.adb -o $(BIN)/ts_cserlin + +ts_perfserlin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_perfserlin.adb \ + -o $(BIN)/ts_perfserlin + +ts_serinv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serinv.adb -o $(BIN)/ts_serinv + +ts_cserinv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserinv.adb -o $(BIN)/ts_cserinv + +ts_serpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpol.adb -o $(BIN)/ts_serpol + +ts_cserpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cserpol.adb -o $(BIN)/ts_cserpol + +ts_sersys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersys.adb -o $(BIN)/ts_sersys + +ts_csersys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_csersys.adb -o $(BIN)/ts_csersys + +ts_sercffpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sercffpol.adb \ + -o $(BIN)/ts_sercffpol + +# Test programs for the Math_Lib/Laurent library : + +ts_pslaur: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pslaur.adb \ + -o $(BIN)/ts_pslaur + +ts_laurmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_laurmat.adb \ + -o $(BIN)/ts_laurmat + +ts_lserpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lserpol.adb \ + -o $(BIN)/ts_lserpol + +ts_lsernew: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lsernew.adb \ + -o $(BIN)/ts_lsernew + +# Test programs for the Math_Lib/AD library : + +ts_monom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monom.adb -o $(BIN)/ts_monom + +ts_monvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monvec.adb -o $(BIN)/ts_monvec + +ts_polvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_polvec.adb -o $(BIN)/ts_polvec + +ts_sys2vec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sys2vec.adb -o $(BIN)/ts_sys2vec + +# Test programs for the Deformations/Solutions library : + +ts_solfilt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solfilt.adb -o $(BIN)/ts_solfilt + +ts_sols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sols.adb -o $(BIN)/ts_sols + +ts_ddsols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddsols.adb -o $(BIN)/ts_ddsols + +ts_qdsols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdsols.adb -o $(BIN)/ts_qdsols + +ts_solar: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solar.adb -o $(BIN)/ts_solar + +ts_dicsols_io: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dicsols_io.adb \ + -o $(BIN)/ts_dicsols_io + +ts_mapsols_io: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mapsols_io.adb \ + -o $(BIN)/ts_mapsols_io + +ts_grepsols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_grepsols.adb \ + -o $(BIN)/ts_grepsols + +ts_selsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_selsol.adb -o $(BIN)/ts_selsol + +ts_solstr: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solstr.adb -o $(BIN)/ts_solstr + +ts_quad: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_quad.adb -o $(BIN)/ts_quad + +ts_quadpart: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_quadpart.adb \ + -o $(BIN)/ts_quadpart + +ts_contab: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_contab.adb -o $(BIN)/ts_contab + +ts_soldrop: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_soldrop.adb -o $(BIN)/ts_soldrop + +ts_ptlists: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ptlists.adb -o $(BIN)/ts_ptlists + +ts_trasols_io: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_trasols_io.adb \ + -o $(BIN)/ts_trasols_io + +ts_mixres: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixres.adb -o $(BIN)/ts_mixres + +ts_getstart: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_getstart.adb \ + -o $(BIN)/ts_getstart + +# Test programs for the Deformations/Homotopy library : + +ts_mainscal: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainscal.adb \ + -o $(BIN)/ts_mainscal + +ts_scal: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scal.adb -o $(BIN)/ts_scal + +ts_reduce: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_reduce.adb \ + -o $(BIN)/ts_reduce + +ts_homotopy: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homotopy.adb \ + -o $(BIN)/ts_homotopy + +ts_homline: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homline.adb -o $(BIN)/ts_homline + +ts_linsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_linsol.adb -o $(BIN)/ts_linsol + +ts_qdhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdhom.adb -o $(BIN)/ts_qdhom + +ts_poldrop: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poldrop.adb -o $(BIN)/ts_poldrop + +ts_evalhomt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_evalhomt.adb \ + -o $(BIN)/ts_evalhomt + +ts_vmphom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmphom.adb -o $(BIN)/ts_vmphom + +ts_scalplane: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scalplane.adb \ + -o $(BIN)/ts_scalplane + +ts_multproj: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_multproj.adb \ + -o $(BIN)/ts_multproj + +ts_homcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_homcnv.adb \ + -o $(BIN)/ts_homcnv + +# Test programs for the Deformations/Newton library : + +ts_mreseva: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mreseva.adb -o $(BIN)/ts_mreseva + +ts_rootrefi: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rootrefi.adb \ + -o $(BIN)/ts_rootrefi + +ts_newton: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newton.adb -o $(BIN)/ts_newton + +ts_realnewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_realnewt.adb \ + -o $(BIN)/ts_realnewt + +ts_numdif: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_numdif.adb -o $(BIN)/ts_numdif + +ts_jactrees: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jactrees.adb \ + -o $(BIN)/ts_jactrees + +ts_deftrees: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deftrees.adb \ + -o $(BIN)/ts_deftrees + +ts_deflate: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deflate.adb -o $(BIN)/ts_deflate + +ts_straight: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_straight.adb \ + -o $(BIN)/ts_straight + +ts_stair: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stair.adb -o $(BIN)/ts_stair + +ts_defmat: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_defmat.adb -o $(BIN)/ts_defmat + +ts_multip: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_multip.adb -o $(BIN)/ts_multip + +ts_muldef: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_muldef.adb -o $(BIN)/ts_muldef + +ts_deflop: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_deflop.adb -o $(BIN)/ts_deflop + +ts_ddnewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddnewt.adb -o $(BIN)/ts_ddnewt + +ts_qdnewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_qdnewt.adb -o $(BIN)/ts_qdnewt + +ts_vmpnewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vmpnewt.adb \ + -o $(BIN)/ts_vmpnewt + +ts_newcirc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newcirc.adb \ + -o $(BIN)/ts_newcirc + +# Test programs for the Deformations/Curves library : + +ts_durker: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_durker.adb -o $(BIN)/ts_durker + +ts_extrapol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extrapol.adb \ + -o $(BIN)/ts_extrapol + +ts_extrapts: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_extrapts.adb \ + -o $(BIN)/ts_extrapts + +ts_sernew: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sernew.adb \ + -o $(BIN)/ts_sernew + +ts_sersol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sersol.adb \ + -o $(BIN)/ts_sersol + +ts_serhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serhom.adb \ + -o $(BIN)/ts_serhom + +ts_serpred: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpred.adb \ + -o $(BIN)/ts_serpred + +ts_serpath: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpath.adb \ + -o $(BIN)/ts_serpath + +ts_serpade: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serpade.adb \ + -o $(BIN)/ts_serpade + +ts_padepred: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_padepred.adb \ + -o $(BIN)/ts_padepred + +ts_padepcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_padepcnv.adb \ + -o $(BIN)/ts_padepcnv + +ts_jacrabin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jacrabin.adb \ + -o $(BIN)/ts_jacrabin + +ts_nxtpadsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nxtpadsol.adb \ + -o $(BIN)/ts_nxtpadsol + +ts_hesscrit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesscrit.adb \ + -o $(BIN)/ts_hesscrit + +ts_hesspred: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesspred.adb \ + -o $(BIN)/ts_hesspred + +ts_hesspcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hesspcnv.adb \ + -o $(BIN)/ts_hesspcnv + +ts_predstep: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_predstep.adb \ + -o $(BIN)/ts_predstep + +ts_sernewcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sernewcnv.adb \ + -o $(BIN)/ts_sernewcnv + +ts_ratapp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ratapp.adb \ + -o $(BIN)/ts_ratapp + +ts_corcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_corcnv.adb \ + -o $(BIN)/ts_corcnv + +ts_pcscnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pcscnv.adb \ + -o $(BIN)/ts_pcscnv + +ts_scalecnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_scalecnv.adb \ + -o $(BIN)/ts_scalecnv + +ts_wrappade: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_wrappade.adb \ + -o $(BIN)/ts_wrappade + +ts_fabryhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fabryhom.adb \ + -o $(BIN)/ts_fabryhom + +# Test programs for the Deformations/End_Games library : + +ts_vlprs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_vlprs.adb -o $(BIN)/ts_vlprs + +postpoco: + gnatmake $(INCLULIBS) $(GNATFLAGS) postpoco.adb -o $(BIN)/postpoco + +valipoco: + gnatmake $(INCLULIBS) $(GNATFLAGS) valipoco.adb -o $(BIN)/valipoco + +# Test programs for the Deformations/Sweep library : + +ts_parcon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_parcon.adb -o $(BIN)/ts_parcon + +ts_realcont: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_realcont.adb \ + -o $(BIN)/ts_realcont + +# Test programs for the Deformations/Trackers library : + +ts_preco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_preco.adb -o $(BIN)/ts_preco + +ts_correct: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_correct.adb \ + -o $(BIN)/ts_correct + +ts_ortocor: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ortocor.adb \ + -o $(BIN)/ts_ortocor + +ts_path: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_path.adb -o $(BIN)/ts_path + +ts_track: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_track.adb -o $(BIN)/ts_track + +ts_nxtsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nxtsol.adb -o $(BIN)/ts_nxtsol + +# Test programs for the Deformations/Continuation library : + +ts_pactun: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pactun.adb -o $(BIN)/ts_pactun + +ts_autotune: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_autotune.adb \ + -o $(BIN)/ts_autotune + +ts_poco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_poco.adb -o $(BIN)/ts_poco + +ts_bbpoco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_bbpoco.adb \ + -o $(BIN)/ts_bbpoco + +ts_exp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_exp.adb -o $(BIN)/ts_exp + +mypoco: + gnatmake $(INCLULIBS) $(GNATFLAGS) mypoco.adb -o $(BIN)/mypoco + +# Test programs for the Root_Counts/Product homotopies library : + +ts_startsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_startsys.adb \ + -o $(BIN)/ts_startsys + +ts_permanent: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_permanent.adb \ + -o $(BIN)/ts_permanent + +ts_prodsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_prodsys.adb -o $(BIN)/ts_prodsys + +ts_mainmhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainmhom.adb \ + -o $(BIN)/ts_mainmhom + +ts_mainmuho: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainmuho.adb \ + -o $(BIN)/ts_mainmuho + +ts_mainsets: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainsets.adb \ + -o $(BIN)/ts_mainsets + +ts_strset: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strset.adb -o $(BIN)/ts_strset + +ts_strpart: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_strpart.adb -o $(BIN)/ts_strpart + +ts_permstar: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_permstar.adb \ + -o $(BIN)/ts_permstar + +ts_pivsel: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_pivsel.adb \ + -o $(BIN)/ts_pivsel + +# Test programs in the Root_Counts/Binomials library : + +ts_binsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binsys.adb -o $(BIN)/ts_binsys + +ts_kernel: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_kernel.adb -o $(BIN)/ts_kernel + +ts_binset: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binset.adb -o $(BIN)/ts_binset + +ts_incols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_incols.adb -o $(BIN)/ts_incols + +ts_monmap: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monmap.adb -o $(BIN)/ts_monmap + +ts_binsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binsol.adb -o $(BIN)/ts_binsol + +ts_affpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_affpol.adb -o $(BIN)/ts_affpol + +ts_simsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_simsys.adb -o $(BIN)/ts_simsys + +ts_simposol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_simposol.adb \ + -o $(BIN)/ts_simposol + +ts_powtrans: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_powtrans.adb \ + -o $(BIN)/ts_powtrans + +ts_binpser: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_binpser.adb \ + -o $(BIN)/ts_binpser + +ts_cspsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cspsol.adb -o $(BIN)/ts_cspsol + +ts_unimod: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unimod.adb -o $(BIN)/ts_unimod + +ts_mapsubs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mapsubs.adb -o $(BIN)/ts_mapsubs + +# Test programs for the Root_Counts/Implift library : + +ts_supports: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supports.adb \ + -o $(BIN)/ts_supports + +ts_supspan: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supspan.adb \ + -o $(BIN)/ts_supspan + +ts_transfo: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_transfo.adb \ + -o $(BIN)/ts_transfo + +ts_tropelim: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropelim.adb \ + -o $(BIN)/ts_tropelim + +ts_mainvpts: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mainvpts.adb \ + -o $(BIN)/ts_mainvpts + +ts_impvol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_impvol.adb -o $(BIN)/ts_impvol + +ts_drivimpl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivimpl.adb \ + -o $(BIN)/ts_drivimpl + +# Test programs for the Root_Counts/Stalift library : + +ts_rndcff: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rndcff.adb -o $(BIN)/ts_rndcff + +ts_supsub: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_supsub.adb -o $(BIN)/ts_supsub + +ts_conint: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_conint.adb -o $(BIN)/ts_conint + +ts_mixture: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixture.adb -o $(BIN)/ts_mixture + +ts_mixvol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixvol.adb -o $(BIN)/ts_mixvol + +ts_mixlab: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mixlab.adb -o $(BIN)/ts_mixlab + +ts_jpmix: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jpmix.adb -o $(BIN)/ts_jpmix + +ts_drivcrit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivcrit.adb \ + -o $(BIN)/ts_drivcrit + +ts_drivstal: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivstal.adb \ + -o $(BIN)/ts_drivstal + +ts_mvasta: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mvasta.adb -o $(BIN)/ts_mvasta + +ts_exptrack: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_exptrack.adb \ + -o $(BIN)/ts_exptrack + +ts_stable: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stable.adb -o $(BIN)/ts_stable + +ts_balance: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_balance.adb \ + -o $(BIN)/ts_balance + +ts_userlift: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_userlift.adb \ + -o $(BIN)/ts_userlift + +ts_demics: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_demics.adb + gnatbind ts_demics use_c2phc + gnatlink ts_demics inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_demics --LINK=$(gpp) + +# Test programs for the Root_Counts/Dynlift library : + +ts_dyntri: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dyntri.adb -o $(BIN)/ts_dyntri + +ts_drivmink: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivmink.adb \ + -o $(BIN)/ts_drivmink + +ts_drivdynl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivdynl.adb \ + -o $(BIN)/ts_drivdynl + +# Test programs for the Root_Counts/Symmetry library : + +ts_group: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_group.adb -o $(BIN)/ts_group + +ts_equpol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_equpol.adb -o $(BIN)/ts_equpol + +ts_drivsss: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_drivsss.adb -o $(BIN)/ts_drivsss + +# Test programs for the Root_Counts/MixedVol library : + +ts_convsub: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_convsub.adb -o $(BIN)/ts_convsub + +ts_mv2c: + gcc -c $(PHCAda)/Root_Counts/MixedVol/mv1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/cell_stack1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/form_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/index_tree_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/zero_index_tree1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/one_level_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/mixed_volume1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/relation_table1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/prepare_for_mv1.c + gnatmake -o $(BIN)/ts_mv2c $(INCLULIBS) $(GNATOPTFLAGS) ts_mv2c.adb \ + -largs mv1.o cell_stack1.o form_lp1.o index_tree_lp1.o \ + zero_index_tree1.o one_level_lp1.o mixed_volume1.o \ + relation_table1.o prepare_for_mv1.o -lm + +ts_mv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mv.adb -o $(BIN)/ts_mv + +ts_mva: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mva.adb -o $(BIN)/ts_mva + +# Test programs for the Root_Counts/DEMiCs library : + +ts_calldemics: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_calldemics.adb \ + -o $(BIN)/ts_calldemics + +DEMiCs_CFLAGS = -O3 -DNDEBUG + +inputData.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp + +iTest.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp + +fTest.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp + +simplex.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp + +reltab.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp + +mvc.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp + +main.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/main.cpp + +demics_objects = inputData.o iTest.o fTest.o simplex.o reltab.o mvc.o main.o + +demics: $(demics_objects) + $(gpp) -o $(BIN)/demics $(DEMiCs_CFLAGS) $(demics_objects) -lm + +ts_inputData: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp + $(gpp) $(DEMiCs_CFLAGS) -c \ + $(PHCAda)/Root_Counts/DEMiCs/ts_inputData.cpp + $(gpp) -o $(BIN)/ts_inputData $(DEMiCs_CFLAGS) ts_inputData.o \ + inputData.o -lm + +ts_outdata: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_outdata.adb \ + -o $(BIN)/ts_outdata + +ts_outputData: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + $(gpp) -O2 -Dcompilewgpp=1 \ + -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp + $(gpp) -O2 -Dcompilewgpp=1 \ + -c $(PHCAda)/Root_Counts/DEMiCs/ts_outputData.cpp + gnatbind -n use_c2phc + gnatlink -C use_c2phc ts_outputData.o outputData.o \ + -o $(BIN)/ts_outputData -lm --LINK=$(gpp) + +outputData.o: + $(gpp) -O2 -Dcompilewgpp=1 \ + -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp + +simplex4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o + +mvc4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o + +demicsrun4phc.o: + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o + +demicsrun.o: + $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp + +ts_demicsrun: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_demicsrun.adb \ + -o ts_demicsrun.o + gnatbind ts_demicsrun use_c2phc + gnatlink ts_demicsrun inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_demicsrun --LINK=$(gpp) + +# Test programs for the Root_Counts/Puiseux library : + +ts_degcurve: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_degcurve.adb \ + -o $(BIN)/ts_degcurve + +ts_puiseux: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_puiseux.adb \ + -o $(BIN)/ts_puiseux + +# Test programs for SAGBI library in numerical Schubert calculus : + +ts_subsets: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_subsets.adb -o $(BIN)/ts_subsets + +ts_brackets: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackets.adb \ + -o $(BIN)/ts_brackets + +ts_brackmons: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackmons.adb \ + -o $(BIN)/ts_brackmons + +ts_brackpols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_brackpols.adb \ + -o $(BIN)/ts_brackpols + +ts_straighten: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_straighten.adb \ + -o $(BIN)/ts_straighten + +ts_expand: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_expand.adb -o $(BIN)/ts_expand + +ts_local: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_local.adb -o $(BIN)/ts_local + +ts_mathom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mathom.adb -o $(BIN)/ts_mathom + +ts_cheby: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cheby.adb -o $(BIN)/ts_cheby + +ts_shapiro: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_shapiro.adb \ + -o $(BIN)/ts_shapiro + +ts_eremenko: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_eremenko.adb \ + -o $(BIN)/ts_eremenko + +ts_detrock: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_detrock.adb -o $(BIN)/ts_detrock + +ts_sagbi: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sagbi.adb -o $(BIN)/ts_sagbi + +ts_topos: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_topos.adb -o $(BIN)/ts_topos + +# Test programs for Pieri library in numerical Schubert calculus : + +ts_org_pieri: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_org_pieri.adb \ + -o $(BIN)/ts_org_pieri + +ts_canocurv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_canocurv.adb \ + -o $(BIN)/ts_canocurv + +ts_matinv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_matinv.adb -o $(BIN)/ts_matinv + +ts_pieri: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pieri.adb -o $(BIN)/ts_pieri + +ts_posets: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_posets.adb -o $(BIN)/ts_posets + +ts_detsys: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_detsys.adb -o $(BIN)/ts_detsys + +ts_defpos: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_defpos.adb -o $(BIN)/ts_defpos + +ts_piroco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_piroco.adb -o $(BIN)/ts_piroco + +# Test programs for Induction library in numerical Schubert calculus : + +ts_checkers: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_checkers.adb \ + -o $(BIN)/ts_checkers + +ts_induce: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_induce.adb -o $(BIN)/ts_induce + +ts_flagcond: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_flagcond.adb \ + -o $(BIN)/ts_flagcond + +ts_lrhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_lrhom.adb -o $(BIN)/ts_lrhom + +# Test programs for the evaluators : + +ts_cyclic7: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_cyclic7.adb + gnatbl -o $(BIN)/ts_cyclic7 ts_cyclic7.ali + +solve_cyclic7: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) solve_cyclic7.adb + gnatbl -o $(BIN)/solve_cyclic7 solve_cyclic7.ali + +# Test programs for the Components/Samplers library : + +ts_roots: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_roots.adb -o $(BIN)/ts_roots + +ts_hypsam: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypsam.adb -o $(BIN)/ts_hypsam + +ts_hyprts: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hyprts.adb -o $(BIN)/ts_hyprts + +ts_hyppts: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hyppts.adb -o $(BIN)/ts_hyppts + +ts_unisam: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unisam.adb -o $(BIN)/ts_unisam + +ts_planes: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_planes.adb -o $(BIN)/ts_planes + +ts_flag: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_flag.adb -o $(BIN)/ts_flag + +ts_coords: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_coords.adb -o $(BIN)/ts_coords + +ts_itrack: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_itrack.adb -o $(BIN)/ts_itrack + +ts_ispan: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ispan.adb -o $(BIN)/ts_ispan + +ts_inewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_inewt.adb -o $(BIN)/ts_inewt + +ts_iddnewt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_iddnewt.adb \ + -o $(BIN)/ts_iddnewt + +ts_iwset: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_iwset.adb -o $(BIN)/ts_iwset + +ts_ilocal: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ilocal.adb -o $(BIN)/ts_ilocal + +ts_sampar: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sampar.adb -o $(BIN)/ts_sampar + +ts_sample: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_sample.adb -o $(BIN)/ts_sample + +ts_mulsam: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mulsam.adb -o $(BIN)/ts_mulsam + +ts_mulhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mulhom.adb -o $(BIN)/ts_mulhom + +ts_endgm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_endgm.adb -o $(BIN)/ts_endgm + +ts_locdim: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_locdim.adb -o $(BIN)/ts_locdim + +ts_ddqdsam: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ddqdsam.adb -o $(BIN)/ts_ddqdsam + +# Test programs for the Components/Interpolators libary : + +ts_stpolin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_stpolin.adb \ + -o $(BIN)/ts_stpolin + +ts_mupolin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mupolin.adb \ + -o $(BIN)/ts_mupolin + +ts_adpolin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_adpolin.adb \ + -o $(BIN)/ts_adpolin + +ts_project: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_project.adb -o $(BIN)/ts_project + +ts_span: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_span.adb -o $(BIN)/ts_span + +ts_filter: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filter.adb -o $(BIN)/ts_filter + +ts_nbterms: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_nbterms.adb -o $(BIN)/ts_nbterms + +ts_divdif: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_divdif.adb -o $(BIN)/ts_divdif + +ts_dvdexp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dvdexp.adb -o $(BIN)/ts_dvdexp + +ts_newint: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newint.adb -o $(BIN)/ts_newint + +ts_powtrc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_powtrc.adb -o $(BIN)/ts_powtrc + +ts_traces: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_traces.adb -o $(BIN)/ts_traces + +ts_trapol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_trapol.adb -o $(BIN)/ts_trapol + +ts_rewrite: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rewrite.adb -o $(BIN)/ts_rewrite + +ts_elim: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_elim.adb -o $(BIN)/ts_elim + +ts_embed: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_embed.adb -o $(BIN)/ts_embed + +ts_square: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_square.adb -o $(BIN)/ts_square + +ts_squemb: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_squemb.adb -o $(BIN)/ts_squemb + +# Test programs in the Components/Factorization library : + +ts_rwpoly: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_rwpoly.adb -o $(BIN)/ts_rwpoly + +ts_irco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_irco.adb -o $(BIN)/ts_irco + +ts_combfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_combfac.adb -o $(BIN)/ts_combfac + +ts_newfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_newfac.adb -o $(BIN)/ts_newfac + +ts_factor: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_factor.adb -o $(BIN)/ts_factor + +ts_ifactor: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ifactor.adb -o $(BIN)/ts_ifactor + +ts_hypfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypfac.adb -o $(BIN)/ts_hypfac + +ts_monfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_monfac.adb -o $(BIN)/ts_monfac + +ts_serwit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_serwit.adb -o $(BIN)/ts_serwit + +# Test programs in the Components/Decomposition library : + +ts_irdeco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_irdeco.adb -o $(BIN)/ts_irdeco + +ts_breakup: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_breakup.adb -o $(BIN)/ts_breakup + +ts_cascade: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cascade.adb -o $(BIN)/ts_cascade + +ts_intcas: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intcas.adb -o $(BIN)/ts_intcas + +ts_intdia: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intdia.adb -o $(BIN)/ts_intdia + +ts_reorder: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_reorder.adb -o $(BIN)/ts_reorder + +ts_filfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filfac.adb -o $(BIN)/ts_filfac + +ts_squeeze: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_squeeze.adb -o $(BIN)/ts_squeeze + +ts_dimred: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_dimred.adb -o $(BIN)/ts_dimred + +ts_mbthom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mbthom.adb -o $(BIN)/ts_mbthom + +ts_diahom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_diahom.adb -o $(BIN)/ts_diahom + +ts_fillit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_fillit.adb -o $(BIN)/ts_fillit + +ts_jmpdia: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jmpdia.adb -o $(BIN)/ts_jmpdia + +ts_witsols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_witsols.adb -o $(BIN)/ts_witsols + +# Test programs in the Components/Solver library : + +ts_hypwit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_hypwit.adb \ + -o $(BIN)/ts_hypwit + +ts_solver: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solver.adb \ + -o $(BIN)/ts_solver + +ts_rdisol: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_rdisol.adb \ + -o $(BIN)/ts_rdisol + +testnine: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) testnine.adb + gnatbl -o $(BIN)/testnine testnine.ali + +# Test programs in the Components/Tropical library : + +ts_tropawit: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropawit.adb \ + -o $(BIN)/ts_tropawit + +ts_tropisms: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tropisms.adb \ + -o $(BIN)/ts_tropisms + +ts_inform: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_inform.adb -o $(BIN)/ts_inform + +ts_comfac: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_comfac.adb -o $(BIN)/ts_comfac + +ts_intorto: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_intorto.adb \ + -o $(BIN)/ts_intorto + +ts_convhull: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_convhull.adb \ + -o $(BIN)/ts_convhull + +ts_ptlstr: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_ptlstr.adb \ + -o $(BIN)/ts_ptlstr + +ts_pretrop: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pretrop.adb \ + -o $(BIN)/ts_pretrop + +# test programs for CtoPHC/Funky directory : + +ts_arrays: + gnatmake -o $(BIN)/ts_arrays $(INCLULIBS) $(GNATFLAGS) ts_arrays.adb + +pass_poly: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) print_poly.adb + gcc -c $(PHCAda)/CtoPHC/Funky/pass_poly.c + gnatbind -n print_poly + gnatlink -C print_poly pass_poly.o -o $(BIN)/pass_poly + +ts_cosup: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cosup.adb -o $(BIN)/ts_cosup + +ts_cosupoly: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) cosupoly.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_cosupoly.c + gnatbind -n cosupoly + gnatlink -C cosupoly ts_cosupoly.o -o $(BIN)/ts_cosupoly + +ts_cosupsys: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) cosupsys.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_cosupsys.c + gnatbind -n cosupsys + gnatlink -C cosupsys ts_cosupsys.o -o $(BIN)/ts_cosupsys + +cosupoly_to_c.o: + gcc -c $(PHCAda)/CtoPHC/Funky/cosupoly_to_c.c + +cosupsys_to_c.o: + gcc -c $(PHCAda)/CtoPHC/Funky/cosupsys_to_c.c + +ts_cosuptoc: cosupoly_to_c.o cosupsys_to_c.o + gnatmake -o $(BIN)/ts_cosuptoc $(INCLULIBS) $(GNATFLAGS) \ + ts_cosuptoc.adb -largs cosupoly_to_c.o cosupsys_to_c.o + +ts_getsys: + gcc -c $(PHCAda)/CtoPHC/Funky/getsys2.c + gcc -c $(PHCAda)/CtoPHC/Funky/ts_getsys.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) getsys1.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) getsys3.adb + gnatbind -n getsys1 getsys3 + gnatlink -C getsys3 ts_getsys.o getsys2.o -o $(BIN)/ts_getsys + +ts_phc_sys_rw: + gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_sys_rw.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_sys_rw.adb + gnatbind -n phc_sys_rw + gnatlink -C phc_sys_rw ts_phc_sys_rw.o -o $(BIN)/ts_phc_sys_rw + +ts_phc_sol_rw: + gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_sol_rw.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_sol_rw.adb + gnatbind -n phc_sol_rw + gnatlink -C phc_sol_rw ts_phc_sol_rw.o -o $(BIN)/ts_phc_sol_rw + +ts_cpm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpm.adb -o $(BIN)/ts_cpm + +ts_pieri_count: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_root_count.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_pieri_count.c + gnatbind -n pieri_root_count + gnatlink -C pieri_root_count ts_pieri_count.o -o $(BIN)/ts_pieri_count + +ts_pieri_solver: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_pieri_solver.c + gcc -c $(PHCAda)/CtoPHC/Funky/pieri_sols.c + gnatbind -n pieri_solver + gnatlink -C pieri_solver ts_pieri_solver.o pieri_sols.o \ + -o $(BIN)/ts_pieri_solver -lm + +ts_phc_solver: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) phc_solver.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_phc_solver.c + gcc -c $(PHCAda)/CtoPHC/Funky/phc_sols.c + gnatbind -n phc_solver + gnatlink -C phc_solver ts_phc_solver.o phc_sols.o \ + -o $(BIN)/ts_phc_solver + +ts_csols: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_csols.adb -o $(BIN)/ts_csols + +# test programs for the CtoPHC/State directory : + +ts_filman: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_filman.adb -o $(BIN)/ts_filman + +ts_solcon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solcon.adb -o $(BIN)/ts_solcon + +ts_solpool: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_solpool.adb -o $(BIN)/ts_solpool + +ts_use_solcon: + gcc -c $(PHCAda)/CtoPHC/State/ts_use_solcon.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solcon.adb + gnatbind -n use_solcon + gnatlink -C use_solcon ts_use_solcon.o -o $(BIN)/ts_use_solcon + +ts_use_solpool: + gcc -c $(PHCAda)/CtoPHC/State/ts_use_solpool.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solpool.adb + gnatbind -n use_solpool + gnatlink -C use_solpool ts_use_solpool.o -o $(BIN)/ts_use_solpool + +ts_syscon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syscon.adb -o $(BIN)/ts_syscon + +ts_syspool: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_syspool.adb -o $(BIN)/ts_syspool + +ts_use_syscon: + gcc -c $(PHCAda)/CtoPHC/State/ts_use_syscon.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syscon.adb + gnatbind -n use_syscon + gnatlink -C use_syscon ts_use_syscon.o -o $(BIN)/ts_use_syscon + +ts_use_syspool: + gcc -c $(PHCAda)/CtoPHC/State/ts_use_syspool.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syspool.adb + gnatbind -n use_syspool + gnatlink -C use_syspool ts_use_syspool.o -o $(BIN)/ts_use_syspool + +ts_c2phc: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) c_to_phcpack.adb + gcc -c $(PHCAda)/CtoPHC/State/ts_c2phc.c + gnatbind -n c_to_phcpack + gnatlink -C c_to_phcpack ts_c2phc.o -o $(BIN)/ts_c2phc + +ts_c2str: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCAda)/CtoPHC/State/ts_c2str.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc ts_c2str.o \ + inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_c2str --LINK=$(gpp) + +ts_use_c2phc: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2phc.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc ts_use_c2phc.o \ + inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_use_c2phc --LINK=$(gpp) + +ts_pirhom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pirhom.adb -o $(BIN)/ts_pirhom + +ts_use_c2pieri: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb + gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2pieri.c + gnatbind -n use_c2pieri + gnatlink -C use_c2pieri ts_use_c2pieri.o -o $(BIN)/ts_use_c2pieri + +ts_use_c2fac: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2fac.adb + gcc -c $(PHCAda)/CtoPHC/State/ts_use_c2fac.c + gnatbind -n use_c2fac + gnatlink -C use_c2fac ts_use_c2fac.o -o $(BIN)/ts_use_c2fac + +ts_celcon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_celcon.adb -o $(BIN)/ts_celcon + +ts_use_celcon: + gcc -c $(PHCAda)/CtoPHC/State/ts_use_celcon.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_celcon.adb + gnatbind -n use_celcon + gnatlink -C use_celcon ts_use_celcon.o -o $(BIN)/ts_use_celcon + +ts_unisolve: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_unisolve.adb \ + -o $(BIN)/ts_unisolve + +ts_use_giftwrap: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_use_giftwrap.adb \ + -o $(BIN)/ts_use_giftwrap + +ts_giftwcon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_giftwcon.adb \ + -o $(BIN)/ts_giftwcon + +ts_use_sweep: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_use_sweep.adb \ + -o $(BIN)/ts_use_sweep + +ts_runtrack: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_runtrack.adb \ + -o $(BIN)/ts_runtrack + +# files in feedback : + +lib.a:$(PHCAda)/../Feedback/*.c $(PHCAda)/../Feedback/*.h + gcc -c $(PHCAda)/../Feedback/*.c + ar ruv lib.a dc_interpolation.o dcmplx.o poly_matrix.o\ + append_dcmatrix.o dc_inverse.o pieri_sols.o poly_smith.o\ + c2ada_dc_matrix.o dc_matrix.o poly_dcmplx.o realization.o\ + c2ada_poly_matrix.o dc_roots.o poly_gcd.o ts_feedback.o\ + poly_hermite.o append_polymatrix.o timer.o + ranlib lib.a + +ts_feedback: lib.a get_clock.o get_clocks_per_sec.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gnatbind -n pieri_solver + gnatlink -C pieri_solver lib.a \ + -o $(BIN)/ts_feedback -lm \ + get_clock.o get_clocks_per_sec.o + +feedback.o: + gcc -c $(PHCAda)/../Feedback/feedback.c + +# Test program to test the C interface to GPU acceleration : + +ts_cpu2norm_d: + gcc -c $(PHCAda)/PHCtoC/cpu2norm_d_in_c.c -o cpu2norm_d_in_c.o + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_d.adb \ + -o $(BIN)/ts_cpu2norm_d -largs cpu2norm_d_in_c.o -lm + +ts_cpu2norm_dd: + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/PHCtoC/cpu2norm_dd_in_c.c \ + -o cpu2norm_dd_in_c.o + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_dd.adb \ + -o $(BIN)/ts_cpu2norm_dd \ + -largs double_double.o cpu2norm_dd_in_c.o -lm + +ts_cpu2norm_qd: + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/PHCtoC/cpu2norm_qd_in_c.c \ + -o cpu2norm_qd_in_c.o + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_cpu2norm_qd.adb \ + -o $(BIN)/ts_cpu2norm_qd \ + -largs double_double.o quad_double.o cpu2norm_qd_in_c.o -lm + +ts_cpu2norm: + gcc -c $(PHCAda)/PHCtoC/cpu2norm_d_in_c.c -o cpu2norm_d_in_c.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/PHCtoC/cpu2norm_dd_in_c.c \ + -o cpu2norm_dd_in_c.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/PHCtoC/cpu2norm_qd_in_c.c \ + -o cpu2norm_qd_in_c.o + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_cpu2norm.adb \ + -o $(BIN)/ts_cpu2norm -largs cpu2norm_d_in_c.o \ + double_double.o cpu2norm_dd_in_c.o \ + quad_double.o cpu2norm_qd_in_c.o -lm + +ts_gpu2norm_d_in_c: + @-echo ">>> compiling kernels ..." + nvcc --define-macro precision=d -I$(PHCgpu)/DefineTypesD \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ + -o norm_kernels.o + @-echo ">>> compiling code for execution on the host ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o + @-echo ">>> compiling the caller function ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o + @-echo ">>> compiling the main C program ..." + gcc -c $(PHCAda)/PHCtoC/ts_gpu2norm_d_in_c.c -o ts_gpu2norm_d_in_c.o + @-echo ">>> linking ..." + $(gpp) norm_host.o norm_kernels.o gpu2norm_d.o ts_gpu2norm_d_in_c.o \ + -o $(BIN)/ts_gpu2norm_d_in_c -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib + +ts_gpu2norm_d: + @-echo ">>> compiling kernels ..." + nvcc --define-macro precision=d -I$(PHCgpu)/DefineTypesD \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ + -o norm_kernels.o + @-echo ">>> compiling code for execution on the host ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o + @-echo ">>> compiling the caller function ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o + @-echo ">>> compiling and binding the main Ada program ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_d.adb \ + -o ts_gpu2norm_d.o + gnatbind ts_gpu2norm_d + @-echo ">>> linking ..." + gnatlink -o $(BIN)/ts_gpu2norm_d ts_gpu2norm_d \ + norm_host.o norm_kernels.o gpu2norm_d.o -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpu2norm_dd: + @-echo ">>> compiling kernels ..." + nvcc --define-macro precision=dd -I$(PHCgpu)/DefineTypesDD \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ + -o norm_kernels.o + @-echo ">>> compiling code for execution on the host ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o + @-echo ">>> compiling the caller function ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ + -I$(PHCAda)/Math_Lib/QD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_dd.cpp -o gpu2norm_dd.o + @-echo ">>> compiling main Ada program ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_dd.adb \ + -o ts_gpu2norm_dd.o + gnatbind ts_gpu2norm_dd + @-echo ">>> linking ..." + gnatlink -o $(BIN)/ts_gpu2norm_dd ts_gpu2norm_dd \ + norm_host.o norm_kernels.o gpu2norm_dd.o -lm \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -L$(PHCAda)/Math_Lib/QD --LINK=$(gpp) + +ts_gpu2norm_qd: + @-echo ">>> compiling kernels ..." + nvcc --define-macro precision=qd -I$(PHCgpu)/DefineTypesQD \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_kernels.cu --ptxas-options=-v \ + -o norm_kernels.o + @-echo ">>> compiling code for execution on the host ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host.o + @-echo ">>> compiling the caller function ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ + -I$(PHCAda)/Math_Lib/QD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_qd.cpp -o gpu2norm_qd.o + @-echo ">>> compiling main Ada program ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm_qd.adb \ + -o ts_gpu2norm_qd.o + gnatbind ts_gpu2norm_qd + @-echo ">>> linking ..." + gnatlink -o $(BIN)/ts_gpu2norm_qd ts_gpu2norm_qd \ + norm_host.o norm_kernels.o gpu2norm_qd.o -lm \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -L$(PHCAda)/Math_Lib/QD --LINK=$(gpp) + +ts_gpu2norm: + @-echo ">>> compiling kernels for all precisions ..." + nvcc -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/all_norm_kernels.cu \ + -o all_norm_kernels.o + @-echo ">>> compiling host code in double precision ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_d.o + @-echo ">>> compiling host code in double double precision ..." + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/double_double.c -o double_double.o + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_dd.o + @-echo ">>> compiling host code in quad double precision ..." + gcc -I $(PHCAda)/Math_Lib/QD \ + -c $(PHCAda)/Math_Lib/QD/quad_double.c -o quad_double.o + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/MGS2/norm_host.cpp -o norm_host_qd.o + @-echo ">>> compiling the caller in double precision ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_d.cpp -o gpu2norm_d.o + @-echo ">>> compiling the caller in double double precision ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesDD \ + -I$(PHCAda)/Math_Lib/QD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_dd.cpp -o gpu2norm_dd.o + @-echo ">>> compiling the caller in quad double precision ..." + $(gpp) -I$(PHCgpu)/MGS2 -I$(PHCgpu)/MGS2/DefineTypesQD \ + -I$(PHCAda)/Math_Lib/QD \ + -I$(QD_ROOT)/include -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCAda)/PHCtoC/gpu2norm_qd.cpp -o gpu2norm_qd.o + @-echo ">>> compiling and binding the main Ada program ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpu2norm.adb \ + -o ts_gpu2norm.o + gnatbind ts_gpu2norm + @-echo ">>> linking ..." + gnatlink -o $(BIN)/ts_gpu2norm ts_gpu2norm \ + all_norm_kernels.o norm_host_d.o gpu2norm_d.o \ + double_double.o norm_host_dd.o gpu2norm_dd.o \ + quad_double.o norm_host_qd.o gpu2norm_qd.o -lm \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +utilities_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_d.o + +utilities_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_dd.o +utilities_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/utilities.cpp -o utilities_qd.o + +poly_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_d.o + +poly_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_dd.o + +poly_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/poly.cpp -o poly_qd.o + +polysol_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_d.o + +polysol_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_dd.o + +polysol_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Poly/polysol.cpp -o polysol_qd.o + +workspace_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ + -o workspace_host_d.o + +workspace_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ + -o workspace_host_dd.o + +workspace_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -c $(PHCgpu)/Path/Path_CPU/workspace_host.cpp \ + -o workspace_host_qd.o + +eval_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ + -o eval_host_d.o + +eval_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ + -o eval_host_dd.o + +eval_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/eval_host.cpp \ + -o eval_host_qd.o + +mgs_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ + -o mgs_host_d.o + +mgs_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ + -o mgs_host_dd.o + +mgs_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/mgs_host.cpp \ + -o mgs_host_qd.o + +newton_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ + -o newton_host_d.o + +newton_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ + -o newton_host_dd.o + +newton_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/newton_host.cpp \ + -o newton_host_qd.o + +ada_test.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ + -c $(PHCgpu)/Path/Main/ada_test.cpp -o ada_test.o + +ada_test_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ + -c $(PHCgpu)/Path/Main/ada_test_dd.cpp -o ada_test_dd.o + +ada_test_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCLib) -I$(PHCgpu)/Path/Poly \ + -c $(PHCgpu)/Path/Main/ada_test_qd.cpp -o ada_test_qd.o + +gqd_qd_util.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCLib) -I$(PHCgpu)/Path/Complex -I$(GQD_HOME)/inc \ + -I/usr/local/cuda/include \ + -c $(PHCgpu)/Path/Complex/gqd_qd_util.cpp -o gqd_qd_util.o + +gpunewton_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_d.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpunewton_d.o + +gpunewton_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_dd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpunewton_dd.o + +gpunewton_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpunewton_qd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpunewton_qd.o + +path_gpu_d.o: + @-echo ">>> compiling kernels ..." + nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cd \ + -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Complex \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -o path_gpu_d.o \ + -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v + +path_gpu_dd.o: + @-echo ">>> compiling kernels ..." + nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cdd \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Complex \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -o path_gpu_dd.o \ + -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v + +path_gpu_qd.o: + @-echo ">>> compiling kernels ..." + nvcc -O2 -Xcompiler -fPIC --define-macro path_precision=cqd \ + -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Complex \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -o path_gpu_qd.o \ + -c $(PHCgpu)/Path/Path_GPU/path_gpu.cu --ptxas-options=-v + +ts_gpunewton: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + gqd_qd_util.o path_gpu_d.o gpunewton_d.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton.adb \ + -o ts_gpunewton.o + gnatbind ts_gpunewton use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpunewton \ + gpunewton_d.o syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ + path_gpu_d.o \ + -o $(BIN)/ts_gpunewton -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpunewton_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ + ada_test_dd.o path_gpu_dd.o gpunewton_dd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton_dd.adb \ + -o ts_gpunewton.o + gnatbind ts_gpunewton_dd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpunewton_dd \ + gpunewton_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ + path_gpu_dd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpunewton_dd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpunewton_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ + ada_test_qd.o path_gpu_qd.o gpunewton_qd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpunewton_qd.adb \ + -o ts_gpunewton_qd.o + gnatbind ts_gpunewton_qd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpunewton_qd \ + gpunewton_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ + path_gpu_qd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpunewton_qd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +predictor_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ + -o predictor_host_d.o + +predictor_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ + -o predictor_host_dd.o + +predictor_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/predictor_host.cpp \ + -o predictor_host_qd.o + +path_host_d.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ + -o path_host_d.o + +path_host_dd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesDD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ + -o path_host_dd.o + +path_host_qd.o: + $(gpp) -O2 -fPIC -I$(PHCgpu)/Path/DefineTypesQD -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Path_CPU/path_host.cpp \ + -o path_host_qd.o + +gpuonepath_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_d.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpuonepath_d.o + +gpuonepath_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_dd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpuonepath_dd.o + +gpuonepath_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpuonepath_qd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpuonepath_qd.o + +ts_gpuonepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + gqd_qd_util.o path_gpu_d.o predictor_host_d.o path_host_d.o \ + gpuonepath_d.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_d.adb \ + -o ts_gpuonepath_d.o + gnatbind ts_gpuonepath_d use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpuonepath_d \ + gpuonepath_d.o syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ + path_gpu_d.o predictor_host_d.o path_host_d.o \ + -o $(BIN)/ts_gpuonepath_d -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpuonepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o \ + path_host_dd.o gpuonepath_dd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_dd.adb \ + -o ts_gpuonepath_dd.o + gnatbind ts_gpuonepath_dd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpuonepath_dd \ + gpuonepath_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ + path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpuonepath_dd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpuonepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o \ + path_host_qd.o gpuonepath_qd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpuonepath_qd.adb \ + -o ts_gpuonepath_qd.o + gnatbind ts_gpuonepath_qd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpuonepath_qd \ + gpuonepath_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ + path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpuonepath_qd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +err_check_d.o: + $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Main/err_check.cpp \ + -o err_check_d.o + +path_data_d.o: + $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Main/path_data.cpp \ + -o path_data_d.o + +path_test_d.o: + $(gpp) -O2 -I$(PHCgpu)/Path/DefineTypesD -I$(QD_ROOT)/include \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Path_CPU -I$(PHCgpu)/Path/Path_GPU \ + -I$(PHCgpu)/Path/Main \ + -c $(PHCgpu)/Path/Main/path_test.cpp \ + -o path_test_d.o + +gpumanypaths_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_d.cpp -I$(PHCLib) \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpumanypaths_d.o + +gpumanypaths_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_dd.cpp -I$(PHCLib) \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpumanypaths_dd.o + +gpumanypaths_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/gpumanypaths_qd.cpp -I$(PHCLib) \ + -I$(GQD_HOME)/inc -I$(SDK_HOME)/C/common/inc \ + -I/usr/local/cuda/include \ + -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -I$(PHCgpu)/Path/Path_GPU \ + -o gpumanypaths_qd.o + +ts_gpumanypaths_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + gqd_qd_util.o path_gpu_d.o predictor_host_d.o \ + path_host_d.o gpumanypaths_d.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_d.adb \ + -o ts_gpumanypaths_d.o + gnatbind ts_gpumanypaths_d use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpumanypaths_d \ + gpumanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ + path_gpu_d.o predictor_host_d.o path_host_d.o \ + -o $(BIN)/ts_gpumanypaths_d -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpumanypaths_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o \ + path_host_dd.o gpumanypaths_dd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_dd.adb \ + -o ts_gpumanypaths_dd.o + gnatbind ts_gpumanypaths_dd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpumanypaths_dd \ + gpumanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ + path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpumanypaths_dd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpumanypaths_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o \ + path_host_qd.o gpumanypaths_qd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpumanypaths_qd.adb \ + -o ts_gpumanypaths_qd.o + gnatbind ts_gpumanypaths_qd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpumanypaths_qd \ + gpumanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ + path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpumanypaths_qd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpupath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + gqd_qd_util.o path_gpu_d.o predictor_host_d.o \ + path_host_d.o gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_d.adb \ + -o ts_gpupath_d.o + gnatbind ts_gpupath_d use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpupath_d gpunewton_d.o gpuonepath_d.o \ + gpumanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o gqd_qd_util.o \ + path_gpu_d.o predictor_host_d.o path_host_d.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_gpupath_d -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpupath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + gqd_qd_util.o path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ + gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_dd.adb \ + -o ts_gpupath_dd.o + gnatbind ts_gpupath_dd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpupath_dd gpunewton_dd.o gpuonepath_dd.o \ + gpumanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o gqd_qd_util.o \ + path_gpu_dd.o predictor_host_dd.o path_host_dd.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpupath_dd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +ts_gpupath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + gqd_qd_util.o path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ + gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_gpupath_qd.adb \ + -o ts_gpupath_qd.o + gnatbind ts_gpupath_qd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_gpupath_qd gpunewton_qd.o gpuonepath_qd.o \ + gpumanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o gqd_qd_util.o \ + path_gpu_qd.o predictor_host_qd.o path_host_qd.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_gpupath_qd -lm \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + --LINK=$(gpp) + +adenewton_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_d.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adenewton_d.o +adenewton_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_dd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adenewton_dd.o +adenewton_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adenewton_qd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adenewton_qd.o + +adeonepath_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_d.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adeonepath_d.o +adeonepath_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_dd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesDD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adeonepath_dd.o +adeonepath_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/adeonepath_qd.cpp -I$(PHCLib) \ + -I $(PHCgpu)/Path/DefineTypesQD -I $(PHCgpu)/Path/Main \ + -I $(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o adeonepath_qd.o + +ademanypaths_d.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_d.cpp -I$(PHCLib) \ + -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o ademanypaths_d.o +ademanypaths_dd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_dd.cpp -I$(PHCLib) \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o ademanypaths_dd.o +ademanypaths_qd.o: + $(gpp) -O2 -fPIC -c $(PHCAda)/PHCtoC/ademanypaths_qd.cpp -I$(PHCLib) \ + -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Main \ + -I$(PHCgpu)/Path/Poly -I$(PHCgpu)/Path/Path_CPU \ + -o ademanypaths_qd.o + +ts_adepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o \ + path_host_d.o adenewton_d.o adeonepath_d.o ademanypaths_d.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_d.adb \ + -o ts_adepath_d.o + gnatbind ts_adepath_d use_c2phc + @-echo ">>> linking ..." + gnatlink ts_adepath_d adenewton_d.o adeonepath_d.o \ + ademanypaths_d.o syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o \ + predictor_host_d.o path_host_d.o \ + -o $(BIN)/ts_adepath_d -lm --LINK=$(gpp) + +ts_adepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + predictor_host_dd.o path_host_dd.o \ + adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_dd.adb \ + -o ts_adepath_dd.o + gnatbind ts_adepath_dd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_adepath_dd adenewton_dd.o adeonepath_dd.o \ + ademanypaths_dd.o syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ + predictor_host_dd.o path_host_dd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_adepath_dd -lm --LINK=$(gpp) + +ts_adepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + predictor_host_qd.o path_host_qd.o \ + adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_adepath_qd.adb \ + -o ts_adepath_qd.o + gnatbind ts_adepath_qd use_c2phc + @-echo ">>> linking ..." + gnatlink ts_adepath_qd adenewton_qd.o adeonepath_qd.o \ + ademanypaths_qd.o syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ + predictor_host_qd.o path_host_qd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_adepath_qd -lm --LINK=$(gpp) + +parameter.o: + $(gpp) -O3 -fPIC -I$(PHCgpu)/Path/Host2 \ + -c $(PHCgpu)/Path/Host2/parameter.cpp -o parameter.o + +lib2path_d.o: + $(gpp) -O3 -fPIC -I$(PHCLib) \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ + -I$(PHCgpu)/Path/Host2 \ + -c $(PHCgpu)/Path/Host2/lib2path_d.cpp -o lib2path_d.o + +lib2path.o: + $(gpp) -O3 -fPIC -I$(PHCLib) -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ + -I$(PHCgpu)/Path/Host2 \ + -c $(PHCgpu)/Path/Host2/lib2path.cpp -o lib2path.o + +ademanypaths.o: + $(gpp) -O2 -I$(PHCLib) -I$(QD_ROOT)/include \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly3 \ + -I$(PHCgpu)/Path/Host2 \ + -c $(PHCAda)/PHCtoC/ademanypaths.cpp \ + -o ademanypaths.o + +ts_ademanypaths: lib2path.o + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main Ada procedure ..." + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_ademanypaths.adb \ + -o ts_ademanypaths.o + gnatbind ts_ademanypaths use_c2phc + @-echo ">>> linking ..." + gnatlink ts_ademanypaths syscon.o solcon.o phcpack.o \ + lib2path.o $(QD_LIB)/libqd.a \ + -o $(BIN)/ts_ademanypaths -lm --LINK=$(gpp) + +ts_pathpars: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_pathpars.adb \ + -o $(BIN)/ts_pathpars + +# Test programs for the Tasking : + +corecount.o: + gcc -c $(PHCAda)/Tasking/corecount.c + +# ts_corecount: corecount.o +# gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_corecount.adb +# gnatbind ts_corecount +# gnatlink ts_corecount corecount.o -o $(BIN)/ts_corecount + +ts_corecount: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_corecount.adb \ + -o $(BIN)/ts_corecount + +ts_mtmatvec: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmatvec.adb \ + -o $(BIN)/ts_mtmatvec + +ts_mtpolval: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpolval.adb \ + -o $(BIN)/ts_mtpolval + +ts_mtlinsol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsol.adb \ + -o $(BIN)/ts_mtlinsol + +ts_mtlinsolV0: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsolV0.adb \ + -o $(BIN)/ts_mtlinsolV0 + +ts_mtlinsolv1: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtlinsolv1.adb \ + -o $(BIN)/ts_mtlinsolv1 + +ts_tasking: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_tasking.adb \ + -o $(BIN)/ts_tasking + +ts_mutex: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mutex.adb -o $(BIN)/ts_mutex + +ts_jobs: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_jobs.adb -o $(BIN)/ts_jobs + +ts_mtsols: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtsols.adb -o $(BIN)/ts_mtsols + +ts_mtcont: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtcont.adb -o $(BIN)/ts_mtcont + +ts_mtstref: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtstref.adb -o $(BIN)/ts_mtstref + +ts_mtddref: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtddref.adb -o $(BIN)/ts_mtddref + +ts_mtqdref: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtqdref.adb -o $(BIN)/ts_mtqdref + +ts_mtsharp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtsharp.adb -o $(BIN)/ts_mtsharp + +ts_mtvol: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtvol.adb -o $(BIN)/ts_mtvol + +ts_mtvolcon: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtvolcon.adb \ + -o $(BIN)/ts_mtvolcon + +ts_mtverify: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtverify.adb \ + -o $(BIN)/ts_mtverify + +ts_mtmva: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmva.adb -o $(BIN)/ts_mtmva + +ts_mtperm: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtperm.adb -o $(BIN)/ts_mtperm + +ts_mtpermctl: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpermctl.adb \ + -o $(BIN)/ts_mtpermctl + +ts_mtmbthom: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtmbthom.adb \ + -o $(BIN)/ts_mtmbthom + +ts_mtcelidx: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_mtcelidx.adb \ + -o ts_mtcelidx.o + gnatbind ts_mtcelidx use_c2phc + gnatlink ts_mtcelidx inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_mtcelidx --LINK=$(gpp) + +ts_mtadcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtadcnv.adb \ + -o $(BIN)/ts_mtadcnv + +ts_mtserlin: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtserlin.adb \ + -o $(BIN)/ts_mtserlin + +ts_mtnewton: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtnewton.adb \ + -o $(BIN)/ts_mtnewton + +ts_mthessian: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mthessian.adb \ + -o $(BIN)/ts_mthessian + +ts_mthesscrc: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mthesscrc.adb \ + -o $(BIN)/ts_mthesscrc + +ts_mtratapp: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtratapp.adb \ + -o $(BIN)/ts_mtratapp + +ts_mtshiftcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtshiftcnv.adb \ + -o $(BIN)/ts_mtshiftcnv + +ts_mtpcscnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtpcscnv.adb \ + -o $(BIN)/ts_mtpcscnv + +ts_mtprdcnv: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_mtprdcnv.adb \ + -o $(BIN)/ts_mtprdcnv + +# Test programs for the Main interactive drivers : + +ts_mainroco: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_mainroco.adb \ + -o ts_mainroco.o + gnatbind ts_mainroco use_c2phc + gnatlink ts_mainroco inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_mainroco --LINK=$(gpp) + +ts_blkroco: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_blkroco.adb \ + -o $(BIN)/ts_blkroco + +use_phc: + gnatmake $(INCLULIBS) $(GNATFLAGS) use_phc.adb \ + -o $(BIN)/use_phc + +ts_greet: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_greet.adb \ + -o $(BIN)/ts_greet + +# ts_actopt: corecount.o +# gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_actopt.adb +# gnatbind ts_actopt +# gnatlink ts_actopt corecount.o -o $(BIN)/ts_actopt + +ts_actopt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_actopt.adb -o $(BIN)/ts_actopt + +ts_opthand: inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o mvc4phc.o \ + parameter.o lib2path.o feedback.o lib.a + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + gnatmake -c $(INCLULIBS) -I$(PHCAda)/PHCtoC/Main_full \ + $(GNATFLAGS) ts_opthand.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb + gnatbind ts_opthand use_c2phc pieri_solver + gnatlink ts_opthand inputData.o outputData.o iTest.o \ + fTest.o simplex4phc.o reltab.o mvc4phc.o \ + demicsrun4phc.o lib2path.o $(QD_LIB)/libqd.a \ + syscon.o solcon.o phcpack.o parameter.o \ + feedback.o lib.a \ + -o $(BIN)/ts_opthand --LINK=$(gpp) + +ts_bbsolve: inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_bbsolve.adb \ + -o ts_bbsolve.o + gnatbind ts_bbsolve use_c2phc + gnatlink ts_bbsolve inputData.o outputData.o iTest.o fTest.o \ + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + -o $(BIN)/ts_bbsolve --LINK=$(gpp) + +# Test programs for the Library Lib : + +phcpack.o: + gcc -c $(PHCLib)/phcpack.c + +use_c2phc.o: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + +ts_list2str: + gcc -c $(PHCLib)/lists_and_strings.c + gcc -c $(PHCLib)/ts_list2str.c + gcc lists_and_strings.o ts_list2str.o -o $(BIN)/ts_list2str + +lib_syscon: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/lib_syscon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o lib_syscon.o \ + -o $(BIN)/lib_syscon + +lib_syscon_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_syscon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o lib_syscon.o \ + -o $(BIN)/lib_syscon --LINK=$(gpp) + +lib_tabform: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/tabform.c + gcc -c $(PHCLib)/lib_tabform.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o tabform.o lib_tabform.o \ + -o $(BIN)/lib_tabform + +lib_tabform_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/tabform.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_tabform.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o tabform.o lib_tabform.o \ + -o $(BIN)/lib_tabform --LINK=$(gpp) + +lib_solcon: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/lib_solcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c solcon.o lib_solcon.o \ + -o $(BIN)/lib_solcon + +lib_solcon_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_solcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c solcon.o lib_solcon.o \ + -o $(BIN)/lib_solcon --LINK=$(gpp) + +lib_solrep: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/lib_solrep.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o lib_solrep.o \ + -o $(BIN)/lib_solrep + +lib_solrep_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_solrep.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o lib_solrep.o \ + -o $(BIN)/lib_solrep --LINK=$(gpp) + +lib_read: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/lib_read.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o solcon.o lib_read.o \ + -o $(BIN)/lib_read -lm + +lib_read_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_read.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o solcon.o lib_read.o \ + -o $(BIN)/lib_read -lm --LINK=$(gpp) + +lib_newton: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/lib_newton.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o lib_newton.o \ + -o $(BIN)/lib_newton -lm --LINK=$(gpp) + +lib_newton_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_newton.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o lib_newton.o \ + -o $(BIN)/lib_newton -lm --LINK=$(gpp) + +lib_multip: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/multiplicity.c + gcc -c $(PHCLib)/lib_multip.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o multiplicity.o \ + lib_multip.o -o $(BIN)/lib_multip -lm + +lib_multip_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/multiplicity.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_multip.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o multiplicity.o \ + lib_multip.o -o $(BIN)/lib_multip -lm --LINK=$(gpp) + +lib_roco: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/product.c + gcc -c $(PHCLib)/lib_roco.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o product.o \ + lib_roco.o -o $(BIN)/lib_roco -lm --LINK=$(gpp) + +lib_roco_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/product.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_roco.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o product.o \ + lib_roco.o -o $(BIN)/lib_roco -lm --LINK=$(gpp) + +lib_celcon: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/celcon.c + gcc -c $(PHCLib)/intcelcon.c + gcc -c $(PHCLib)/lib_celcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o celcon.o \ + intcelcon.o lib_celcon.o -o $(BIN)/lib_celcon -lm + +lib_celcon_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/celcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/intcelcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_celcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o celcon.o \ + intcelcon.o lib_celcon.o -o $(BIN)/lib_celcon -lm \ + --LINK=$(gpp) + +lib_celphc: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/celcon.c + gcc -c $(PHCLib)/lib_celphc.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o celcon.o \ + lib_celphc.o -o $(BIN)/lib_celphc -lm + +lib_celphc_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/celcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_celphc.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o celcon.o \ + lib_celphc.o -o $(BIN)/lib_celphc -lm --LINK=$(gpp) + +lib_scale: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/scalers.c + gcc -c $(PHCLib)/lib_scale.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o scalers.o lib_scale.o \ + -o $(BIN)/lib_scale -lm + +lib_scale_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/scalers.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_scale.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o scalers.o lib_scale.o \ + -o $(BIN)/lib_scale -lm --LINK=$(gpp) + +lib_reduce: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/reducers.c + gcc -c $(PHCLib)/lib_reduce.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o reducers.o lib_reduce.o \ + -o $(BIN)/lib_reduce -lm + +lib_reduce_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/reducers.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_reduce.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o reducers.o lib_reduce.o \ + -o $(BIN)/lib_reduce -lm --LINK=$(gpp) + +lib_conpar: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/lib_conpar.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_conpar.o \ + -o $(BIN)/lib_conpar -lm + +lib_conpar_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_conpar.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_conpar.o \ + -o $(BIN)/lib_conpar -lm --LINK=$(gpp) + +lib_poco: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/lib_poco.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_poco.o \ + -o $(BIN)/lib_poco -lm + +lib_poco_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_poco.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_poco.o \ + -o $(BIN)/lib_poco -lm --LINK=$(gpp) + +lib_track: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/lib_track.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + jump_track.o lib_track.o -o $(BIN)/lib_track -lm + +lib_track_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/jump_track.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_track.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + jump_track.o lib_track.o -o $(BIN)/lib_track -lm \ + --LINK=$(gpp) + +lib_nxtsol: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(PHCLib)/next_track.c + gcc -c $(PHCLib)/lib_nxtsol.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o jump_track.o \ + next_track.o lib_nxtsol.o -lm \ + -o $(BIN)/lib_nxtsol + +lib_nxtsol_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/jump_track.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/next_track.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_nxtsol.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o jump_track.o \ + next_track.o lib_nxtsol.o -o $(BIN)/lib_nxtsol -lm \ + --LINK=$(gpp) + +lib_sweep: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c -O2 $(PHCLib)/sweep.c + gcc -c -O2 $(PHCLib)/lib_sweep.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c sweep.o lib_sweep.o \ + -o $(BIN)/lib_sweep -lm + +lib_sweep_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/sweep.c + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_sweep.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c sweep.o lib_sweep.o \ + -o $(BIN)/lib_sweep -lm --LINK=$(gpp) + +lib_pieri: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb + gcc -c -O2 $(PHCLib)/lib_pieri.c + gnatbind -n use_c2pieri + gnatlink -C use_c2pieri lib_pieri.o -o $(BIN)/lib_pieri + +lib_pieri_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_pieri.c + gnatbind -n use_c2pieri + gnatlink -C use_c2pieri lib_pieri.o -o $(BIN)/lib_pieri --LINK=$(gpp) + +lib_lrhom: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c -O2 $(PHCLib)/syscon.c + gcc -c -O2 $(PHCLib)/solcon.c + gcc -c -O2 $(PHCLib)/schubert.c + gcc -c -O2 $(PHCLib)/lib_lrhom.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o schubert.o lib_lrhom.o \ + -o $(BIN)/lib_lrhom -lm + +lib_lrhom_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/schubert.c + $(gpp) -Dcompilewgpp=1 -c -O2 $(PHCLib)/lib_lrhom.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o schubert.o lib_lrhom.o \ + -o $(BIN)/lib_lrhom -lm --LINK=$(gpp) + +lib_factor: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/lib_factor.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + lib_factor.o -o $(BIN)/lib_factor -lm + +lib_factor_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_factor.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + lib_factor.o -o $(BIN)/lib_factor -lm --LINK=$(gpp) + +lib_member: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/lib_member.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + lib_member.o -o $(BIN)/lib_member -lm + +lib_member_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witset.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_member.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o solcon.o witset.o \ + lib_member.o -o $(BIN)/lib_member -lm --LINK=$(gpp) + +lib_usolve: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/unisolvers.c + gcc -c $(PHCLib)/lib_usolve.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o unisolvers.o lib_usolve.o \ + -o $(BIN)/lib_usolve -lm + +lib_usolve_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/unisolvers.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_usolve.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o unisolvers.o lib_usolve.o \ + -o $(BIN)/lib_usolve -lm --LINK=$(gpp) + +lib_giftwrap: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/giftwrappers.c + gcc -c $(PHCLib)/lib_giftwrap.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c giftwrappers.o lib_giftwrap.o \ + -o $(BIN)/lib_giftwrap -lm + +lib_giftwrap_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/giftwrappers.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_giftwrap.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c giftwrappers.o lib_giftwrap.o \ + -o $(BIN)/lib_giftwrap -lm --LINK=$(gpp) + +lib_numbtrop: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/numbtrop.c + gcc -c $(PHCLib)/lib_numbtrop.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c numbtrop.o lib_numbtrop.o \ + -o $(BIN)/lib_numbtrop -lm + +lib_numbtrop_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/numbtrop.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_numbtrop.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c numbtrop.o lib_numbtrop.o \ + -o $(BIN)/lib_numbtrop -lm --LINK=$(gpp) + +lib_series: + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/syspool.c + gcc -c $(PHCLib)/series.c + gcc -c $(PHCLib)/lib_series.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o syspool.o series.o \ + lib_series.o -o $(BIN)/lib_series -lm + +lib_series_cpp: + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syspool.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/series.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_series.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o syscon.o syspool.o series.o \ + lib_series.o -o $(BIN)/lib_series -lm --LINK=$(gpp) + +lib_padcon: + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/padcon.c + gcc -c $(PHCLib)/lib_padcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o phcpack.o padcon.o \ + lib_padcon.o -o $(BIN)/lib_padcon -lm + +lib_padcon_cpp: + gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/padcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_padcon.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c solcon.o phcpack.o padcon.o lib_padcon.o \ + -o $(BIN)/lib_padcon -lm --LINK=$(gpp) + +lib_nbrvar: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/lib_nbrvar.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_nbrvar.o \ + -o $(BIN)/lib_nbrvar -lm + +lib_nbrvar_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_nbrvar.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o lib_nbrvar.o \ + -o $(BIN)/lib_nbrvar -lm --LINK=$(gpp) + +adepath_d.o: adenewton_d.o adeonepath_d.o ademanypaths_d.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/adepath_d.c +gpupath_d.o: gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/gpupath_d.c +adepath_dd.o: adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/adepath_dd.c +gpupath_dd.o: gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/gpupath_dd.c +adepath_qd.o: adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesQD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/adepath_qd.c +gpupath_qd.o: gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o + $(gpp) -O2 -Dcompilewgpp=1 -fPIC -I$(PHCAda)/PHCtoC \ + -I$(PHCgpu)/Path/DefineTypesDD -I$(PHCgpu)/Path/Poly \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Poly \ + -c $(PHCLib)/gpupath_qd.c + +lib_adepath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o adepath_d.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_d.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c lib_adepath_d.o adepath_d.o \ + adenewton_d.o adeonepath_d.o ademanypaths_d.o \ + syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o \ + predictor_host_d.o path_host_d.o \ + -o $(BIN)/lib_adepath_d -lm --LINK=$(gpp) + +lib_gpupath_d: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o path_gpu_d.o gpupath_d.o \ + gqd_qd_util.o \ + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_d.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c lib_gpupath_d.o gpupath_d.o \ + gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o \ + syscon.o solcon.o phcpack.o ada_test.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o \ + predictor_host_d.o path_host_d.o path_gpu_d.o \ + gqd_qd_util.o \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -o $(BIN)/lib_gpupath_d -lm --LINK=$(gpp) + +lib_gpupath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + predictor_host_dd.o path_host_dd.o path_gpu_dd.o gpupath_dd.o \ + gqd_qd_util.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_dd.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c lib_gpupath_dd.o gpupath_dd.o \ + gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o \ + syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ + predictor_host_dd.o path_host_dd.o path_gpu_dd.o \ + gqd_qd_util.o \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -o $(BIN)/lib_gpupath_dd -lm --LINK=$(gpp) + +lib_gpupath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + predictor_host_qd.o path_host_qd.o path_gpu_qd.o gpupath_qd.o \ + gqd_qd_util.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_gpupath_qd.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c lib_gpupath_qd.o gpupath_qd.o \ + gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o \ + syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ + predictor_host_qd.o path_host_qd.o path_gpu_qd.o \ + gqd_qd_util.o \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -o $(BIN)/lib_gpupath_qd -lm --LINK=$(gpp) + +lib_adepath_dd: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + predictor_host_dd.o path_host_dd.o adepath_dd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_dd.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc + gnatlink -C use_c2phc lib_adepath_dd.o adepath_dd.o \ + adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o \ + syscon.o solcon.o phcpack.o ada_test_dd.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o \ + predictor_host_dd.o path_host_dd.o \ + inputData.o outputData.o iTest.o fTest.o simplex4phc.o \ + reltab.o mvc4phc.o demicsrun4phc.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/lib_adepath_dd -lm --LINK=$(gpp) + +lib_adepath_qd: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + predictor_host_qd.o path_host_qd.o adepath_qd.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + @-echo ">>> compiling code for the containers ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/phcpack.c + @-echo ">>> compiling the main C program ..." + $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/lib_adepath_qd.c + @-echo ">>> linking ..." + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c lib_adepath_qd.o adepath_qd.o \ + adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o \ + syscon.o solcon.o phcpack.o ada_test_qd.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o \ + predictor_host_qd.o path_host_qd.o \ + $(QD_LIB)/libqd.a \ + -o $(BIN)/lib_adepath_qd -lm --LINK=$(gpp) + +phc_solve: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/phcpack4c.c + gcc -c $(PHCLib)/phc_solve.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o phcpack4c.o phc_solve.o \ + -o $(BIN)/phc_solve -lm + +phc_solve_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phcpack4c.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/phc_solve.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o phcpack4c.o phc_solve.o \ + -o $(BIN)/phc_solve -lm --LINK=$(gpp) + +lib_witsols: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witsols.c + gcc -c $(PHCLib)/lib_witsols.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o witsols.o lib_witsols.o \ + -o $(BIN)/lib_witsols -lm + +lib_witsols_cpp: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/witsols.c + $(gpp) -Dcompilewgpp=1 -c $(PHCLib)/lib_witsols.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c syscon.o solcon.o witsols.o lib_witsols.o \ + -o $(BIN)/phc_solve -lm --LINK=$(gpp) + +# Before typing make phcpy2c2.so, do make clean because everthing must +# be compiled with the -fPIC option. +# All statically compiled .o files are collected into one archive. +# Because there is no main Ada program we call gnatbind with -n +# and must compile the output of gnatbind separately. +# Normally, the output of gnatbind is automatically compiled with +# gnatlink, but we use gcc to link, so the output of the binder, +# which contains the adainit must go into the archive phcpy2c2.a. + +phcpy2c2.so: parameter.o lib2path.o + /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ + $(PHCLib)/lists_and_strings.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PHCLib) \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ + -I$(PHCgpu)/Path/Poly3 -I$(PYTHON) \ + -I$(PYTHON)/Include $(PHCmod)/phcpy2c2.c + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -static use_c2phc -o use_c2phc_binder.adb + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb + ar ruv phcpy2c2.a *.o + ranlib phcpy2c2.a + $(gpp) -v -shared -o ../Python/PHCpy2/phcpy/phcpy2c2.so -lm \ + -Wl,-whole-archive phcpy2c2.a $(QD_LIB)/libqd.a \ + $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ + -Wl,-no-whole-archive -lrt + +phcpy2c3.so: parameter.o lib2path.o + /bin/rm -f -r phcpy2c2.o phcpy2c2.a phcpy2c3.o phcpy2c3.a + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syscon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/tabform.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/solcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/product.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 \ + $(PHCLib)/lists_and_strings.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/celcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/intcelcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/scalers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/reducers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/sweep.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/multiplicity.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/numbtrop.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witset.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/witsols.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/unisolvers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/giftwrappers.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/phcpack.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/schubert.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/mapcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/series.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/padcon.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/syspool.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/jump_track.c + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 $(PHCLib)/next_track.c + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/inputData.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/iTest.cpp + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/fTest.cpp + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCS_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o + $(gpp) -Dcompilewgpp=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/reltab.cpp + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 -static -fPIC $(DEMiCs_CFLAGS) \ + -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o + $(gpp) -Dcompilewgpp=1 -static -c -fPIC -O3 -I$(PYTHON3) -I$(PHCLib) \ + -I$(PHCgpu)/Path/Complex -I$(PHCgpu)/Path/Host2 \ + -I$(PHCgpu)/Path/Poly3 $(PHCmod)/phcpy2c3.c + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -static use_c2phc -o use_c2phc_binder.adb + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc_binder.adb + ar ruv phcpy2c3.a *.o + ranlib phcpy2c3.a + $(gpp) -shared -o ../Python/PHCpy3/phcpy/phcpy2c3.so -lm \ + -Wl,-whole-archive phcpy2c3.a $(QD_LIB)/libqd.a \ + $(ADALIB)/libgnat_pic.a $(ADALIB)/libgnarl_pic.a \ + -Wl,-no-whole-archive -lrt + +# phcpy2c with double version of Path library : + +phcpy2cadepath_d.so: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o adepath_d.o + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ + -I$(PYTHON) -I$(PYTHON)/Include \ + $(PHCLib)/phcpy2cadepath_d.cpp -o phcpy2cadepath_d.o + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -shared use_c2phc + gnatlink -shared -C use_c2phc phcpy2cpath_d.o \ + phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ + giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ + scalers.o schubert.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o \ + adenewton_d.o adeonepath_d.o ademanypaths_d.o adepath_d.o \ + -lm --LINK=$(gpp) -fPIC \ + -o ../Python/PHCpy/phcpy/phcpy2cadepath_d.so + +phcpy2cpath_d.so: utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o adepath_d.o path_gpu_d.o \ + gqd_qd_util.o gpupath_d.o + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ + -I$(PYTHON) -I$(PYTHON)/Include \ + $(PHCLib)/phcpy2cpath_d.cpp -o phcpy2cpath_d.o + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -shared use_c2phc + gnatlink -shared -C use_c2phc phcpy2cpath_d.o \ + phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ + giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ + scalers.o schubert.o \ + utilities_d.o poly_d.o polysol_d.o workspace_host_d.o \ + eval_host_d.o mgs_host_d.o newton_host_d.o ada_test.o \ + predictor_host_d.o path_host_d.o gqd_qd_util.o path_gpu_d.o \ + adenewton_d.o adeonepath_d.o ademanypaths_d.o adepath_d.o \ + gpunewton_d.o gpuonepath_d.o gpumanypaths_d.o gpupath_d.o \ + -lcutil_x86_64 -lcudart \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -lm --LINK=$(gpp) -fPIC \ + -o ../Python/PHCpy/phcpy/phcpy2cpath_d.so + +phcpy2cpath_dd.so: utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + predictor_host_dd.o path_host_dd.o adepath_dd.o path_gpu_dd.o \ + gqd_qd_util.o gpupath_dd.o + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ + -I$(PYTHON) -I$(PYTHON)/Include \ + $(PHCLib)/phcpy2cpath_dd.cpp -o phcpy2cpath_dd.o + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -shared use_c2phc + gnatlink -shared -C use_c2phc phcpy2cpath_dd.o \ + phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ + giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ + scalers.o schubert.o \ + utilities_dd.o poly_dd.o polysol_dd.o workspace_host_dd.o \ + eval_host_dd.o mgs_host_dd.o newton_host_dd.o ada_test_dd.o \ + predictor_host_dd.o path_host_dd.o gqd_qd_util.o path_gpu_dd.o \ + adenewton_dd.o adeonepath_dd.o ademanypaths_dd.o adepath_dd.o \ + gpunewton_dd.o gpuonepath_dd.o gpumanypaths_dd.o gpupath_dd.o \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -lm --LINK=$(gpp) -fPIC \ + -o ../Python/PHCpy/phcpy/phcpy2cpath_dd.so + +phcpy2cpath_qd.so: utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + predictor_host_qd.o path_host_qd.o adepath_qd.o path_gpu_qd.o \ + gqd_qd_util.o gpupath_qd.o + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/syscon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/solcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/product.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/lists_and_strings.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/celcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/scalers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/witset.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/schubert.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/unisolvers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/giftwrappers.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/phcpack.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/mapcon.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 $(PHCLib)/next_track.c + $(gpp) -static -Dcompilewgpp=1 -c -fPIC -O2 \ + -I$(PYTHON) -I$(PYTHON)/Include \ + $(PHCLib)/phcpy2cpath_qd.cpp -o phcpy2cpath_qd.o + gnatmake -static -c -fPIC $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n -shared use_c2phc + gnatlink -shared -C use_c2phc phcpy2cpath_qd.o \ + phcpack.o syscon.o witset.o mapcon.o next_track.o unisolvers.o \ + giftwrappers.o solcon.o product.o lists_and_strings.o celcon.o \ + scalers.o schubert.o \ + utilities_qd.o poly_qd.o polysol_qd.o workspace_host_qd.o \ + eval_host_qd.o mgs_host_qd.o newton_host_qd.o ada_test_qd.o \ + predictor_host_qd.o path_host_qd.o gqd_qd_util.o path_gpu_qd.o \ + adenewton_qd.o adeonepath_qd.o ademanypaths_qd.o adepath_qd.o \ + gpunewton_qd.o gpuonepath_qd.o gpumanypaths_qd.o gpupath_qd.o \ + -lcutil_x86_64 -lcudart $(QD_LIB)/libqd.a \ + -L/usr/local/cuda/lib64 -L$(SDK_HOME)/C/lib \ + -lm --LINK=$(gpp) -fPIC \ + -o ../Python/PHCpy/phcpy/phcpy2cpath_qd.so + +# how to make the executables with MPI: + +adatest: + $(CC) -c $(MPILib)/call_hello.c + $(CC) -c $(MPILib)/adatest.c + gnatmake -c $(MPILib)/hello.adb + gnatbind -n hello + gnatlink -C hello call_hello.o adatest.o -o ../bin/adatest \ + --LINK=$(CLINKER) + +mpi2sys: + $(CC) -c $(MPILib)/mpi2sys.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_syscon.adb + gnatbind -n use_syscon + gnatlink -C use_syscon mpi2sys.o -o ../bin/mpi2sys \ + --LINK=$(CLINKER) + +mpi2sol: + $(CC) -c $(MPILib)/mpi2sol.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_solcon.adb + gnatbind -n use_solcon + gnatlink -C use_solcon mpi2sol.o -o ../bin/mpi2sol \ + --LINK=$(CLINKER) + +mpi2hom: + $(CC) -c $(PHCLib)/syscon.c + $(CC) -c $(PHCLib)/solcon.c + $(CC) -c $(PHCLib)/phcpack.c + $(CC) -c $(PHCLib)/jump_track.c + $(CC) -c $(MPILib)/parallel_phcpack.c + $(CC) -c $(MPILib)/mpi2hom.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c mpi2hom.o syscon.o solcon.o phcpack.o \ + jump_track.o parallel_phcpack.o \ + -o ../bin/mpi2hom \ + --LINK=$(CLINKER) + +mpi2phc_s: + $(CC) -c $(MPILib)/mpi2phc_s.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c mpi2phc_s.o -o ../bin/mpi2phc_s \ + --LINK=$(CLINKER) + +mpi2phc_d2: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + $(CC) -c $(MPILib)/mpi2phc_d2.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o \ + mpi2phc_d2.o -o ../bin/mpi2phc_d2 \ + --LINK=$(CLINKER) + +double_double.o: + gcc -c -I$(PHCAda)/Math_Lib/QD $(PHCAda)/Math_Lib/QD/double_double.c \ + -o double_double.o + +quad_double.o: + gcc -c -I$(PHCAda)/Math_Lib/QD $(PHCAda)/Math_Lib/QD/quad_double.c \ + -o quad_double.o + +mpi2phc_dd: double_double.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + $(CC) -c -I$(PHCAda)/Math_Lib/QD $(MPILib)/mpi2phc_dd.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o double_double.o \ + mpi2phc_dd.o -o ../bin/mpi2phc_dd \ + --LINK=$(CLINKER) -lm + +mpi2phc_qd: double_double.o quad_double.o + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + $(CC) -c -I$(PHCAda)/Math_Lib/QD $(MPILib)/mpi2phc_qd.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o double_double.o \ + quad_double.o mpi2phc_qd.o -o ../bin/mpi2phc_qd \ + --LINK=$(CLINKER) -lm + +mpi2track: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + gcc -c $(COFLAGS) $(PHCLib)/phcpack.c + gcc -c $(COFLAGS) $(PHCLib)/syscon.c + gcc -c $(COFLAGS) $(PHCLib)/solcon.c + gcc -c $(COFLAGS) $(PHCLib)/witset.c + gcc -c $(COFLAGS) $(PHCLib)/jump_track.c + $(CC) -c $(COFLAGS) $(MPILib)/parallel_phcpack.c + $(CC) -c $(COFLAGS) $(MPILib)/mpi2track.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c phcpack.o solcon.o syscon.o witset.o \ + jump_track.o parallel_phcpack.o mpi2track.o \ + -o ../bin/mpi2track -lm \ + --LINK=$(CLINKER) + +parallel_pieri: + gcc -c $(MPILib)/parallel_pieri.c $(MPILib)/parallel_tree.c \ + $(MPILib)/queue.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2pieri.adb + gnatbind -n use_c2pieri + gnatlink -C use_c2pieri parallel_pieri.o parallel_tree.o queue.o \ + -o $(BIN)/parallel_pieri --LINK=$(CLINKER) + +parallel_subsystem: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_subsystem.c + gcc -c $(MPILib)/job_queue.c + gcc -c $(MPILib)/idle_queue.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/from_mpi2track.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ + jump_track.o from_mpi2track.o parallel_phcpack.o \ + job_queue.o idle_queue.o parallel_subsystem.o -lm \ + -o ../bin/parallel_subsystem --LINK=$(CLINKER) + +mpi2fac: +# mpicc -c $(MPILib)/mpi2fac.c + gcc -c $(MPILib)/mpi2fac.c + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gnatbind -n use_c2phc + gnatlink -C use_c2phc mpi2fac.o -o ../bin/mpi2fac -lm \ + --LINK=$(CLINKER) + +mpi2fac_s: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/parallel_monodromy.c + gcc -c $(MPILib)/mpi2fac_s.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ + jump_track.o parallel_phcpack.o parallel_monodromy.o \ + mpi2fac_s.o -lm \ + -o ../bin/mpi2fac_s --LINK=$(CLINKER) + +mpi2fac_d: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/parallel_monodromy.c + gcc -c $(MPILib)/manage_components.c + gcc -c $(MPILib)/mpi2fac_d.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ + jump_track.o parallel_phcpack.o parallel_monodromy.o \ + manage_components.o mpi2fac_d.o -lm \ + -o ../bin/mpi2fac_d --LINK=$(CLINKER) + +monodromyMPI: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/witset.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/parallel_monodromy.c + gcc -c $(MPILib)/manage_components.c + gcc -c $(MPILib)/monodromyMPI.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o witset.o \ + jump_track.o parallel_phcpack.o parallel_monodromy.o \ + manage_components.o monodromyMPI.o -lm \ + -o ../bin/monodrom --LINK=$(CLINKER) + +mpi2cell_s: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/celcon.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/parallel_cells.c + gcc -c $(MPILib)/mpi2cell_s.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o celcon.o \ + jump_track.o parallel_phcpack.o parallel_cells.o \ + mpi2cell_s.o \ + -o ../bin/mpi2cell_s --LINK=$(CLINKER) + +mpi2cell_d: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/celcon.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(MPILib)/parallel_phcpack.c + gcc -c $(MPILib)/parallel_cells.c + gcc -c $(MPILib)/mpi2cell_d.c + gnatbind -n use_c2phc + gnatlink -C use_c2phc phcpack.o solcon.o syscon.o celcon.o \ + jump_track.o parallel_phcpack.o parallel_cells.o \ + mpi2cell_d.o \ + -o ../bin/mpi2cell_d --LINK=$(CLINKER) + +mpi2padcon: + gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc4c.adb + $(CC) -c -I$(PHCLib) $(COFLAGS) $(MPILib)/mpi2padcon.c + gcc -c $(PHCLib)/phcpack.c + gcc -c $(PHCLib)/syscon.c + gcc -c $(PHCLib)/solcon.c + gcc -c $(PHCLib)/jump_track.c + gcc -c $(PHCLib)/padcon.c + gcc -c $(MPILib)/parallel_phcpack.c + gnatbind -n use_c2phc4c + gnatlink -C use_c2phc4c mpi2padcon.o syscon.o solcon.o phcpack.o \ + jump_track.o padcon.o parallel_phcpack.o \ + -o ../bin/mpi2padcon -lm \ + --LINK=$(CLINKER) + +# cleaning up the object files : + +clean: + /bin/rm -f b* *.o *.ali lib.a phcpy2c2.a phcpy2c3.a diff -Nru phcpack-2.4.84/src/Objects/makefile_windows phcpack-2.4.85/src/Objects/makefile_windows --- phcpack-2.4.84/src/Objects/makefile_windows 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/Objects/makefile_windows 2021-06-30 23:22:40.000000000 +0000 @@ -41,7 +41,8 @@ -I$(PHCAda)/Math_Lib/Divisors -I$(PHCAda)/Math_Lib/Reduction \ -I$(PHCAda)/Math_Lib/Polynomials -I$(PHCAda)/Math_Lib/Functions \ -I$(PHCAda)/Math_Lib/Supports -I$(PHCAda)/Math_Lib/Circuits \ - -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/AD \ + -I$(PHCAda)/Math_Lib/Series -I$(PHCAda)/Math_Lib/Laurent \ + -I$(PHCAda)/Math_Lib/AD \ -I$(PHCAda)/Deformations/Solutions -I$(PHCAda)/Deformations/Homotopy \ -I$(PHCAda)/Deformations/Newton -I$(PHCAda)/Deformations/Curves \ -I$(PHCAda)/Deformations/End_Games -I$(PHCAda)/Deformations/Sweep \ @@ -56,8 +57,9 @@ -I$(PHCAda)/Components/Samplers -I$(PHCAda)/Components/Interpolators \ -I$(PHCAda)/Components/Factorization -I$(PHCAda)/Components/Decomposition \ -I$(PHCAda)/Components/Solver -I$(PHCAda)/Components/Tropical \ - -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State -I$(MPILib) \ - -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main + -I$(PHCAda)/CtoPHC/Types -I$(PHCAda)/CtoPHC/Structures \ + -I$(PHCAda)/CtoPHC/Funky -I$(PHCAda)/CtoPHC/State \ + -I$(MPILib) -I$(PHCAda)/PHCtoC -I$(PHCAda)/Tasking -I$(PHCAda)/Main # flags with full optimization, but no fast math: GNATFLAGS=-gnatv -O3 -gnatp -gnatv GNATOPTFLAGS=-gnatv -O3 -gnatp -gnatv @@ -74,7 +76,7 @@ phc: lib.a feedback.o get_clock.o get_clocks_per_sec.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecountwindows.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o \ parameter.o lib2path.o g++ -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c g++ -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c @@ -88,13 +90,13 @@ lib.a parameter.o lib2path.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ simplex4phc.o mvc4phc.o demicsrun4phc.o \ - get_clock.o get_clocks_per_sec.o corecountwindows.o \ + get_clock.o get_clocks_per_sec.o \ $(QD_LIB)/libqd.a -o $(BIN)/phc -lm \ --LINK="g++ -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -Wl,--no-whole-archive" phc_noqd: lib.a feedback.o get_clock.o get_clocks_per_sec.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ - simplex4phc.o mvc4phc.o demicsrun4phc.o corecountwindows.o \ + simplex4phc.o mvc4phc.o demicsrun4phc.o \ parameter.o lib2path_d.o g++ -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c g++ -O2 -Dcompilewgpp=1 -c $(PHCLib)/solcon.c @@ -108,7 +110,7 @@ lib.a parameter.o lib2path_d.o \ inputData.o outputData.o iTest.o fTest.o reltab.o \ simplex4phc.o mvc4phc.o demicsrun4phc.o \ - get_clock.o get_clocks_per_sec.o corecountwindows.o \ + get_clock.o get_clocks_per_sec.o \ -o $(BIN)/phc -lm \ --LINK="g++ -static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -Wl,--no-whole-archive" @@ -460,7 +462,7 @@ -largs get_clock.o get_clocks_per_sec.o ts_tdqrd: get_clock.o get_clocks_per_sec.o - gnatmake -o $(BIN)/ts_tdqrd $(INCLULIBS) $(GNATOPTFLAGS) ts_ddqrd.adb \ + gnatmake -o $(BIN)/ts_tdqrd $(INCLULIBS) $(GNATOPTFLAGS) ts_tdqrd.adb \ -largs get_clock.o get_clocks_per_sec.o ts_qdqrd: get_clock.o get_clocks_per_sec.o @@ -921,6 +923,24 @@ gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_sercffpol.adb \ -o $(BIN)/ts_sercffpol +# Test programs for the Math_Lib/Laurent library : + +ts_pslaur: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_pslaur.adb \ + -o $(BIN)/ts_pslaur + +ts_laurmat: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_laurmat.adb \ + -o $(BIN)/ts_laurmat + +ts_lserpol: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_lserpol.adb \ + -o $(BIN)/ts_lserpol + +ts_lsernew: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_lsernew.adb \ + -o $(BIN)/ts_lsernew + # Test programs for the Math_Lib/AD library : ts_monom: @@ -1522,6 +1542,33 @@ gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_puiseux.adb \ -o $(BIN)/ts_puiseux +# Test programs for the Root_Counts/MixedVol library : + +ts_convsub: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_convsub.adb \ + -o $(BIN)/ts_convsub + +ts_mv2c: + gcc -c $(PHCAda)/Root_Counts/MixedVol/cell_stack1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/form_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/one_level_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/index_tree_lp1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/zero_index_tree1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/relation_table1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/prepare_for_mv1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/mixed_volume1.c + gcc -c $(PHCAda)/Root_Counts/MixedVol/mv1.c + gnatmake -o $(BIN)/ts_mv2c $(INCLULIBS) $(GNATOPTFLAGS) ts_mv2c.adb \ + -largs cell_stack1.o form_lp1.o one_level_lp1.o \ + index_tree_lp1.o zero_index_tree1.o relation_table1.o \ + prepare_for_mv1.o mixed_volume1.o mv1.o -lm + +ts_mv: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mv.adb -o $(BIN)/ts_mv + +ts_mva: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mva.adb -o $(BIN)/ts_mva + # Test programs for the Root_Counts/DEMiCs library : ts_calldemics: @@ -1586,22 +1633,23 @@ -c $(PHCAda)/Root_Counts/DEMiCs/outputData.cpp simplex4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ -c $(PHCAda)/Root_Counts/DEMiCs/simplex.cpp -o simplex4phc.o mvc4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ -c $(PHCAda)/Root_Counts/DEMiCs/mvc.cpp -o mvc4phc.o demicsrun4phc.o: - $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCS_CFLAGS) \ + $(gpp) -Dcompilewgpp=1 -Dcompile4phc=1 $(DEMiCs_CFLAGS) \ -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp -o demicsrun4phc.o demicsrun.o: $(gpp) $(DEMiCs_CFLAGS) -c $(PHCAda)/Root_Counts/DEMiCs/demicsrun.cpp ts_demicsrun: inputData.o outputData.o iTest.o fTest.o \ - simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o + simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ + get_clock.o get_clocks_per_sec.o gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb gnatmake -c $(INCLULIBS) $(GNATFLAGS) ts_demicsrun.adb \ -o ts_demicsrun.o @@ -2086,10 +2134,10 @@ gnatbl -o $(BIN)/ts_cpm ts_cpm.ali ts_pieri_count: - gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_count.adb - gcc -c $(PHCAda)/CtoPHC/ts_pieri_count.c - gnatbind -n -C pieri_count - gnatlink -o $(BIN)/ts_pieri_count ts_pieri_count.o -C pieri_count + gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_root_count.adb + gcc -c $(PHCAda)/CtoPHC/Funky/ts_pieri_count.c + gnatbind -n pieri_root_count + gnatlink -o $(BIN)/ts_pieri_count ts_pieri_count.o -C pieri_root_count ts_pieri_solver: gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb @@ -2186,10 +2234,14 @@ corecountwindows.o: $(gcc) -c $(PHCAda)/Tasking/corecountwindows.c -o corecountwindows.o -ts_corecount: corecountwindows.o - gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb - gnatbind ts_corecount - gnatlink ts_corecount corecountwindows.o -o $(BIN)/ts_corecount +# ts_corecount: corecountwindows.o +# gnatmake -c $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb +# gnatbind ts_corecount +# gnatlink ts_corecount corecountwindows.o -o $(BIN)/ts_corecount + +ts_corecount: + gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_corecount.adb \ + -o $(BIN)/ts_corecount ts_mtmatvec: gnatmake $(INCLULIBS) $(GNATOPTFLAGS) ts_mtmatvec.adb \ @@ -2369,7 +2421,10 @@ simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o \ -o $(BIN)/ts_bbsolve --LINK=$(gpp) -ts_opthand: corecountwindows.o inputData.o outputData.o iTest.o fTest.o \ +ts_actopt: + gnatmake $(INCLULIBS) $(GNATFLAGS) ts_actopt.adb -o $(BIN)/ts_actopt + +ts_opthand: inputData.o outputData.o iTest.o fTest.o \ simplex4phc.o reltab.o mvc4phc.o demicsrun4phc.o mvc4phc.o \ parameter.o lib2path.o feedback.o lib.a $(gpp) -O2 -Dcompilewgpp=1 -c $(PHCLib)/syscon.c @@ -2380,7 +2435,7 @@ gnatmake -c $(INCLULIBS) $(GNATFLAGS) use_c2phc.adb gnatmake -c $(INCLULIBS) $(GNATFLAGS) pieri_solver.adb gnatbind ts_opthand use_c2phc pieri_solver - gnatlink ts_opthand corecountwindows.o inputData.o outputData.o \ + gnatlink ts_opthand inputData.o outputData.o \ iTest.o fTest.o simplex4phc.o reltab.o mvc4phc.o \ demicsrun4phc.o lib2path.o $(QD_LIB)/libqd.a \ syscon.o solcon.o phcpack.o parameter.o \ diff -Nru phcpack-2.4.84/src/READ_ME phcpack-2.4.85/src/READ_ME --- phcpack-2.4.84/src/READ_ME 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/READ_ME 2021-06-30 23:22:40.000000000 +0000 @@ -1,4 +1,4 @@ -The public distribution for PHCpack version 2.4.84 contains +The public distribution for PHCpack version 2.4.85 contains Ada Ada sources bin binary versions of phc @@ -12,6 +12,7 @@ and PHCpack.m2 with Elizabeth Gross and Sonja Petrovic, with contributions of Anton Leykin Maple simple Maple interface, forerunner of PHCmaple with Anton Leykin + Mod defines the code of the extension module for Python MPI parallel PHCpack, bindings to MPI, in collaboration with Yusong Wang, Anton Leykin, Yan Zhuang Objects makefile, .o and .ali files to create phc @@ -29,6 +30,7 @@ While 2.4 could be viewed as another major release, marking it as 2.4.00 simply continues the process of frequent releases. +release 2.4.85 on 2021-06-30 : phc -u has Laurent series; use of gprbuild release 2.4.84 on 2021-02-26 : new combined option phc -z -p or phc -p -z release 2.4.83 on 2020-12-15 : improved phc -u and phcpy 1.1.0 release 2.4.82 on 2020-11-30 : crash fixed in phc -b2 and -b4 diff -Nru phcpack-2.4.84/src/UPDATES phcpack-2.4.85/src/UPDATES --- phcpack-2.4.84/src/UPDATES 2021-02-27 02:40:51.000000000 +0000 +++ phcpack-2.4.85/src/UPDATES 2021-06-30 23:22:40.000000000 +0000 @@ -1 +1,4 @@ +Tue 22 Jun 2021 : new directory Mod with the code for the extension module + for Python, to define phcpy. + Mon 5 Oct 2015 : new directory cgi with scripts for the web interface.