 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
Go to the documentation of this file.
17 #include "factory/factory.h"
19 #ifdef TIME_WITH_SYS_TIME
21 # ifdef HAVE_SYS_TIME_H
22 # include <sys/time.h>
25 # ifdef HAVE_SYS_TIME_H
26 # include <sys/time.h>
31 #ifdef HAVE_SYS_TIMES_H
32 #include <sys/times.h>
138 #ifndef MAKE_DISTRIBUTION
139 #define HAVE_EXTENDED_SYSTEM 1
156 #ifdef HAVE_SIMPLEIPC
164 #ifndef MAKE_DISTRIBUTION
175 int n = singularMatrix->
rows();
177 unsigned long **longMatrix = 0;
178 longMatrix =
new unsigned long *[n] ;
179 for (
int i = 0 ;
i < n;
i++)
180 longMatrix[
i] =
new unsigned long [n];
182 for (
int r = 0; r < n; r++)
183 for (
int c = 0; c < n; c++)
185 poly
p=
MATELEM(singularMatrix, r + 1, c + 1);
195 longMatrix[r][c] = (
unsigned long)entryAsInt;
210 if ((
int)polyCoeffs[
i] != 0)
232 const char *sys_cmd=(
char *)(args->
Data());
237 if (strcmp(sys_cmd,
"nblocks") == 0)
259 r = (ring)
h->Data();
266 if(strcmp(sys_cmd,
"version")==0)
274 if(strcmp(sys_cmd,
"alarm")==0)
281 struct itimerval t,o;
282 memset(&t,0,
sizeof(t));
283 t.it_value.tv_sec =(unsigned)((
unsigned long)
h->Data());
284 setitimer(ITIMER_VIRTUAL,&t,&o);
292 if(strcmp(sys_cmd,
"cpu")==0)
295 #ifdef _SC_NPROCESSORS_ONLN
296 cpu=sysconf(_SC_NPROCESSORS_ONLN);
297 #elif defined(_SC_NPROCESSORS_CONF)
298 cpu=sysconf(_SC_NPROCESSORS_CONF);
300 res->data=(
void *)cpu;
306 if(strcmp(sys_cmd,
"executable")==0)
321 if(strcmp(sys_cmd,
"neworder")==0)
335 if(strcmp(sys_cmd,
"nc_hilb") == 0)
343 i = (ideal)
h->Data();
346 WerrorS(
"nc_Hilb:ideal expected");
351 lV = (int)(
long)
h->Data();
354 WerrorS(
"nc_Hilb:int expected");
360 if((
int)(
long)
h->Data() == 1)
362 else if((
int)(
long)
h->Data() == 2)
367 trunDegHs = (int)(
long)
h->Data();
372 WerrorS(
"nc_Hilb:int 1,2, total degree for the truncation, and a string for printing the details are expected");
381 if(strcmp(sys_cmd,
"rcolon") == 0)
386 ideal
i = (ideal)
h->Data();
388 poly
w=(poly)
h->Data();
390 int lV = (int)(
long)
h->Data();
401 if(strcmp(sys_cmd,
"sh")==0)
405 WerrorS(
"shell execution is disallowed in restricted mode");
411 res->data = (
void*)(
long)
system((
char*)(
h->Data()));
418 if(strcmp(sys_cmd,
"reduce_bound")==0)
428 p = (poly)
h->CopyD();
432 pid = (ideal)
h->CopyD();
437 ideal q = (ideal)
h->next->CopyD();
438 int bound = (int)(
long)
h->next->next->Data();
447 if(strcmp(sys_cmd,
"uname")==0)
455 if(strcmp(sys_cmd,
"with")==0)
465 #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
466 char *
s=(
char *)
h->Data();
479 #ifdef TEST_MAC_ORDER
484 #ifdef HAVE_DYNAMIC_LOADING
507 if (strcmp(sys_cmd,
"browsers")==0)
517 if (strcmp(sys_cmd,
"pid")==0)
520 res->data=(
void *)(
long) getpid();
525 if (strcmp(sys_cmd,
"getenv")==0)
530 const char *r=
getenv((
char *)
h->Data());
543 if (strcmp(sys_cmd,
"setenv")==0)
550 setenv((
char *)
h->Data(), (
char *)
h->next->Data(), 1);
560 WerrorS(
"setenv not supported on this platform");
566 if (strcmp(sys_cmd,
"Singular") == 0)
575 if (strcmp(sys_cmd,
"SingularLib") == 0)
585 if (strstr(sys_cmd,
"--") == sys_cmd)
587 if (strcmp(sys_cmd,
"--") == 0)
595 Werror(
"Unknown option %s", sys_cmd);
596 WerrorS(
"Use 'system(\"--\");' for listing of available options");
611 const char *r=(
const char*)
feOptSpec[opt].value;
625 WerrorS(
"Need string or int argument to set option value");
628 const char* errormsg;
633 Werror(
"Need string argument to set value of option %s", sys_cmd);
637 if (errormsg !=
NULL)
638 Werror(
"Option '--%s=%d' %s", sys_cmd, (
int) ((
long)
h->Data()), errormsg);
643 if (errormsg !=
NULL)
644 Werror(
"Option '--%s=%s' %s", sys_cmd, (
char*)
h->Data(), errormsg);
651 if (strcmp(sys_cmd,
"HC")==0)
659 if(strcmp(sys_cmd,
"random")==0)
682 if (strcmp(sys_cmd,
"std_syz") == 0)
688 i1=(ideal)
h->CopyD();
694 i2=(int)((
long)
h->Data());
703 if (strcmp(sys_cmd,
"denom_list")==0)
712 if(strcmp(sys_cmd,
"complexNearZero")==0)
719 WerrorS(
"unsupported ground field!");
726 (int)((
long)(
h->next->Data())));
737 if(strcmp(sys_cmd,
"getPrecDigits")==0)
742 WerrorS(
"unsupported ground field!");
753 if(strcmp(sys_cmd,
"lduDecomp")==0)
760 poly
l; poly u; poly prodLU;
761 lduDecomp(aMat, pMat, lMat, dMat, uMat,
l, u, prodLU);
772 res->data = (
char *)L;
782 if(strcmp(sys_cmd,
"lduSolve")==0)
816 poly
l = (poly)
h->next->next->next->next->Data();
817 poly u = (poly)
h->next->next->next->next->next->Data();
818 poly lTimesU = (poly)
h->next->next->next->next->next->next->Data();
819 matrix bVec = (
matrix)
h->next->next->next->next->next->next->next->Data();
823 Werror(
"first matrix (%d x %d) is not quadratic",
829 Werror(
"second matrix (%d x %d) is not quadratic",
835 Werror(
"third matrix (%d x %d) is not quadratic",
841 Werror(
"third matrix (%d x %d) and fourth matrix (%d x %d) %s",
848 Werror(
"fourth matrix (%d x %d) and vector (%d x 1) do not fit",
853 bVec, xVec, homogSolSpace);
876 if (strcmp(sys_cmd,
"shared") == 0)
878 #ifndef SI_COUNTEDREF_AUTOLOAD
885 else if (strcmp(sys_cmd,
"reference") == 0)
887 #ifndef SI_COUNTEDREF_AUTOLOAD
896 #ifdef HAVE_SIMPLEIPC
897 if (strcmp(sys_cmd,
"semaphore")==0)
903 v=(int)(
long)
h->next->next->Data();
910 WerrorS(
"Usage: system(\"semaphore\",<cmd>,int)");
917 if (strcmp(sys_cmd,
"reserve")==0)
925 res->data=(
void*)(
long)
p;
932 if (strcmp(sys_cmd,
"reservedLink")==0)
941 if (strcmp(sys_cmd,
"install")==0)
947 (
int)(
long)
h->next->next->next->Data(),
954 if (strcmp(sys_cmd,
"newstruct")==0)
960 char *n=(
char*)
h->Data();
967 newstruct_desc desc=(newstruct_desc)bb->data;
971 else Werror(
"'%s' is not a newstruct",n);
973 else Werror(
"'%s' is not a blackbox object",n);
979 if (strcmp(sys_cmd,
"blackbox")==0)
987 if (strcmp(sys_cmd,
"absFact") == 0)
1004 l->m[0].data=(
void *)
f;
1006 l->m[1].data=(
void *)
v;
1008 l->m[2].data=(
void*) mipos;
1010 l->m[3].data=(
void*) (
long) n;
1011 res->data=(
void *)
l;
1020 if (strcmp(sys_cmd,
"LLL") == 0)
1043 #if __FLINT_RELEASE >= 20500
1044 if (strcmp(sys_cmd,
"LLL_Flint") == 0)
1065 WerrorS(
"matrix,int or bigint,int expected");
1070 if(((
int)((
long)(
h->next->Data())) != 0) && (
int)((
long)(
h->next->Data()) != 1))
1072 WerrorS(
"int is different from 0, 1");
1076 if((
long)(
h->next->Data()) == 0)
1091 if((
long)(
h->next->Data()) == 1)
1097 for(
int i = 1;
i<=
m->rows();
i++)
1102 m = singflint_LLL(
m,
T);
1115 for(
int i = 1;
i<=
m->rows();
i++)
1117 m = singflint_LLL(
m,
T);
1137 #ifdef HAVE_SHIFTBBA
1138 if (strcmp(sys_cmd,
"stest") == 0)
1143 poly
p=(poly)
h->CopyD();
1145 int sh=(int)((
long)(
h->Data()));
1147 int uptodeg=(int)((
long)(
h->Data()));
1149 int lVblock=(int)((
long)(
h->Data()));
1152 WerrorS(
"negative shift for pLPshift");
1158 WerrorS(
"pLPshift: too big shift requested\n");
1170 #ifdef HAVE_SHIFTBBA
1171 if (strcmp(sys_cmd,
"btest") == 0)
1176 poly
p=(poly)
h->CopyD();
1178 int lV=(int)((
long)(
h->Data()));
1188 #ifdef HAVE_SHIFTBBA
1189 if (strcmp(sys_cmd,
"shrinktest") == 0)
1194 poly
p=(poly)
h->Data();
1196 int lV=(int)((
long)(
h->Data()));
1210 if(strcmp(sys_cmd,
"pcvLAddL")==0)
1215 if(strcmp(sys_cmd,
"pcvPMulL")==0)
1220 if(strcmp(sys_cmd,
"pcvMinDeg")==0)
1225 if(strcmp(sys_cmd,
"pcvP2CV")==0)
1230 if(strcmp(sys_cmd,
"pcvCV2P")==0)
1235 if(strcmp(sys_cmd,
"pcvDim")==0)
1240 if(strcmp(sys_cmd,
"pcvBasis")==0)
1247 #ifdef HAVE_EIGENVAL
1248 if(strcmp(sys_cmd,
"hessenberg")==0)
1255 #ifdef HAVE_EIGENVAL
1256 if(strcmp(sys_cmd,
"eigenvals")==0)
1263 #ifdef HAVE_EIGENVAL
1264 if(strcmp(sys_cmd,
"rowelim")==0)
1271 #ifdef HAVE_EIGENVAL
1272 if(strcmp(sys_cmd,
"rowcolswap")==0)
1280 if(strcmp(sys_cmd,
"gmsnf")==0)
1287 if(strcmp(sys_cmd,
"contributors") == 0)
1291 "Olaf Bachmann, Michael Brickenstein, Hubert Grassmann, Kai Krueger, Victor Levandovskyy, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Mathias Schulze, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
1296 #ifdef HAVE_SPECTRUM
1297 if(strcmp(sys_cmd,
"spectrum") == 0)
1311 if(((
long)
h->next->Data())==1L)
1317 if(strcmp(sys_cmd,
"semic") == 0)
1323 if (
h->next->next==
NULL)
1325 else if (
h->next->next->Typ()==
INT_CMD)
1332 if(strcmp(sys_cmd,
"spadd") == 0)
1343 if(strcmp(sys_cmd,
"spmul") == 0)
1355 #define HAVE_SHEAFCOH_TRICKS 1
1357 #ifdef HAVE_SHEAFCOH_TRICKS
1358 if(strcmp(sys_cmd,
"tensorModuleMult")==0)
1364 int m = (int)( (
long)
h->Data() );
1365 ideal
M = (ideal)
h->next->Data();
1376 if (strcmp(sys_cmd,
"twostd") == 0)
1381 I=(ideal)
h->CopyD();
1395 if (strcmp(sys_cmd,
"bracket") == 0)
1400 poly
p=(poly)
h->CopyD();
1402 poly q=(poly)
h->Data();
1413 if (strcmp(sys_cmd,
"env")==0)
1417 ring r = (ring)
h->Data();
1424 WerrorS(
"`system(\"env\",<ring>)` expected");
1432 if (strcmp(sys_cmd,
"opp")==0)
1436 ring r=(ring)
h->Data();
1443 WerrorS(
"`system(\"opp\",<ring>)` expected");
1451 if (strcmp(sys_cmd,
"oppose")==0)
1454 && (
h->next!=
NULL))
1456 ring Rop = (ring)
h->Data();
1469 WerrorS(
"`system(\"oppose\",<ring>,<poly>)` expected");
1477 #ifdef HAVE_SHIFTBBA
1478 if (strcmp(sys_cmd,
"freegb") == 0)
1483 ideal I=(ideal)
h->CopyD();
1485 int uptodeg=(int)((
long)(
h->Data()));
1487 int lVblock=(int)((
long)(
h->Data()));
1506 if (strcmp(sys_cmd,
"walkNextWeight") == 0)
1513 Werror(
"system(\"walkNextWeight\" ...) intvecs not of length %d\n",
1517 res->data = (
void*) walkNextWeight(((
intvec*)
h->Data()),
1519 (ideal)
h->next->next->Data());
1520 if (
res->data ==
NULL ||
res->data == (
void*) 1L)
1536 if (strcmp(sys_cmd,
"walkInitials") == 0)
1540 WerrorS(
"system(\"walkInitials\", ideal) expected");
1543 res->data = (
void*) walkInitials((ideal)
h->Data());
1553 if (strcmp(sys_cmd,
"walkAddIntVec") == 0)
1559 res->data = (
intvec*) walkAddIntVec(arg1, arg2);
1568 #ifdef MwaklNextWeight
1569 if (strcmp(sys_cmd,
"MwalkNextWeight") == 0)
1576 Werror(
"system(\"MwalkNextWeight\" ...) intvecs not of length %d\n",
1582 ideal arg3 = (ideal)
h->next->next->Data();
1589 #endif //MWalkNextWeight
1593 if(strcmp(sys_cmd,
"Mivdp") == 0)
1597 WerrorS(
"system(\"Mivdp\", int) expected");
1600 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1602 Werror(
"system(\"Mivdp\" ...) intvecs not of length %d\n",
1606 int arg1 = (int) ((
long)(
h->Data()));
1616 if(strcmp(sys_cmd,
"Mivlp") == 0)
1620 WerrorS(
"system(\"Mivlp\", int) expected");
1623 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1625 Werror(
"system(\"Mivlp\" ...) intvecs not of length %d\n",
1629 int arg1 = (int) ((
long)(
h->Data()));
1640 if(strcmp(sys_cmd,
"MpDiv") == 0)
1644 poly arg1 = (poly)
h->Data();
1645 poly arg2 = (poly)
h->next->Data();
1646 poly
result = MpDiv(arg1, arg2);
1657 if(strcmp(sys_cmd,
"MpMult") == 0)
1661 poly arg1 = (poly)
h->Data();
1662 poly arg2 = (poly)
h->next->Data();
1663 poly
result = MpMult(arg1, arg2);
1673 if (strcmp(sys_cmd,
"MivSame") == 0)
1694 res->data = (
void*)(
long)
MivSame(arg1, arg2);
1701 if (strcmp(sys_cmd,
"M3ivSame") == 0)
1724 res->data = (
void*)(
long)
M3ivSame(arg1, arg2, arg3);
1731 if(strcmp(sys_cmd,
"MwalkInitialForm") == 0)
1737 Werror(
"system \"MwalkInitialForm\"...) intvec not of length %d\n",
1741 ideal
id = (ideal)
h->Data();
1753 if(strcmp(sys_cmd,
"MivMatrixOrder") == 0)
1757 WerrorS(
"system(\"MivMatrixOrder\",intvec) expected");
1770 if(strcmp(sys_cmd,
"MivMatrixOrderdp") == 0)
1774 WerrorS(
"system(\"MivMatrixOrderdp\",intvec) expected");
1777 int arg1 = (int) ((
long)(
h->Data()));
1787 if(strcmp(sys_cmd,
"MPertVectors") == 0)
1791 ideal arg1 = (ideal)
h->Data();
1793 int arg3 = (int) ((
long)(
h->next->next->Data()));
1803 if(strcmp(sys_cmd,
"MPertVectorslp") == 0)
1807 ideal arg1 = (ideal)
h->Data();
1809 int arg3 = (int) ((
long)(
h->next->next->Data()));
1819 if(strcmp(sys_cmd,
"Mfpertvector") == 0)
1823 ideal arg1 = (ideal)
h->Data();
1834 if(strcmp(sys_cmd,
"MivUnit") == 0)
1838 int arg1 = (int) ((
long)(
h->Data()));
1848 if(strcmp(sys_cmd,
"MivWeightOrderlp") == 0)
1862 if(strcmp(sys_cmd,
"MivWeightOrderdp") == 0)
1866 WerrorS(
"system(\"MivWeightOrderdp\",intvec) expected");
1880 if(strcmp(sys_cmd,
"MivMatrixOrderlp") == 0)
1884 WerrorS(
"system(\"MivMatrixOrderlp\",int) expected");
1887 int arg1 = (int) ((
long)(
h->Data()));
1897 if (strcmp(sys_cmd,
"MkInterRedNextWeight") == 0)
1904 Werror(
"system(\"MkInterRedNextWeight\" ...) intvecs not of length %d\n",
1910 ideal arg3 = (ideal)
h->next->next->Data();
1920 #ifdef MPertNextWeight
1921 if (strcmp(sys_cmd,
"MPertNextWeight") == 0)
1927 Werror(
"system(\"MPertNextWeight\" ...) intvecs not of length %d\n",
1932 ideal arg2 = (ideal)
h->next->Data();
1933 int arg3 = (int)
h->next->next->Data();
1940 #endif //MPertNextWeight
1944 #ifdef Mivperttarget
1945 if (strcmp(sys_cmd,
"Mivperttarget") == 0)
1949 ideal arg1 = (ideal)
h->Data();
1950 int arg2 = (int)
h->next->Data();
1957 #endif //Mivperttarget
1961 if (strcmp(sys_cmd,
"Mwalk") == 0)
1968 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d\n",
1972 ideal arg1 = (ideal)
h->CopyD();
1975 ring arg4 = (ring)
h->next->next->next->Data();
1976 int arg5 = (int) (
long)
h->next->next->next->next->Data();
1977 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
1978 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3, arg4, arg5, arg6);
1988 if (strcmp(sys_cmd,
"Mwalk") == 0)
1997 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d or %d\n",
2001 ideal arg1 = (ideal)
h->Data();
2004 ring arg4 = (ring)
h->next->next->next->Data();
2005 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3,arg4);
2012 if (strcmp(sys_cmd,
"Mpwalk") == 0)
2019 Werror(
"system(\"Mpwalk\" ...) intvecs not of length %d\n",
currRing->N);
2022 ideal arg1 = (ideal)
h->Data();
2023 int arg2 = (int) (
long)
h->next->Data();
2024 int arg3 = (int) (
long)
h->next->next->Data();
2027 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
2028 int arg7 = (int) (
long)
h->next->next->next->next->next->next->Data();
2029 int arg8 = (int) (
long)
h->next->next->next->next->next->next->next->Data();
2030 ideal
result = (ideal)
Mpwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2040 if (strcmp(sys_cmd,
"Mrwalk") == 0)
2049 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2053 ideal arg1 = (ideal)
h->Data();
2056 int arg4 = (int)(
long)
h->next->next->next->Data();
2057 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2058 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2059 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2060 ideal
result = (ideal)
Mrwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2069 if (strcmp(sys_cmd,
"MAltwalk1") == 0)
2076 Werror(
"system(\"MAltwalk1\" ...) intvecs not of length %d\n",
2080 ideal arg1 = (ideal)
h->Data();
2081 int arg2 = (int) ((
long)(
h->next->Data()));
2082 int arg3 = (int) ((
long)(
h->next->next->Data()));
2095 if (strcmp(sys_cmd,
"Mfwalk_alt") == 0)
2102 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2106 ideal arg1 = (ideal)
h->Data();
2109 int arg4 = (int)
h->next->next->next->Data();
2110 ideal
result = (ideal) Mfwalk_alt(arg1, arg2, arg3, arg4);
2120 if (strcmp(sys_cmd,
"Mfwalk") == 0)
2127 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2131 ideal arg1 = (ideal)
h->Data();
2134 int arg4 = (int)(
long)
h->next->next->next->Data();
2135 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2136 ideal
result = (ideal)
Mfwalk(arg1, arg2, arg3, arg4, arg5);
2145 if (strcmp(sys_cmd,
"Mfrwalk") == 0)
2162 Werror(
"system(\"Mfrwalk\" ...) intvecs not of length %d or %d\n",
2167 ideal arg1 = (ideal)
h->Data();
2170 int arg4 = (int)(
long)
h->next->next->next->Data();
2171 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2172 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2173 ideal
result = (ideal)
Mfrwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2180 if (strcmp(sys_cmd,
"Mprwalk") == 0)
2189 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2193 ideal arg1 = (ideal)
h->Data();
2196 int arg4 = (int)(
long)
h->next->next->next->Data();
2197 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2198 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2199 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2200 int arg8 = (int)(
long)
h->next->next->next->next->next->next->next->Data();
2201 int arg9 = (int)(
long)
h->next->next->next->next->next->next->next->next->Data();
2202 ideal
result = (ideal)
Mprwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2212 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2219 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2223 ideal arg1 = (ideal)
h->Data();
2236 if (strcmp(sys_cmd,
"MAltwalk2") == 0)
2243 Werror(
"system(\"MAltwalk2\" ...) intvecs not of length %d\n",
2247 ideal arg1 = (ideal)
h->Data();
2259 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2266 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2270 ideal arg1 = (ideal)
h->Data();
2273 int arg4 = (int) ((
long)(
h->next->next->next->Data()));
2284 if (strcmp(sys_cmd,
"TranMrImprovwalk") == 0)
2289 h->next->next->next ==
NULL ||
h->next->next->next->Typ() !=
INT_CMD ||
2290 h->next->next->next ==
NULL ||
h->next->next->next->next->Typ() !=
INT_CMD ||
2291 h->next->next->next ==
NULL ||
h->next->next->next->next->next->Typ() !=
INT_CMD)
2293 WerrorS(
"system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
2299 Werror(
"system(\"TranMrImprovwalk\" ...) intvecs not of length %d\n",
currRing->N);
2302 ideal arg1 = (ideal)
h->Data();
2305 int arg4 = (int)(
long)
h->next->next->next->Data();
2306 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2307 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2308 ideal
result = (ideal) TranMrImprovwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2318 #ifndef MAKE_DISTRIBUTION
2329 #ifdef HAVE_EXTENDED_SYSTEM
2333 # include "hc_newton.h"
2344 char *sys_cmd=(
char *)(
h->Data());
2347 if (strcmp(sys_cmd,
"syz") == 0)
2351 const char *
s=(
const char *)
h->Data();
2352 if (strcmp(
s,
"posInT_EcartFDegpLength")==0)
2354 else if (strcmp(
s,
"posInT_FDegpLength")==0)
2356 else if (strcmp(
s,
"posInT_pLength")==0)
2358 else if (strcmp(
s,
"posInT0")==0)
2360 else if (strcmp(
s,
"posInT1")==0)
2362 else if (strcmp(
s,
"posInT2")==0)
2364 else if (strcmp(
s,
"posInT11")==0)
2366 else if (strcmp(
s,
"posInT110")==0)
2368 else if (strcmp(
s,
"posInT13")==0)
2370 else if (strcmp(
s,
"posInT15")==0)
2372 else if (strcmp(
s,
"posInT17")==0)
2374 else if (strcmp(
s,
"posInT17_c")==0)
2376 else if (strcmp(
s,
"posInT19")==0)
2378 else PrintS(
"valid posInT:0,1,2,11,110,13,15,17,17_c,19,_EcartFDegpLength,_FDegpLength,_pLength,_EcartpLength\n");
2390 if(strcmp(sys_cmd,
"locNF")==0)
2395 poly
f=(poly)
h->Data();
2397 ideal
m=(ideal)
h->Data();
2400 int n=(int)((
long)
h->Data());
2465 if(strcmp(sys_cmd,
"p")==0)
2470 WarnS(
"Sorry: not available for release build!");
2476 if(strcmp(sys_cmd,
"setsyzcomp")==0)
2480 int k = (int)(
long)
h->Data();
2488 if(strcmp(sys_cmd,
"r")==0)
2493 WarnS(
"Sorry: not available for release build!");
2505 if(strcmp(sys_cmd,
"changeRing")==0)
2509 for (
int i = 1;
i <= varN;
i++)
2512 sprintf(
h,
"x%d",
i);
2517 res->data = (
void*)0L;
2522 if(strcmp(sys_cmd,
"mtrack")==0)
2533 char *fn=(
char*)
h->Data();
2534 fd = fopen(fn,
"w");
2536 Warn(
"Can not open %s for writing og mtrack. Using stdout",fn);
2540 max = (int)(
long)
h->Data();
2549 WerrorS(
"system(\"mtrack\",..) is not implemented in this version");
2556 if(strcmp(sys_cmd,
"backtrace")==0)
2564 #if !defined(OM_NDEBUG)
2566 if (strcmp(sys_cmd,
"omMemoryTest")==0)
2570 PrintS(
"\n[om_Info]: \n");
2572 #define OM_PRINT(name) Print(" %-22s : %10ld \n", #name, om_Info . name)
2573 OM_PRINT(MaxBytesSystem);
2574 OM_PRINT(CurrentBytesSystem);
2575 OM_PRINT(MaxBytesSbrk);
2576 OM_PRINT(CurrentBytesSbrk);
2577 OM_PRINT(MaxBytesMmap);
2578 OM_PRINT(CurrentBytesMmap);
2579 OM_PRINT(UsedBytes);
2580 OM_PRINT(AvailBytes);
2581 OM_PRINT(UsedBytesMalloc);
2582 OM_PRINT(AvailBytesMalloc);
2583 OM_PRINT(MaxBytesFromMalloc);
2584 OM_PRINT(CurrentBytesFromMalloc);
2585 OM_PRINT(MaxBytesFromValloc);
2586 OM_PRINT(CurrentBytesFromValloc);
2587 OM_PRINT(UsedBytesFromValloc);
2588 OM_PRINT(AvailBytesFromValloc);
2590 OM_PRINT(UsedPages);
2591 OM_PRINT(AvailPages);
2592 OM_PRINT(MaxRegionsAlloc);
2593 OM_PRINT(CurrentRegionsAlloc);
2598 PrintS(
"\n[om_Opts]: \n");
2599 #define OM_PRINT(format, name) Print(" %-22s : %10" format"\n", #name, om_Opts . name)
2600 OM_PRINT(
"d", MinTrack);
2601 OM_PRINT(
"d", MinCheck);
2602 OM_PRINT(
"d", MaxTrack);
2603 OM_PRINT(
"d", MaxCheck);
2604 OM_PRINT(
"d", Keep);
2605 OM_PRINT(
"d", HowToReportErrors);
2606 OM_PRINT(
"d", MarkAsStatic);
2607 OM_PRINT(
"u", PagesPerRegion);
2608 OM_PRINT(
"p", OutOfMemoryFunc);
2609 OM_PRINT(
"p", MemoryLowFunc);
2610 OM_PRINT(
"p", ErrorHook);
2615 Print(
"\n\n[om_ErrorStatus] : '%s' (%s)\n",
2618 Print(
"[om_InternalErrorStatus]: '%s' (%s)\n",
2631 #if defined(PDEBUG) || defined(PDIV_DEBUG)
2632 if(strcmp(sys_cmd,
"pDivStat")==0)
2642 if(strcmp(sys_cmd,
"red")==0)
2657 if(strcmp(sys_cmd,
"fastcomb")==0)
2665 WarnS(
"Wrong types for poly= comb(ideal,poly)");
2670 (ideal)
h->Data(),(poly)
h->next->Data());
2678 if(strcmp(sys_cmd,
"comb")==0)
2686 WarnS(
"Wrong types for poly= comb(ideal,poly)");
2691 (ideal)
h->Data(),(poly)
h->next->Data());
2700 if(strcmp(sys_cmd,
"listall")==0)
2702 void listall(
int showproc);
2704 if ((
h!=
NULL) && (
h->Typ()==
INT_CMD)) showproc=(int)((
long)
h->Data());
2712 if(strcmp(sys_cmd,
"proclist")==0)
2714 void piShowProcList();
2722 if(strcmp(sys_cmd,
"newton")==0)
2726 || (
h->next->next->Typ()!=
INT_CMD))
2728 WerrorS(
"system(\"newton\",<poly>,<int>,<int>) expected");
2731 poly
p=(poly)(
h->Data());
2750 (
int) (
h->next->Data()),
2751 (
int) (
h->next->next->Data())
2764 L->
m[1].
data=(
void *)(
long)r.achse;
2766 L->
m[2].
data=(
void *)(
long)r.deg;
2770 L->
m[3].
data=(
void *)(
long)r.anz_punkte;
2772 int anz = r.anz_punkte;
2775 for (
i=0;
i<anz*
dim;
i++)
2785 (*w)[
i] = r.deg_tab[
i];
2788 while (r.deg_tab[
i-1] != -2);
2799 res->data=(
void *)L;
2822 if (strcmp(sys_cmd,
"minpoly") == 0)
2826 Werror(
"expected exactly one argument: %s",
2827 "a square matrix with number entries");
2837 WerrorS(
"expected exactly one argument: "
2838 "a square matrix with number entries");
2845 res->data = (
void *)theMinPoly;
2846 for (
int i = 0;
i < n;
i++)
delete[] ml[
i];
2848 delete[] polyCoeffs;
2855 if (strcmp(sys_cmd,
"sdb_flags") == 0)
2863 WerrorS(
"system(\"sdb_flags\",`int`) expected");
2872 if (strcmp(sys_cmd,
"sdb_edit") == 0)
2881 WerrorS(
"system(\"sdb_edit\",`proc`) expected");
2889 #if 0 // for testing only
2890 if (strcmp(sys_cmd,
"GF") == 0)
2907 if (strcmp(sys_cmd,
"svd") == 0)
2922 if (strcmp(sys_cmd,
"DLL") == 0)
2924 typedef void (*Void_Func)();
2925 typedef int (*Int_Func)(int);
2935 if (
f!=
NULL) printf(
"%d\n",
f(
i));
2936 else PrintS(
"cannot find PlusDll\n");
2944 else PrintS(
"cannot find TestDll\n");
2951 #ifdef HAVE_RING2TOM
2953 if (strcmp(sys_cmd,
"findZeroPoly")==0)
2956 poly
f = (poly)
h->Data();
2963 #ifdef HAVE_VANIDEAL
2964 if (strcmp(sys_cmd,
"createG0")==0)
2989 if (strcmp(sys_cmd,
"redNF_ring")==0)
2992 poly
f = (poly)
h->Data();
2994 ideal
G = (ideal)
h->Data();
3002 if (strcmp(sys_cmd,
"hilbroune") == 0)
3014 if (strcmp(sys_cmd,
"f5")==0)
3023 ideal
G = (ideal)
h->Data();
3027 opt = (int) (
long)
h->Data();
3035 plus = (int) (
long)
h->Data();
3043 termination = (int) (
long)
h->Data();
3049 res->data=(ideal)
F5main(
G,r,opt,plus,termination);
3056 if (strcmp(sys_cmd,
"NF_ring")==0)
3059 poly
f = (poly)
h->Data();
3061 ideal
G = (ideal)
h->Data();
3067 if (strcmp(sys_cmd,
"spoly")==0)
3069 poly
f =
pCopy((poly)
h->Data());
3071 poly
g =
pCopy((poly)
h->Data());
3078 if (strcmp(sys_cmd,
"testGB")==0)
3080 ideal I = (ideal)
h->Data();
3082 ideal GI = (ideal)
h->Data();
3084 res->data = (
void *)(
long)
testGB(I, GI);
3091 if ( (strcmp(sys_cmd,
"AltVarStart") == 0) || (strcmp(sys_cmd,
"AltVarEnd") == 0) )
3097 WerrorS(
"`system(\"AltVarStart/End\"[,<ring>])` expected");
3105 if(strcmp(sys_cmd,
"AltVarStart") == 0)
3112 WerrorS(
"`system(\"AltVarStart/End\",<ring>) requires a SCA ring");
3118 #ifdef HAVE_RATGRING
3119 if (strcmp(sys_cmd,
"intratNF") == 0)
3134 I=(ideal)
h->CopyD();
3142 is=(int)((
long)(
h->Data()));
3150 for(
k=0;
k < id;
k++)
3154 PrintS(
"starting redRat\n");
3172 if (strcmp(sys_cmd,
"ratNF") == 0)
3191 is=(int)((
long)(
h->Data()));
3206 if (strcmp(sys_cmd,
"ratSpoly") == 0)
3224 is=(int)((
long)(
h->Data()));
3238 #endif // HAVE_RATGRING
3240 if (strcmp(sys_cmd,
"ratVar") == 0)
3257 return (start==0)||(end==0)||(start>end);
3261 if (strcmp(sys_cmd,
"unifastmult")==0)
3263 poly
f = (poly)
h->Data();
3265 poly
g=(poly)
h->Data();
3271 if (strcmp(sys_cmd,
"multifastmult")==0)
3273 poly
f = (poly)
h->Data();
3275 poly
g=(poly)
h->Data();
3281 if (strcmp(sys_cmd,
"mults")==0)
3288 if (strcmp(sys_cmd,
"fastpower")==0)
3291 poly
f = (poly)
h->Data();
3293 int n=(int)((
long)
h->Data());
3299 if (strcmp(sys_cmd,
"normalpower")==0)
3301 poly
f = (poly)
h->Data();
3303 int n=(int)((
long)
h->Data());
3309 if (strcmp(sys_cmd,
"MCpower")==0)
3312 poly
f = (poly)
h->Data();
3314 int n=(int)((
long)
h->Data());
3320 if (strcmp(sys_cmd,
"bit_subst")==0)
3323 poly outer = (poly)
h->Data();
3325 poly inner=(poly)
h->Data();
3332 if (strcmp(sys_cmd,
"gcd") == 0)
3347 int d=(int)(
long)
h->next->Data();
3348 char *
s=(
char *)
h->Data();
3363 if (strcmp(sys_cmd,
"subring") == 0)
3377 if (strcmp(sys_cmd,
"HNF") == 0)
3399 WerrorS(
"expected `system(\"HNF\",<matrix|intmat|bigintmat>)`");
3407 if (strcmp (sys_cmd,
"probIrredTest") == 0)
3412 char *
s=(
char *)
h->next->Data();
3424 if(strcmp(sys_cmd,
"GNUmpLoad")==0)
3428 char* filename = (
char*)
h->Data();
3429 FILE*
f = fopen(filename,
"r");
3432 WerrorS(
"invalid file name (in paths use '/')");
3435 mpz_t
m; mpz_init(
m);
3436 mpz_inp_str(
m,
f, 10);
3440 res->data = (
void*)n;
3445 WerrorS(
"expected valid file name as a string");
3457 if(strcmp(sys_cmd,
"intvecMatchingSegments")==0)
3461 (
h->next->next ==
NULL))
3466 int validEntries = 0;
3467 for (
int k = 0;
k <= ivec->
rows() - jvec->
rows();
k++)
3469 if (memcmp(&(*ivec)[
k], &(*jvec)[0],
3470 sizeof(
int) * jvec->
rows()) == 0)
3472 if (validEntries == 0)
3476 r->
resize(validEntries + 1);
3477 (*r)[validEntries] =
k + 1;
3483 res->data = (
void*)r;
3488 WerrorS(
"expected two non-empty intvecs as arguments");
3499 if(strcmp(sys_cmd,
"intvecOverlap")==0)
3503 (
h->next->next ==
NULL))
3507 int ir = ivec->
rows();
int jr = jvec->
rows();
3508 int r = jr;
if (ir < jr) r = ir;
3509 while ((r >= 1) && (memcmp(&(*ivec)[ir - r], &(*jvec)[0],
3510 sizeof(
int) * r) != 0))
3513 res->data = (
void*)(
long)r;
3518 WerrorS(
"expected two non-empty intvecs as arguments");
3524 if(strcmp(sys_cmd,
"henselfactors")==0)
3529 (
h->next->next->next !=
NULL) &&
3530 (
h->next->next->next->Typ() ==
POLY_CMD) &&
3531 (
h->next->next->next->next !=
NULL) &&
3532 (
h->next->next->next->next->Typ() ==
POLY_CMD) &&
3533 (
h->next->next->next->next->next !=
NULL) &&
3534 (
h->next->next->next->next->next->Typ() ==
INT_CMD) &&
3535 (
h->next->next->next->next->next->next ==
NULL))
3537 int xIndex = (int)(
long)
h->Data();
3538 int yIndex = (int)(
long)
h->next->Data();
3539 poly hh = (poly)
h->next->next->Data();
3540 poly f0 = (poly)
h->next->next->next->Data();
3541 poly g0 = (poly)
h->next->next->next->next->Data();
3542 int d = (int)(
long)
h->next->next->next->next->next->Data();
3550 res->data = (
char *)L;
3555 WerrorS(
"expected argument list (int, int, poly, poly, poly, int)");
3562 if (strcmp(sys_cmd,
"astep") == 0)
3567 I=(ideal)
h->CopyD();
3580 if (strcmp(sys_cmd,
"PrintMat") == 0)
3590 a=(int)((
long)(
h->Data()));
3595 b=(int)((
long)(
h->Data()));
3610 metric=(int)((
long)(
h->Data()));
3621 if(strcmp(sys_cmd,
"NCUseExtensions")==0)
3634 if(strcmp(sys_cmd,
"NCGetType")==0)
3640 res->data=(
void *)(-1L);
3647 if(strcmp(sys_cmd,
"ForceSCA")==0)
3654 b = (int)((
long)(
h->Data()));
3660 e = (int)((
long)(
h->Data()));
3671 if(strcmp(sys_cmd,
"ForceNewNCMultiplication")==0)
3683 if(strcmp(sys_cmd,
"ForceNewOldNCMultiplication")==0)
3695 if(strcmp(sys_cmd,
"test64")==0)
3711 Print(
"SIZEOF_LONG=%d\n",SIZEOF_LONG);
3717 if(strcmp(sys_cmd,
"cache_chinrem")==0)
3728 if(strcmp(sys_cmd,
"LU")==0)
3738 res->data=(
char*)bb;
3743 WerrorS(
"system(\"LU\",<cmatrix>) expected");
3750 if(strcmp(sys_cmd,
"sort")==0)
3760 if(strcmp(sys_cmd,
"uniq")==0)
3770 if(strcmp(sys_cmd,
"tensor")==0)
3784 if(strcmp(sys_cmd,
"GF")==0)
3789 int p=(int)(
long)
h->Data();
3790 int n=(int)(
long)
h->next->Data();
3791 char *
v=(
char*)
h->next->next->CopyD();
3807 if(strcmp(sys_cmd,
"power1")==0)
3810 poly
f=(poly)
h->CopyD();
3812 res->data=(
void *)
g;
3816 if(strcmp(sys_cmd,
"power2")==0)
3819 poly
f=(poly)
h->Data();
3821 for(
int i=0;
i<2000;
i++)
3823 res->data=(
void *)
g;
3826 if(strcmp(sys_cmd,
"power3")==0)
3829 poly
f=(poly)
h->Data();
3840 poly p1536=
pMult(p1024,p512);
3841 poly p1792=
pMult(p1536,p256);
3842 poly p1920=
pMult(p1792,p128);
3843 poly p1984=
pMult(p1920,p64);
3844 poly p2000=
pMult(p1984,p16);
3845 res->data=(
void *)p2000;
3870 #endif // HAVE_EXTENDED_SYSTEM
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
BOOLEAN jjUNIQLIST(leftv, leftv arg)
void omPrintUsedTrackAddrs(FILE *fd, int max_frames)
#define pLmDeleteAndNext(p)
like pLmDelete, returns pNext(p)
void error(const char *fmt,...)
BOOLEAN ncInitSpecialPairMultiplication(ring r)
void countedref_shared_load()
static BOOLEAN rField_is_long_R(const ring r)
ideal twostd(ideal I)
Compute two-sided GB:
ideal TranMImprovwalk(ideal G, intvec *curr_weight, intvec *target_tmp, int nP)
poly multifastmult(poly f, poly g, ring r)
ideal Mwalk(ideal Go, intvec *orig_M, intvec *target_M, ring baseRing, int reduction, int printout)
int posInT17_c(const TSet set, const int length, LObject &p)
BOOLEAN spectrumfProc(leftv result, leftv first)
lists gmsNF(ideal p, ideal g, matrix B, int D, int K)
void rDebugPrint(const ring r)
#define MATELEM(mat, i, j)
poly fglmNewLinearCombination(ideal source, poly monset)
poly nc_rat_ReduceSpolyNew(const poly p1, poly p2, int ishift, const ring r)
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Creation data needed for finite fields.
void p_DebugPrint(poly p, const ring r)
#define pGetExp(p, i)
Exponent.
matrix evRowElim(matrix M, int i, int j, int k)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
int posInT17(const TSet set, const int length, LObject &p)
intvec * MwalkNextWeight(intvec *curr_weight, intvec *target_weight, ideal G)
int redRat(poly *h, poly *reducer, int *red_length, int rl, int ishift, ring r)
intvec * MPertVectorslp(ideal G, intvec *ivtarget, int pdeg)
static nc_type & ncRingType(nc_struct *p)
int M3ivSame(intvec *temp, intvec *u, intvec *v)
feOptIndex feGetOptIndex(const char *name)
CFList int bool & irred
[in,out] Is A irreducible?
static coordinates * points
ideal freegb(ideal I, int uptodeg, int lVblock)
const char * omError2String(omError_t error)
poly pFastPowerMC(poly f, int n, ring r)
int posInT110(const TSet set, const int length, LObject &p)
short * iv2array(intvec *iv, const ring R)
static BOOLEAN length(leftv result, leftv arg)
ideal Mpwalk(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight, int nP, int reduction, int printout)
BOOLEAN spmulProc(leftv result, leftv first, leftv second)
const char * feSetOptValue(feOptIndex opt, char *optarg)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
void feStringAppendBrowsers(int warn)
BOOLEAN jjSORTLIST(leftv, leftv arg)
BOOLEAN semicProc3(leftv res, leftv u, leftv v, leftv w)
void sdb_edit(procinfo *pi)
ideal mp_Tensor(ideal A, ideal B, const ring r)
int pcvBasis(lists b, int i, poly m, int d, int n)
void printBlackboxTypes()
list all defined type (for debugging)
int setNCExtensions(int iMask)
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
poly kNFBound(ideal F, ideal Q, poly p, int bound, int syzComp, int lazyReduce)
Class used for (list of) interpreter objects.
int testGB(ideal I, ideal GI)
poly pFastPower(poly f, int n, ring r)
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
matrix evSwap(matrix M, int i, int j)
#define omPrintCurrentBackTrace(fd)
poly pOppose(ring Rop_src, poly p, const ring Rop_dst)
opposes a vector p from Rop to currRing (dst!)
int posInT19(const TSet set, const int length, LObject &p)
void factoryseed(int s)
random seed initializer
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
void HilbertSeries_OrbitData(ideal S, int lV, bool IG_CASE, bool mgrad, bool odp, int trunDegHs)
static const int SW_USE_EZGCD
set to 1 to use EZGCD over Z
bool sca_Force(ring rGR, int b, int e)
int ssiReservePort(int clients)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
ideal MAltwalk2(ideal Go, intvec *curr_weight, intvec *target_weight)
omError_t om_InternalErrorStatus
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
const char * omError2Serror(omError_t error)
void countedref_reference_load()
Initialize blackbox types 'reference' and 'shared', or both.
ideal Mprwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int op_deg, int tp_deg, int nP, int reduction, int printout)
number n_convFactoryNSingN(const CanonicalForm n, const coeffs r)
int posInT2(const TSet set, const int length, LObject &p)
void PrintS(const char *s)
lists pcvPMulL(poly p, lists l1)
bool luSolveViaLDUDecomp(const matrix pMat, const matrix lMat, const matrix dMat, const matrix uMat, const poly l, const poly u, const poly lTimesU, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LDU-decomposit...
#define omFreeSize(addr, size)
intvec * Mivperttarget(ideal G, int ndeg)
void lduDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &dMat, matrix &uMat, poly &l, poly &u, poly &lTimesU)
LU-decomposition of a given (m x n)-matrix with performing only those divisions that yield zero remai...
int MivSame(intvec *u, intvec *v)
int posInT_pLength(const TSet set, const int length, LObject &p)
matrix mp_Transp(matrix a, const ring R)
ideal Mfwalk(ideal G, intvec *ivstart, intvec *ivtarget, int reduction, int printout)
static short scaFirstAltVar(ring r)
static BOOLEAN rField_is_Ring(const ring r)
void henselFactors(const int xIndex, const int yIndex, const poly h, const poly f0, const poly g0, const int d, poly &f, poly &g)
Computes a factorization of a polynomial h(x, y) in K[[x]][y] up to a certain degree in x,...
ideal RightColonOperation(ideal S, poly w, int lV)
poly pcvCV2P(poly cv, int d0, int d1)
BOOLEAN semicProc(leftv res, leftv u, leftv v)
static int max(int a, int b)
intvec * MivMatrixOrderdp(int nV)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
void resize(int new_length)
BOOLEAN spaddProc(leftv result, leftv first, leftv second)
matrix singntl_HNF(matrix m, const ring s)
ideal F5main(ideal id, ring r, int opt, int plus, int termination)
static const int SW_USE_CHINREM_GCD
set to 1 to use modular gcd over Z
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
intvec * MivMatrixOrder(intvec *iv)
static int rBlocks(ring r)
poly uni_subst_bits(poly outer_uni, poly inner_multi, ring r)
char * omFindExec(const char *name, char *exec)
intvec * MivWeightOrderdp(intvec *ivstart)
matrix mpNew(int r, int c)
create a r x c zero-matrix
CanonicalForm n_convSingNFactoryN(number n, BOOLEAN setChar, const coeffs r)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
ideal MwalkInitialForm(ideal G, intvec *ivw)
int posInT13(const TSet set, const int length, LObject &p)
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
void n_Print(number &a, const coeffs r)
print a number (BEWARE of string buffers!) mostly for debugging
intvec * MPertVectors(ideal G, intvec *ivtarget, int pdeg)
poly plain_spoly(poly f, poly g)
CanonicalForm convSingPFactoryP(poly p, const ring r)
matrix mp_InitI(int r, int c, int v, const ring R)
make it a v * unit matrix
poly nc_rat_CreateSpoly(poly pp1, poly pp2, int ishift, const ring r)
struct fe_option feOptSpec[]
poly ringRedNF(poly f, ideal G, ring r)
ideal MAltwalk1(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight)
intvec * MivMatrixOrderlp(int nV)
void * dynl_open(char *filename)
#define IMATELEM(M, I, J)
static char * feResource(feResourceConfig config, int warn)
static poly p_Add_q(poly p, poly q, const ring r)
BOOLEAN newstruct_set_proc(const char *bbname, const char *func, int args, procinfov pr)
bool complexNearZero(gmp_complex *c, int digits)
intvec * MkInterRedNextWeight(intvec *iva, intvec *ivb, ideal G)
int probIrredTest(const CanonicalForm &F, double error)
given some error probIrredTest detects irreducibility or reducibility of F with confidence level 1-er...
int pcvDim(int d0, int d1)
void StringSetS(const char *st)
BOOLEAN spectrumProc(leftv result, leftv first)
void pPrintDivisbleByStat()
ideal Approx_Step(ideal L)
Ann: ???
static const int SW_USE_EZGCD_P
set to 1 to use EZGCD over F_q
static CanonicalForm bound(const CFMatrix &M)
poly p_Shrink(poly p, int lV, const ring r)
unsigned long * computeMinimalPolynomial(unsigned long **matrix, unsigned n, unsigned long p)
ideal id_Vec2Ideal(poly vec, const ring R)
void omMarkAsStaticAddr(void *addr)
poly pcvP2CV(poly p, int d0, int d1)
void rSetSyzComp(int k, const ring r)
void Werror(const char *fmt,...)
ideal idXXX(ideal h1, int k)
#define pLastVblock(p, lV)
static short scaLastAltVar(ring r)
BOOLEAN assumeStdFlag(leftv h)
void * dynl_sym(void *handle, const char *symbol)
void WerrorS(const char *s)
matrix singntl_LLL(matrix m, const ring s)
int posInT1(const TSet set, const int length, LObject &p)
intvec * MPertNextWeight(intvec *iva, ideal G, int deg)
int simpleipc_cmd(char *cmd, int id, int v)
#define BIMATELEM(M, I, J)
lists pcvLAddL(lists l1, lists l2)
lists evEigenvals(matrix M)
ideal Mrwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int pert_deg, int reduction, int printout)
const char feNotImplemented[]
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
matrix evHessenberg(matrix M)
static void p_Setm(poly p, const ring r)
const Variable & v
< [in] a sqrfree bivariate poly
matrix nc_PrintMat(int a, int b, ring r, int metric)
returns matrix with the info on noncomm multiplication
INLINE_THIS void Init(int l=0)
intvec * MivWeightOrderlp(intvec *ivstart)
const CanonicalForm int s
BOOLEAN iiCheckTypes(leftv args, const short *type_list, int report)
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (...
intvec * Mfpertvector(ideal G, intvec *ivtarget)
static void * feOptValue(feOptIndex opt)
#define pCopy(p)
return a copy of the poly
poly ringNF(poly f, ideal G, ring r)
static const int SW_USE_QGCD
set to 1 to use Encarnacion GCD over Q(a)
int posInT15(const TSet set, const int length, LObject &p)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
int posInT0(const TSet, const int length, LObject &)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
poly fglmLinearCombination(ideal source, poly monset)
ideal Mfrwalk(ideal G, intvec *ivstart, intvec *ivtarget, int weight_rad, int reduction, int printout)
static bool rIsSCA(const ring r)
static BOOLEAN rField_is_long_C(const ring r)
poly p_LPshift(poly p, int sh, int uptodeg, int lV, const ring r)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
void newstructShow(newstruct_desc d)
ideal singclap_absFactorize(poly f, ideal &mipos, intvec **exps, int &numFactors, const ring r)
int posInT11(const TSet set, const int length, LObject &p)
poly unifastmult(poly f, poly g, ring r)
ring rSubring(ring org_ring, sleftv *rv)
gmp_complex numbers based on
char * singclap_neworder(ideal I, const ring r)
ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...