 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
Go to the source code of this file.
|
enum | semicState {
semicOK,
semicMulNegative,
semicListTooShort,
semicListTooLong,
semicListFirstElementWrongType,
semicListSecondElementWrongType,
semicListThirdElementWrongType,
semicListFourthElementWrongType,
semicListFifthElementWrongType,
semicListSixthElementWrongType,
semicListNNegative,
semicListWrongNumberOfNumerators,
semicListWrongNumberOfDenominators,
semicListWrongNumberOfMultiplicities,
semicListMuNegative,
semicListPgNegative,
semicListNumNegative,
semicListDenNegative,
semicListMulNegative,
semicListNotSymmetric,
semicListNotMonotonous,
semicListMilnorWrong,
semicListPGWrong
} |
|
enum | spectrumState {
spectrumOK,
spectrumZero,
spectrumBadPoly,
spectrumNoSingularity,
spectrumNotIsolated,
spectrumDegenerate,
spectrumWrongRing,
spectrumNoHC,
spectrumUnspecErr
} |
|
|
const char * | iiTwoOps (int t) |
|
int | iiOpsTwoChar (const char *s) |
|
static void | list1 (const char *s, idhdl h, BOOLEAN c, BOOLEAN fullname) |
|
void | type_cmd (leftv v) |
|
static void | killlocals0 (int v, idhdl *localhdl, const ring r) |
|
void | killlocals_rec (idhdl *root, int v, ring r) |
|
BOOLEAN | killlocals_list (int v, lists L) |
|
void | killlocals (int v) |
|
void | list_cmd (int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname) |
|
void | test_cmd (int i) |
|
int | exprlist_length (leftv v) |
|
BOOLEAN | iiWRITE (leftv, leftv v) |
|
leftv | iiMap (map theMap, const char *what) |
|
void | iiMakeResolv (resolvente r, int length, int rlen, char *name, int typ0, intvec **weights) |
|
static resolvente | iiCopyRes (resolvente r, int l) |
|
BOOLEAN | jjMINRES (leftv res, leftv v) |
|
BOOLEAN | jjBETTI (leftv res, leftv u) |
|
BOOLEAN | jjBETTI2_ID (leftv res, leftv u, leftv v) |
|
BOOLEAN | jjBETTI2 (leftv res, leftv u, leftv v) |
|
int | iiRegularity (lists L) |
|
void | iiDebug () |
|
lists | scIndIndset (ideal S, BOOLEAN all, ideal Q) |
|
int | iiDeclCommand (leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b) |
|
BOOLEAN | iiDefaultParameter (leftv p) |
|
BOOLEAN | iiBranchTo (leftv, leftv args) |
|
BOOLEAN | iiParameter (leftv p) |
|
static BOOLEAN | iiInternalExport (leftv v, int toLev) |
|
BOOLEAN | iiInternalExport (leftv v, int toLev, package rootpack) |
|
BOOLEAN | iiExport (leftv v, int toLev) |
|
BOOLEAN | iiExport (leftv v, int toLev, package pack) |
|
BOOLEAN | iiCheckRing (int i) |
|
poly | iiHighCorner (ideal I, int ak) |
|
void | iiCheckPack (package &p) |
|
idhdl | rDefault (const char *s) |
|
idhdl | rFindHdl (ring r, idhdl n) |
|
void | rDecomposeCF (leftv h, const ring r, const ring R) |
|
static void | rDecomposeC_41 (leftv h, const coeffs C) |
|
static void | rDecomposeC (leftv h, const ring R) |
|
void | rDecomposeRing_41 (leftv h, const coeffs C) |
|
void | rDecomposeRing (leftv h, const ring R) |
|
BOOLEAN | rDecompose_CF (leftv res, const coeffs C) |
|
lists | rDecompose_list_cf (const ring r) |
|
lists | rDecompose (const ring r) |
|
void | rComposeC (lists L, ring R) |
|
void | rComposeRing (lists L, ring R) |
|
static void | rRenameVars (ring R) |
|
static BOOLEAN | rComposeVar (const lists L, ring R) |
|
static BOOLEAN | rComposeOrder (const lists L, const BOOLEAN check_comp, ring R) |
|
ring | rCompose (const lists L, const BOOLEAN check_comp, const long bitmask) |
|
BOOLEAN | mpJacobi (leftv res, leftv a) |
|
BOOLEAN | mpKoszul (leftv res, leftv c, leftv b, leftv id) |
|
BOOLEAN | syBetti2 (leftv res, leftv u, leftv w) |
|
BOOLEAN | syBetti1 (leftv res, leftv u) |
|
lists | syConvRes (syStrategy syzstr, BOOLEAN toDel, int add_row_shift) |
|
syStrategy | syConvList (lists li) |
|
syStrategy | syForceMin (lists li) |
|
BOOLEAN | kWeight (leftv res, leftv id) |
|
BOOLEAN | kQHWeight (leftv res, leftv v) |
|
BOOLEAN | jjRESULTANT (leftv res, leftv u, leftv v, leftv w) |
|
BOOLEAN | jjCHARSERIES (leftv res, leftv u) |
|
void | copy_deep (spectrum &spec, lists l) |
|
spectrum | spectrumFromList (lists l) |
|
lists | getList (spectrum &spec) |
|
void | list_error (semicState state) |
|
spectrumState | spectrumStateFromList (spectrumPolyList &speclist, lists *L, int fast) |
|
spectrumState | spectrumCompute (poly h, lists *L, int fast) |
|
void | spectrumPrintError (spectrumState state) |
|
BOOLEAN | spectrumProc (leftv result, leftv first) |
|
BOOLEAN | spectrumfProc (leftv result, leftv first) |
|
semicState | list_is_spectrum (lists l) |
|
BOOLEAN | spaddProc (leftv result, leftv first, leftv second) |
|
BOOLEAN | spmulProc (leftv result, leftv first, leftv second) |
|
BOOLEAN | semicProc3 (leftv res, leftv u, leftv v, leftv w) |
|
BOOLEAN | semicProc (leftv res, leftv u, leftv v) |
|
BOOLEAN | loNewtonP (leftv res, leftv arg1) |
| compute Newton Polytopes of input polynomials More...
|
|
BOOLEAN | loSimplex (leftv res, leftv args) |
| Implementation of the Simplex Algorithm. More...
|
|
BOOLEAN | nuMPResMat (leftv res, leftv arg1, leftv arg2) |
| returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) More...
|
|
BOOLEAN | nuLagSolve (leftv res, leftv arg1, leftv arg2, leftv arg3) |
| find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver. More...
|
|
BOOLEAN | nuVanderSys (leftv res, leftv arg1, leftv arg2, leftv arg3) |
| COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d. More...
|
|
BOOLEAN | nuUResSolve (leftv res, leftv args) |
| solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal). More...
|
|
lists | listOfRoots (rootArranger *self, const unsigned int oprec) |
|
void | rSetHdl (idhdl h) |
|
static leftv | rOptimizeOrdAsSleftv (leftv ord) |
|
BOOLEAN | rSleftvOrdering2Ordering (sleftv *ord, ring R) |
|
static BOOLEAN | rSleftvList2StringArray (leftv sl, char **p) |
|
ring | rInit (leftv pn, leftv rv, leftv ord) |
|
ring | rSubring (ring org_ring, sleftv *rv) |
|
void | rKill (ring r) |
|
void | rKill (idhdl h) |
|
idhdl | rSimpleFindHdl (ring r, idhdl root, idhdl n) |
|
BOOLEAN | jjPROC (leftv res, leftv u, leftv v) |
|
ideal | kGroebner (ideal F, ideal Q) |
|
static void | jjINT_S_TO_ID (int n, int *e, leftv res) |
|
BOOLEAN | jjVARIABLES_P (leftv res, leftv u) |
|
BOOLEAN | jjVARIABLES_ID (leftv res, leftv u) |
|
void | paPrint (const char *n, package p) |
|
BOOLEAN | iiApplyINTVEC (leftv res, leftv a, int op, leftv proc) |
|
BOOLEAN | iiApplyBIGINTMAT (leftv, leftv, int, leftv) |
|
BOOLEAN | iiApplyIDEAL (leftv, leftv, int, leftv) |
|
BOOLEAN | iiApplyLIST (leftv res, leftv a, int op, leftv proc) |
|
BOOLEAN | iiApply (leftv res, leftv a, int op, leftv proc) |
|
BOOLEAN | iiTestAssume (leftv a, leftv b) |
|
BOOLEAN | iiARROW (leftv r, char *a, char *s) |
|
BOOLEAN | iiAssignCR (leftv r, leftv arg) |
|
static void | iiReportTypes (int nr, int t, const short *T) |
|
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 (and, if report) report an error via Werror otherwise More...
|
|
◆ BREAK_LINE_LENGTH
#define BREAK_LINE_LENGTH 80 |
◆ semicState
Enumerator |
---|
semicOK | |
semicMulNegative | |
semicListTooShort | |
semicListTooLong | |
semicListFirstElementWrongType | |
semicListSecondElementWrongType | |
semicListThirdElementWrongType | |
semicListFourthElementWrongType | |
semicListFifthElementWrongType | |
semicListSixthElementWrongType | |
semicListNNegative | |
semicListWrongNumberOfNumerators | |
semicListWrongNumberOfDenominators | |
semicListWrongNumberOfMultiplicities | |
semicListMuNegative | |
semicListPgNegative | |
semicListNumNegative | |
semicListDenNegative | |
semicListMulNegative | |
semicListNotSymmetric | |
semicListNotMonotonous | |
semicListMilnorWrong | |
semicListPGWrong | |
Definition at line 3372 of file ipshell.cc.
◆ spectrumState
Enumerator |
---|
spectrumOK | |
spectrumZero | |
spectrumBadPoly | |
spectrumNoSingularity | |
spectrumNotIsolated | |
spectrumDegenerate | |
spectrumWrongRing | |
spectrumNoHC | |
spectrumUnspecErr | |
Definition at line 3488 of file ipshell.cc.
◆ copy_deep()
Definition at line 3298 of file ipshell.cc.
3300 spec.
mu = (int)(
long)(
l->m[0].Data( ));
3301 spec.
pg = (int)(
long)(
l->m[1].Data( ));
3302 spec.
n = (int)(
long)(
l->m[2].Data( ));
3310 for(
int i=0;
i<spec.
n;
i++ )
3313 spec.
w[
i] = (*mul)[
i];
◆ exprlist_length()
int exprlist_length |
( |
leftv |
v | ) |
|
◆ getList()
Definition at line 3334 of file ipshell.cc.
3344 for(
int i=0;
i<spec.
n;
i++ )
3348 (*mult)[
i] = spec.
w[
i];
3358 L->
m[0].
data = (
void*)(
long)spec.
mu;
3359 L->
m[1].
data = (
void*)(
long)spec.
pg;
3360 L->
m[2].
data = (
void*)(
long)spec.
n;
◆ iiApply()
Definition at line 6364 of file ipshell.cc.
6382 WerrorS(
"first argument to `apply` must allow an index");
◆ iiApplyBIGINTMAT()
◆ iiApplyIDEAL()
◆ iiApplyINTVEC()
Definition at line 6290 of file ipshell.cc.
6299 memset(&tmp_in,0,
sizeof(tmp_in));
6301 tmp_in.
data=(
void*)(
long)(*aa)[
i];
6309 Werror(
"apply fails at index %d",
i+1);
6312 if (
i==0) { memcpy(
res,&tmp_out,
sizeof(tmp_out)); }
6317 memcpy(curr,&tmp_out,
sizeof(tmp_out));
◆ iiApplyLIST()
Definition at line 6332 of file ipshell.cc.
6339 for(
int i=0;
i<=aa->
nr;
i++)
6341 memset(&tmp_in,0,
sizeof(tmp_in));
6342 tmp_in.
Copy(&(aa->
m[
i]));
6351 Werror(
"apply fails at index %d",
i+1);
6354 if (
i==0) { memcpy(
res,&tmp_out,
sizeof(tmp_out)); }
6359 memcpy(curr,&tmp_out,
sizeof(tmp_out));
◆ iiARROW()
Definition at line 6413 of file ipshell.cc.
6415 char *ss=(
char*)
omAlloc(strlen(a)+strlen(
s)+30);
6417 int end_s=strlen(
s);
6418 while ((end_s>0) && ((
s[end_s]<=
' ')||(
s[end_s]==
';'))) end_s--;
6421 sprintf(
name,
"%s->%s",a,
s);
6423 int start_s=end_s-1;
6424 while ((start_s>=0) && (
s[start_s]!=
';')) start_s--;
6427 sprintf(ss,
"parameter def %s;return(%s);\n",a,
s);
6432 sprintf(ss,
"parameter def %s;%s;return(%s);\n",a,
s,
s+start_s+1);
6434 memset(r,0,
sizeof(*r));
◆ iiAssignCR()
Definition at line 6447 of file ipshell.cc.
6454 memset(&tmp,0,
sizeof(tmp));
6472 memset(&n,0,
sizeof(n));
◆ iiBranchTo()
Definition at line 1179 of file ipshell.cc.
1184 WerrorS(
"branchTo can only occur in a proc");
1192 if (ll!=(
l-1))
return FALSE;
1195 short *t=(
short*)
omAlloc(
l*
sizeof(
short));
1199 for(
i=1;
i<
l;
i++,
h=
h->next)
1204 Werror(
"arg %d is not a string",
i);
1208 b=
IsCmd((
char *)
h->Data(),tt);
1213 Werror(
"arg %d is not a type name",
i);
1220 Werror(
"last(%d.) arg.(%s) is not a proc(but %s(%d)), nesting=%d",
1232 if(
pi->data.s.body==
NULL )
◆ iiCheckPack()
◆ iiCheckRing()
◆ iiCheckTypes()
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (and, if report) report an error via Werror otherwise
Definition at line 6503 of file ipshell.cc.
6508 if (type_list[0]==0)
return TRUE;
6511 if (
l!=(
int)type_list[0])
6516 for(
int i=1;
i<=
l;
i++,args=args->
next)
6518 short t=type_list[
i];
6522 || (t!=args->Typ()))
◆ iiCopyRes()
◆ iiDebug()
Definition at line 984 of file ipshell.cc.
1010 else if(strncmp(
s,
"cont;",5)==0)
1017 strcat(
s,
"\n;~\n");
◆ iiDeclCommand()
Definition at line 1122 of file ipshell.cc.
1125 const char *
id =
name->name;
1127 memset(sy,0,
sizeof(
sleftv));
1130 WerrorS(
"object to declare is not a name");
◆ iiDefaultParameter()
◆ iiExport() [1/2]
◆ iiExport() [2/2]
◆ iiHighCorner()
poly iiHighCorner |
( |
ideal |
I, |
|
|
int |
ak |
|
) |
| |
◆ iiInternalExport() [1/2]
◆ iiInternalExport() [2/2]
Definition at line 1368 of file ipshell.cc.
1373 Warn(
"'%s': no such identifier\n",
v->
name);
1376 package frompack=v->req_packhdl;
1390 v->req_packhdl=rootpack;
1391 if (
h==frompack->idroot)
1393 frompack->idroot=
h->next;
1397 idhdl hh=frompack->idroot;
1404 Werror(
"`%s` not found",
v->Name());
1408 h->next=rootpack->idroot;
◆ iiMakeResolv()
void iiMakeResolv |
( |
resolvente |
r, |
|
|
int |
length, |
|
|
int |
rlen, |
|
|
char * |
name, |
|
|
int |
typ0, |
|
|
intvec ** |
weights |
|
) |
| |
Definition at line 766 of file ipshell.cc.
776 sprintf(
s,
"%s(%d)",
name,
i+1);
783 h->data.uideal=(ideal)L->
m[
i].
data;
786 Print(
"//defining: %s as %d-th syzygy module\n",
s,
i+1);
791 Warn(
"cannot define %s",
s);
◆ iiMap()
Definition at line 607 of file ipshell.cc.
628 Werror(
"can not map from ground field of %s to current ground field",
632 if (
IDELEMS(theMap)<src_ring->N)
636 (src_ring->N)*
sizeof(poly));
643 WerrorS(
"argument of a map must have a name");
650 memset(&tmpW,0,
sizeof(
sleftv));
655 save_r=
IDMAP(
w)->preimage;
665 ideal
id=(ideal)tmpW.
data;
673 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
675 if (theMap->m[
j]!=
NULL)
682 if ((
p!=
NULL) && (degs[
i]!=0) &&
683 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)degs[
i])/2)))
695 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
697 if (theMap->m[
j]!=
NULL)
700 poly
p=(poly)tmpW.
data;
703 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)deg)/2)))
712 Warn(
"possible OVERFLOW in map, max exponent is %ld",
currRing->bitmask/2);
728 char *tmp = theMap->preimage;
729 theMap->preimage=(
char*)1L;
732 theMap->preimage=tmp;
747 IDMAP(
w)->preimage=save_r;
755 Werror(
"%s undefined in %s",what,theMap->preimage);
760 Werror(
"cannot find preimage %s",theMap->preimage);
◆ iiOpsTwoChar()
int iiOpsTwoChar |
( |
const char * |
s | ) |
|
Definition at line 119 of file ipshell.cc.
122 if (
s[1]==
'\0')
return s[0];
123 else if (
s[2]!=
'\0')
return 0;
126 case '.':
if (
s[1]==
'.')
return DOTDOT;
132 case '+':
if (
s[1]==
'+')
return PLUSPLUS;
136 case '<':
if (
s[1]==
'=')
return LE;
139 case '>':
if (
s[1]==
'=')
return GE;
141 case '!':
if (
s[1]==
'=')
return NOTEQUAL;
◆ iiParameter()
Definition at line 1280 of file ipshell.cc.
1284 if (strcmp(
p->name,
"#")==0)
1293 if (strcmp(
p->name,
"#")==0)
1295 is_default_list=
TRUE;
1303 if (is_default_list)
◆ iiRegularity()
int iiRegularity |
( |
lists |
L | ) |
|
Definition at line 956 of file ipshell.cc.
970 add_row_shift = ww->
min_in();
971 (*weights) -= add_row_shift;
976 if (weights!=
NULL)
delete weights;
979 return reg+1+add_row_shift;
◆ iiReportTypes()
static void iiReportTypes |
( |
int |
nr, |
|
|
int |
t, |
|
|
const short * |
T |
|
) |
| |
|
static |
Definition at line 6485 of file ipshell.cc.
6490 sprintf(
buf,
"wrong length of parameters(%d), expected ",t);
6492 sprintf(
buf,
"par. %d is of type `%s`, expected ",nr,
Tok2Cmdname(t));
6493 for(
int i=1;
i<=
T[0];
i++)
6498 if (
i<
T[0]) strcat(
buf,
",");
◆ iiTestAssume()
Definition at line 6386 of file ipshell.cc.
6392 char assume_yylinebuf[80];
6394 int lev=(long)a->
Data();
6401 if (bo) {
WerrorS(
"syntax error in ASSUME");
return TRUE;}
6403 if (
b->Data()==
NULL) {
Werror(
"ASSUME failed:%s",assume_yylinebuf);
return TRUE;}
◆ iiTwoOps()
const char* iiTwoOps |
( |
int |
t | ) |
|
Definition at line 86 of file ipshell.cc.
112 case LE:
return "<=";
113 case GE:
return ">=";
◆ iiWRITE()
◆ jjBETTI()
Definition at line 886 of file ipshell.cc.
889 memset(&tmp,0,
sizeof(tmp));
◆ jjBETTI2()
Definition at line 920 of file ipshell.cc.
934 add_row_shift = ww->
min_in();
935 (*weights) -= add_row_shift;
942 res->data=(
void*)res_im;
945 for(
int i=1;
i<=res_im->
rows();
i++)
947 if (
IMATELEM(*res_im,1,
i)==0) { add_row_shift--; }
952 if (weights!=
NULL)
delete weights;
◆ jjBETTI2_ID()
Definition at line 899 of file ipshell.cc.
903 l->m[0].rtyp=u->
Typ();
904 l->m[0].data=u->
Data();
907 l->m[0].attribute=*a;
914 l->m[0].attribute=
NULL;
◆ jjCHARSERIES()
◆ jjINT_S_TO_ID()
static void jjINT_S_TO_ID |
( |
int |
n, |
|
|
int * |
e, |
|
|
leftv |
res |
|
) |
| |
|
static |
◆ jjMINRES()
Definition at line 865 of file ipshell.cc.
871 int add_row_shift = 0;
874 if (weights!=
NULL) add_row_shift=weights->
min_in();
◆ jjPROC()
◆ jjRESULTANT()
◆ jjVARIABLES_ID()
Definition at line 6258 of file ipshell.cc.
6261 ideal I=(ideal)u->
Data();
6264 for(
i=I->nrows*I->ncols-1;
i>=0;
i--)
◆ jjVARIABLES_P()
◆ kGroebner()
ideal kGroebner |
( |
ideal |
F, |
|
|
ideal |
Q |
|
) |
| |
Definition at line 6183 of file ipshell.cc.
6208 resid=(ideal)(
res.data);
6217 while ((
h!=
NULL) &&(
h->next!=new_ring))
h=
h->next;
6218 if (
h!=
NULL)
h->next=
h->next->next;
◆ killlocals()
◆ killlocals0()
static void killlocals0 |
( |
int |
v, |
|
|
idhdl * |
localhdl, |
|
|
const ring |
r |
|
) |
| |
|
static |
◆ killlocals_list()
◆ killlocals_rec()
void killlocals_rec |
( |
idhdl * |
root, |
|
|
int |
v, |
|
|
ring |
r |
|
) |
| |
◆ kQHWeight()
◆ kWeight()
Definition at line 3239 of file ipshell.cc.
3241 ideal F=(ideal)id->
Data();
3247 res->data=(
char *)iv;
3251 double wNsqr = (double)2.0 / (
double)n;
3253 x = (
int * )
omAlloc(2 * (n + 1) *
sizeof(int));
3255 for (
i = n;
i!=0;
i--)
3256 (*iv)[
i-1] =
x[
i + n + 1];
◆ list1()
Definition at line 147 of file ipshell.cc.
153 if(fullname) sprintf(
buf2,
"%s::%s",
"",
IDID(
h));
192 && (strlen(
IDPROC(
h)->libname)>0))
205 if ((
s=strchr(buffer,
'\n'))!=
NULL)
213 Print(
"..., %d char(s)",
l);
229 { number2 n=(number2)
IDDATA(
h);
235 Print(
" %d x %d (%s)",
◆ list_cmd()
Definition at line 417 of file ipshell.cc.
419 package savePack=currPack;
426 if (strcmp(what,
"all")==0)
461 Werror(
"%s is undefined",what);
495 package save_p=currPack;
◆ list_error()
Definition at line 3406 of file ipshell.cc.
3411 WerrorS(
"the list is too short" );
3414 WerrorS(
"the list is too long" );
3418 WerrorS(
"first element of the list should be int" );
3421 WerrorS(
"second element of the list should be int" );
3424 WerrorS(
"third element of the list should be int" );
3427 WerrorS(
"fourth element of the list should be intvec" );
3430 WerrorS(
"fifth element of the list should be intvec" );
3433 WerrorS(
"sixth element of the list should be intvec" );
3437 WerrorS(
"first element of the list should be positive" );
3440 WerrorS(
"wrong number of numerators" );
3443 WerrorS(
"wrong number of denominators" );
3446 WerrorS(
"wrong number of multiplicities" );
3450 WerrorS(
"the Milnor number should be positive" );
3453 WerrorS(
"the geometrical genus should be nonnegative" );
3456 WerrorS(
"all numerators should be positive" );
3459 WerrorS(
"all denominators should be positive" );
3462 WerrorS(
"all multiplicities should be positive" );
3466 WerrorS(
"it is not symmetric" );
3469 WerrorS(
"it is not monotonous" );
3473 WerrorS(
"the Milnor number is wrong" );
3476 WerrorS(
"the geometrical genus is wrong" );
3480 WerrorS(
"unspecific error" );
◆ list_is_spectrum()
Definition at line 4191 of file ipshell.cc.
4201 else if(
l->nr > 5 )
4239 int mu = (int)(
long)(
l->m[0].Data( ));
4240 int pg = (int)(
long)(
l->m[1].Data( ));
4241 int n = (int)(
long)(
l->m[2].Data( ));
4252 if( n !=
num->length( ) )
4256 else if( n !=
den->length( ) )
4260 else if( n != mul->
length( ) )
4280 for(
i=0;
i<n;
i++ )
4282 if( (*
num)[
i] <= 0 )
4286 if( (*
den)[
i] <= 0 )
4290 if( (*mul)[
i] <= 0 )
4302 for(
i=0,
j=n-1;
i<=
j;
i++,
j-- )
4305 (*den)[
i] != (*den)[
j] ||
4306 (*mul)[
i] != (*mul)[
j] )
4316 for(
i=0,
j=1;
i<n/2;
i++,
j++ )
4318 if( (*
num)[
i]*(*den)[
j] >= (*num)[
j]*(*den)[
i] )
4328 for(
mu=0,
i=0;
i<n;
i++ )
4333 if(
mu != (
int)(long)(
l->m[0].Data( )) )
4342 for( pg=0,
i=0;
i<n;
i++ )
4344 if( (*
num)[
i]<=(*den)[
i] )
4350 if( pg != (
int)(long)(
l->m[1].Data( )) )
◆ listOfRoots()
Definition at line 5003 of file ipshell.cc.
5006 int count=
self->roots[0]->getAnzRoots();
5007 int elem=
self->roots[0]->getAnzElems();
5018 onepoint->
Init(elem);
5019 for (
j= 0;
j < elem;
j++ )
5035 listofroots->
m[
i].
data=(
void *)onepoint;
5043 listofroots->
Init( 0 );
◆ loNewtonP()
compute Newton Polytopes of input polynomials
Definition at line 4501 of file ipshell.cc.
◆ loSimplex()
Implementation of the Simplex Algorithm.
For args, see class simplex.
Definition at line 4507 of file ipshell.cc.
4511 WerrorS(
"Ground field not implemented!");
4531 LP->
m= (int)(
long)(
v->Data());
4537 LP->
n= (int)(
long)(
v->Data());
4543 LP->
m1= (int)(
long)(
v->Data());
4549 LP->
m2= (int)(
long)(
v->Data());
4555 LP->
m3= (int)(
long)(
v->Data());
4557 #ifdef mprDEBUG_PROT
4558 Print(
"m (constraints) %d\n",LP->
m);
4559 Print(
"n (columns) %d\n",LP->
n);
4583 lres->
m[4].
data=(
void*)(
long)LP->
m;
4586 lres->
m[5].
data=(
void*)(
long)LP->
n;
4588 res->data= (
void*)lres;
◆ mpJacobi()
◆ mpKoszul()
Definition at line 3031 of file ipshell.cc.
3033 int n=(int)(
long)
b->Data();
3034 int d=(int)(
long)c->
Data();
3041 if ((d>n) || (d<1) || (n<1))
3046 int *choise = (
int*)
omAlloc(d*
sizeof(
int));
3050 temp=(ideal)id->
Data();
3065 p =
pCopy(temp->m[choise[
l-1]-1]);
◆ nuLagSolve()
find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver.
Good for polynomials with low and middle degree (<40). Arguments 3: poly arg1 , int arg2 , int arg3 arg2>0: defines precision of fractional part if ground field is Q arg3: number of iterations for approximation of roots (default=2) Returns a list of all (complex) roots of the polynomial arg1
Definition at line 4616 of file ipshell.cc.
4620 gls= (poly)(arg1->
Data());
4621 int howclean= (int)(
long)arg3->
Data();
4628 WerrorS(
"Ground field not implemented!");
4635 unsigned long int ii = (
unsigned long int)arg2->
Data();
4641 WerrorS(
"Input polynomial is constant!");
4667 if ( (vpos !=
i) && (
pGetExp( piter,
i ) != 0) )
4669 WerrorS(
"The input polynomial must be univariate!");
4677 number * pcoeffs= (number *)
omAlloc( (deg+1) *
sizeof( number ) );
4679 for (
i= deg;
i >= 0;
i-- )
4693 #ifdef mprDEBUG_PROT
4694 for (
i=deg;
i >= 0;
i--)
4702 roots->
solver( howclean );
4709 rlist->
Init( elem );
4713 for (
j= 0;
j < elem;
j++ )
4722 for (
j= 0;
j < elem;
j++ )
4726 rlist->
m[
j].
data=(
void *)dummy;
4740 res->data= (
void*)rlist;
◆ nuMPResMat()
returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default)
Definition at line 4593 of file ipshell.cc.
4595 ideal gls = (ideal)(arg1->
Data());
4596 int imtype= (int)(
long)arg2->
Data();
◆ nuUResSolve()
solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal).
Resultant method can be MPR_DENSE, which uses Macaulay Resultant (good for dense homogeneous polynoms) or MPR_SPARSE, which uses Sparse Resultant (Gelfand, Kapranov, Zelevinsky). Arguments 4: ideal i, int k, int l, int m k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) l>0: defines precision of fractional part if ground field is Q m=0,1,2: number of iterations for approximation of roots (default=2) Returns a list containing the roots of the system.
Definition at line 4846 of file ipshell.cc.
4857 else gls= (ideal)(
v->Data());
4863 else imtype= (int)(
long)
v->Data();
4868 ideal test_id=
idInit(1,1);
4872 if (gls->m[
j]!=
NULL)
4874 test_id->m[0]=gls->m[
j];
4878 WerrorS(
"Newton polytope not of expected dimension");
4892 unsigned long int ii=(
unsigned long int)
v->Data();
4900 else howclean= (int)(
long)
v->Data();
4929 WerrorS(
"Error occurred during matrix setup!");
4937 #ifdef mprDEBUG_PROT
4942 WerrorS(
"Unsuitable input ideal: Minor of resultant matrix is singular!");
4948 if ( interpolate_det )
4954 if ( interpolate_det )
4959 #ifdef mprDEBUG_PROT
4961 for (
i=0;
i < c;
i++)
pWrite(iproots[
i]->getPoly());
4963 for (
i=0;
i < c;
i++)
pWrite(muiproots[
i]->getPoly());
4967 arranger=
new rootArranger( iproots, muiproots, howclean );
4978 WerrorS(
"Solver was unable to find any roots!");
4984 for (
i=0;
i <
count;
i++)
delete iproots[
i];
4987 for (
i=0;
i <
count;
i++)
delete muiproots[
i];
4994 res->data= (
void *)listofroots;
◆ nuVanderSys()
COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d.
Definition at line 4745 of file ipshell.cc.
4749 p= (ideal)arg1->
Data();
4750 w= (ideal)arg2->
Data();
4761 int tdg= (int)(
long)arg3->
Data();
4768 WerrorS(
"Last input parameter must be > 0!");
4776 if (
m != (
int)
pow((
double)tdg+1,(
double)n) )
4778 Werror(
"Size of second input ideal must be equal to %d!",
4779 (
int)
pow((
double)tdg+1,(
double)n));
4786 WerrorS(
"Ground field not implemented!");
4791 number *pevpoint= (number *)
omAlloc( n *
sizeof( number ) );
4792 for (
i= 0;
i < n;
i++ )
4801 WerrorS(
"Elements of first input ideal must not be equal to -1, 0, 1!");
4810 WerrorS(
"Elements of first input ideal must be numbers!");
4813 pevpoint[
i]=
nCopy( tmp );
4817 number *wresults= (number *)
omAlloc(
m *
sizeof( number ) );
4818 for (
i= 0;
i <
m;
i++ )
4827 WerrorS(
"Elements of second input ideal must be numbers!");
4835 number *ncpoly= vm.interpolateDense( wresults );
4837 poly rpoly= vm.numvec2poly( ncpoly );
4842 res->data= (
void*)rpoly;
◆ paPrint()
◆ rCompose()
Definition at line 2743 of file ipshell.cc.
2771 int ch = (int)(
long)L->
m[0].
Data();
2781 Warn(
"%d is invalid characteristic of ground field. %d is used.", ch,
l);
2804 int ch = (int)(
long)LL->
m[0].
Data();
2805 while ((ch!=
fftable[is_gf_char]) && (
fftable[is_gf_char])) is_gf_char++;
2806 if (
fftable[is_gf_char]==0) is_gf_char=-1;
2827 WerrorS(
"could not create the specified coefficient field");
2831 if( extRing->qideal !=
NULL )
2835 extParam.
r = extRing;
2842 extParam.
r = extRing;
2852 WerrorS(
"coefficient field must be described by `int` or `list`");
2858 WerrorS(
"could not create coefficient field described by the input!");
2870 if (bitmask!=0x7fff)
R->bitmask=bitmask*2;
2877 ideal q=(ideal)L->
m[3].
Data();
2883 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2890 int par_perm_size=0;
2909 par_perm_size=
rPar(orig_ring);
2919 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2923 perm=(
int *)
omAlloc0((orig_ring->N+1)*
sizeof(int));
2924 if (par_perm_size!=0)
2925 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
2929 maFindPerm(orig_ring->names,orig_ring->N,orig_ring->parameter,orig_ring->P,
2938 else if (par_perm_size!=0)
2946 par_perm,par_perm_size);
2964 WerrorS(
"q-ideal must be given as `ideal`");
◆ rComposeC()
void rComposeC |
( |
lists |
L, |
|
|
ring |
R |
|
) |
| |
Definition at line 2227 of file ipshell.cc.
2234 WerrorS(
"invalid coeff. field description, expecting 0");
2242 WerrorS(
"invalid coeff. field description, expecting precision list");
2252 WerrorS(
"invalid coeff. field description list");
2255 int r1=(int)(
long)LL->
m[0].
data;
2256 int r2=(int)(
long)LL->
m[1].
data;
2278 R->cf->float_len=
si_min(r1,32767);
2279 R->cf->float_len2=
si_min(r2,32767);
2288 WerrorS(
"invalid coeff. field description, expecting parameter name");
◆ rComposeOrder()
Definition at line 2477 of file ipshell.cc.
2487 for (
int j=0;
j < n-1;
j++)
2494 &&(strcmp((
char*)vv->
m[0].
Data(),
"L")==0))
2496 number nn=(number)vv->
m[1].
Data();
2503 Werror(
"illegal argument for pseudo ordering L: %d",vv->
m[1].
Typ());
2510 if (bitmask!=0) n--;
2514 R->block0=(
int *)
omAlloc0(n*
sizeof(
int));
2515 R->block1=(
int *)
omAlloc0(n*
sizeof(
int));
2518 for (j_in_R= n-2; j_in_R>=0; j_in_R--)
2521 for(j_in_R=0,j_in_L=0;j_in_R<n-1;j_in_R++,j_in_L++)
2526 WerrorS(
"ordering must be list of lists");
2533 if (strcmp((
char*)vv->
m[0].
Data(),
"L")==0)
2541 WerrorS(
"ordering name must be a (string,intvec)(1)");
2546 if (j_in_R==0)
R->block0[0]=1;
2563 if (jj<0)
R->block0[j_in_R]=1;
2564 else R->block0[j_in_R]=
R->block1[jj]+1;
2576 R->block1[j_in_R]=
si_max(
R->block0[j_in_R],
R->block0[j_in_R]+iv_len-1);
2577 if (
R->block1[j_in_R]>
R->N)
2579 if (
R->block0[j_in_R]>
R->N)
2584 R->block1[j_in_R]=
R->N;
2585 iv_len=
R->block1[j_in_R]-
R->block0[j_in_R]+1;
2590 switch (
R->order[j_in_R])
2599 R->wvhdl[j_in_R] =(
int *)
omAlloc(iv_len*
sizeof(
int));
2600 for (
i=0;
i<iv_len;
i++)
2602 R->wvhdl[j_in_R][
i]=(*iv)[
i];
2607 for (
i=0;
i<iv_len;
i++)
2609 R->wvhdl[j_in_R][
i]=(*iv)[
i];
2611 R->wvhdl[j_in_R][
i]=iv->
length() - iv_len;
2615 R->wvhdl[j_in_R][
i+1]=(*iv)[
i];
2620 for (
i=0;
i<iv->
length();
i++)
R->wvhdl[j_in_R][
i]=(*iv)[
i];
2621 R->block1[j_in_R]=
si_max(
R->block0[j_in_R],
R->block0[j_in_R]+(
int)
sqrt((
double)(iv->
length()-1)));
2622 if (
R->block1[j_in_R]>
R->N)
2624 WerrorS(
"ordering matrix too big");
2642 R->block1[j_in_R]=
R->block0[j_in_R]=0;
2646 R->block1[j_in_R]=
R->block0[j_in_R]=(*iv)[0];
2652 R->block1[j_in_R] =
R->block0[j_in_R] = 0;
2655 const int s = (*iv)[0];
2657 R->block1[j_in_R] =
R->block0[j_in_R] =
s;
2666 WerrorS(
"ring order not implemented");
2674 WerrorS(
"ordering name must be a (string,intvec)");
2683 if (
R->block1[j_in_R] !=
R->N)
2694 R->block0[j_in_R] <=
R->N)
2696 R->block1[j_in_R] =
R->N;
2700 Werror(
"ordering incomplete: size (%d) should be %d",
R->block1[j_in_R],
R->N);
2704 if (
R->block0[j_in_R]>
R->N)
2706 Werror(
"not enough variables (%d) for ordering block %d, scanned so far:",
R->N,j_in_R+1);
2707 for(
int ii=0;ii<=j_in_R;ii++)
2736 WerrorS(
"ordering must be given as `list`");
2739 if (bitmask!=0)
R->bitmask=bitmask*2;
◆ rComposeRing()
void rComposeRing |
( |
lists |
L, |
|
|
ring |
R |
|
) |
| |
Definition at line 2298 of file ipshell.cc.
2305 unsigned int modExponent = 1;
2309 mpz_init_set_ui(modBase,0);
2320 number tmp= (number) LL->
m[0].
data;
2327 mpz_init_set_ui(modBase,(
unsigned long) LL->
m[0].
data);
2331 mpz_init_set_ui(modBase,0);
2335 modExponent = (
unsigned long) LL->
m[1].
data;
2343 if ((mpz_cmp_ui(modBase, 1) == 0) && (
mpz_sgn1(modBase) < 0))
2345 WerrorS(
"Wrong ground ring specification (module is 1)");
2348 if (modExponent < 1)
2350 WerrorS(
"Wrong ground ring specification (exponent smaller than 1)");
2359 else if (modExponent > 1)
2362 if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
2373 info.exp= modExponent;
2384 info.exp= modExponent;
◆ rComposeVar()
Definition at line 2432 of file ipshell.cc.
2452 poly
p=(poly)
v->m[
i].Data();
2458 Werror(
"var name %d must be a string or a ring variable",
i+1);
2464 Werror(
"var name %d must be `string`",
i+1);
2471 WerrorS(
"variable must be given as `list`");
◆ rDecompose()
Definition at line 2041 of file ipshell.cc.
2050 || (r->qideal !=
NULL)
2057 WerrorS(
"ring with polynomial data must be the base ring or compatible");
2082 else if ( r->cf->extRing!=
NULL )
2092 Lc->m[0].data=(
void*)(
long)r->cf->m_nfCharQ;
2099 Lc->m[1].data=(
void*)Lv;
2110 Loo->
m[1].
data=(
void *)iv;
2113 Lo->
m[0].
data=(
void*)Loo;
2116 Lc->m[2].data=(
void*)Lo;
2127 L->
m[0].
data=(
void *)(
long)r->cf->ch;
2134 for(
i=0;
i<r->N;
i++)
2140 L->
m[1].
data=(
void *)LL;
2161 assume( r->block0[
i] == r->block1[
i] );
2162 const int s = r->block0[
i];
2168 else if (r->block1[
i]-r->block0[
i] >=0 )
2170 int bl=
j=r->block1[
i]-r->block0[
i];
2178 j+=r->wvhdl[
i][bl+1];
2181 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2183 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
2185 else switch (r->order[
i])
2192 for(;
j>=0;
j--) (*iv)[
j]=1;
2202 LLL->
m[1].
data=(
void *)iv;
2203 LL->
m[
i].
data=(
void *)LLL;
2206 L->
m[2].
data=(
void *)LL;
2210 if (r->qideal==
NULL)
2215 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDecompose_CF()
Definition at line 1839 of file ipshell.cc.
1846 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1859 else if ( C->extRing!=
NULL )
1869 Lc->m[0].data=(
void*)(
long)C->m_nfCharQ;
1876 Lc->m[1].data=(
void*)Lv;
1887 Loo->
m[1].
data=(
void *)iv;
1890 Lo->
m[0].
data=(
void*)Loo;
1893 Lc->m[2].data=(
void*)Lo;
1899 res->data=(
void*)
Lc;
1904 res->data=(
void *)(
long)C->ch;
◆ rDecompose_list_cf()
Definition at line 1910 of file ipshell.cc.
1925 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1943 L->
m[0].
data=(
char*)r->cf; r->cf->ref++;
1949 for(
i=0;
i<r->N;
i++)
1955 L->
m[1].
data=(
void *)LL;
1975 assume( r->block0[
i] == r->block1[
i] );
1976 const int s = r->block0[
i];
1982 else if (r->block1[
i]-r->block0[
i] >=0 )
1984 int bl=
j=r->block1[
i]-r->block0[
i];
1992 j+=r->wvhdl[
i][bl+1];
1995 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
1997 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
1999 else switch (r->order[
i])
2006 for(;
j>=0;
j--) (*iv)[
j]=1;
2016 LLL->
m[1].
data=(
void *)iv;
2017 LL->m[
i].data=(
void *)LLL;
2020 L->
m[2].
data=(
void *)LL;
2024 if (r->qideal==
NULL)
2029 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDecomposeC()
◆ rDecomposeC_41()
◆ rDecomposeCF()
Definition at line 1621 of file ipshell.cc.
1634 L->
m[0].
data=(
void *)(
long)r->cf->ch;
1640 for(
i=0;
i<r->N;
i++)
1646 L->
m[1].
data=(
void *)LL;
1663 if (r->block1[
i]-r->block0[
i] >=0 )
1665 j=r->block1[
i]-r->block0[
i];
1668 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
1670 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j];
1672 else switch (r->order[
i])
1679 for(;
j>=0;
j--) (*iv)[
j]=1;
1689 LLL->
m[1].
data=(
void *)iv;
1690 LL->
m[
i].
data=(
void *)LLL;
1693 L->
m[2].
data=(
void *)LL;
1703 pSetCoeff0(q->m[0],(number)(r->qideal->m[0]));
1704 L->
m[3].
data=(
void *)q;
◆ rDecomposeRing()
◆ rDecomposeRing_41()
◆ rDefault()
◆ rFindHdl()
◆ rInit()
Definition at line 5543 of file ipshell.cc.
5574 WerrorS(
"parameter expected");
5581 for(
int i=pars-1;
i>=0;
i--)
5593 int ch = (int)(
long)pn->
Data();
5604 if ((ch<2)||(ch!=ch2))
5606 Warn(
"%d is invalid as characteristic of the ground field. 32003 is used.", ch);
5621 if ((ch!=0) && (ch!=
IsPrime(ch)) && (pars == 1))
5633 if ((ch!=0) && (ch!=
IsPrime(ch)))
5635 WerrorS(
"too many parameters");
5643 WerrorS(
"parameter expected");
5649 extParam.
r =
rDefault( ch, pars, names);
5650 for(
int i=pars-1;
i>=0;
i--)
5663 && ((strcmp(pn->
name,
"real")==0) || (strcmp(pn->
name,
"complex")==0)))
5666 BOOLEAN complex_flag=(strcmp(pn->
name,
"complex")==0);
5669 float_len=(int)(
long)pnn->
Data();
5670 float_len2=float_len;
5674 float_len2=(int)(
long)pnn->
Data();
5709 else if ((pn->
name !=
NULL) && (strcmp(pn->
name,
"integer") == 0))
5713 unsigned int modExponent = 1;
5714 mpz_init_set_si(modBase, 0);
5721 mpz_set_ui(modBase, (
int)(
long) pnn->
Data());
5725 modExponent = (long) pnn->
Data();
5730 mpz_mul_ui(modBase, modBase, (
int)(
long) pnn->
Data());
5743 if ((mpz_cmp_ui(modBase, 1) == 0) && (
mpz_sgn1(modBase) < 0))
5745 WerrorS(
"Wrong ground ring specification (module is 1)");
5748 if (modExponent < 1)
5750 WerrorS(
"Wrong ground ring specification (exponent smaller than 1");
5755 if (modExponent > 1 &&
cf ==
NULL)
5757 if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
5768 WerrorS(
"modulus must not be 0 or parameter not allowed");
5774 info.exp= modExponent;
5783 WerrorS(
"modulus must not be 0 or parameter not allowed");
5789 info.exp= modExponent;
5800 extParam.
r = (ring)pn->
Data();
5812 WerrorS(
"Wrong or unknown ground field specification");
5818 Print(
"pn[%p]: type: %d [%s]: %p, name: %s", (
void*)
p,
p->Typ(),
Tok2Cmdname(
p->Typ()),
p->Data(), (
p->name ==
NULL?
"NULL" :
p->name) );
5840 WerrorS(
"Invalid ground field specification");
5864 WerrorS(
"name of ring variable expected");
◆ rKill() [1/2]
◆ rKill() [2/2]
Definition at line 6076 of file ipshell.cc.
6078 if ((r->ref<=0)&&(r->order!=
NULL))
6088 if (
j==0)
WarnS(
"killing the basering for level 0");
6093 while (r->idroot!=
NULL)
6096 killhdl2(r->idroot,&(r->idroot),r);
◆ rOptimizeOrdAsSleftv()
Definition at line 5111 of file ipshell.cc.
5124 if((*iv)[
i]>=0) { neg=
FALSE;
break; }
5129 (*iv)[
i]= - (*iv)[
i];
5138 if((*iv)[
i]>=0) { neg=
FALSE;
break; }
5143 (*iv)[
i]= -(*iv)[
i];
5152 if((*iv)[
i]!=1) { all_one=
FALSE;
break; }
5158 (*iv2)[2]=iv->
length()-2;
5170 if((*iv)[
i]!=1) { all_one=
FALSE;
break; }
5176 (*iv2)[2]=iv->
length()-2;
5210 (*iv)[2] += (*iv2)[2];
5217 if (!change)
h=
h->next;
◆ rRenameVars()
static void rRenameVars |
( |
ring |
R | ) |
|
|
static |
Definition at line 2391 of file ipshell.cc.
2398 for(
i=0;
i<
R->N-1;
i++)
2400 for(
j=
i+1;
j<
R->N;
j++)
2402 if (strcmp(
R->names[
i],
R->names[
j])==0)
2405 Warn(
"name conflict var(%d) and var(%d): `%s`, rename to `@%s`",
i+1,
j+1,
R->names[
i],
R->names[
i]);
2407 R->names[
j]=(
char *)
omAlloc(2+strlen(
R->names[
i]));
2408 sprintf(
R->names[
j],
"@%s",
R->names[
i]);
2420 Warn(
"name conflict par(%d) and var(%d): `%s`, renaming the VARIABLE to `@@(%d)`",
i+1,
j+1,
R->names[
j],
i+1);
2426 sprintf(
R->names[
j],
"@@(%d)",
i+1);
◆ rSetHdl()
Definition at line 5050 of file ipshell.cc.
5057 if (rg==
NULL)
return;
5082 Warn(
"deleting denom_list for ring change to %s",
IDID(
h));
5096 if ((rg!=
NULL) && (rg->idroot==
NULL))
◆ rSimpleFindHdl()
◆ rSleftvList2StringArray()
static BOOLEAN rSleftvList2StringArray |
( |
leftv |
sl, |
|
|
char ** |
p |
|
) |
| |
|
static |
◆ rSleftvOrdering2Ordering()
Definition at line 5223 of file ipshell.cc.
5225 int last = 0, o=0, n = 1,
i=0, typ = 1,
j;
5237 R->bitmask=(*iv)[2]*2+1;
5250 WerrorS(
"invalid combination of orderings");
5258 WerrorS(
"more than one ordering c/C specified");
5264 R->block0=(
int *)
omAlloc0(n*
sizeof(
int));
5265 R->block1=(
int *)
omAlloc0(n*
sizeof(
int));
5268 int *weights=(
int*)
omAlloc0((
R->N+1)*
sizeof(int));
5271 for (
j=0;
j < n-1;
j++)
5302 R->block0[n] =
last+1;
5305 R->wvhdl[n][
i-2] = (*iv)[
i];
5307 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5320 R->block0[n] =
last+1;
5322 else last += (*iv)[0];
5327 if (weights[
i]==0) weights[
i]=typ;
5339 const int s = (*iv)[2];
5349 const int s = (*iv)[2];
5351 if( 1 <
s ||
s < -1 )
return TRUE;
5367 R->block0[n] =
last+1;
5372 R->wvhdl[n][
i-2]=(*iv)[
i];
5374 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5376 last=
R->block0[n]-1;
5381 R->block0[n] =
last+1;
5384 if (
R->block1[n]-
R->block0[n]+2>=iv->
length())
5385 WarnS(
"missing module weights");
5386 for (
i=2;
i<=(
R->block1[n]-
R->block0[n]+2);
i++)
5388 R->wvhdl[n][
i-2]=(*iv)[
i];
5390 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5392 R->wvhdl[n][
i-2]=iv->
length() -3 -(
R->block1[n]-
R->block0[n]);
5395 R->wvhdl[n][
i-1]=(*iv)[
i];
5397 last=
R->block0[n]-1;
5402 R->block0[n] =
last+1;
5410 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5412 last=
R->block0[n]-1;
5418 if (Mtyp==0)
return TRUE;
5419 if (Mtyp==-1) typ = -1;
5423 R->wvhdl[n][
i-2]=(*iv)[
i];
5425 R->block0[n] =
last+1;
5428 for(
i=
R->block1[n];
i>=
R->block0[n];
i--)
5430 if (weights[
i]==0) weights[
i]=typ;
5440 Werror(
"Internal Error: Unknown ordering %d", (*iv)[1]);
5447 Werror(
"mismatch of number of vars (%d) and ordering (>=%d vars)",
5455 for(
i=1;
i<=
R->N;
i++)
5456 {
if (weights[
i]<0) {
R->OrdSgn=-1;
break; }}
5470 if (
R->block1[n] !=
R->N)
5481 R->block0[n] <=
R->N)
5483 R->block1[n] =
R->N;
5487 Werror(
"mismatch of number of vars (%d) and ordering (%d vars)",
◆ rSubring()
ring rSubring |
( |
ring |
org_ring, |
|
|
sleftv * |
rv |
|
) |
| |
Definition at line 5914 of file ipshell.cc.
5917 int *perm=(
int *)
omAlloc0((org_ring->N+1)*
sizeof(int));
5934 WerrorS(
"name of ring variable expected");
5944 for(;
i<org_ring->N;
i++)
5946 if (strcmp(org_ring->names[
i],
R->names[
j])==0)
5954 Werror(
"variable %d (%s) not in basering",
j+1,
R->names[
j]);
5967 for(
j=
R->block0[
i];j<=R->block1[
i];
j++)
5971 if (min_var==-1) min_var=perm[
j];
5979 R->block0[
i]=min_var;
5980 R->block1[
i]=max_var;
5984 R->wvhdl[
i]=(
int*)
omAlloc0((max_var-min_var+1)*
sizeof(int));
5985 for(
j=org_ring->block0[
i];j<=org_ring->block1[
i];
j++)
5989 R->wvhdl[
i][perm[
j]-
R->block0[
i]]=
5990 org_ring->wvhdl[
i][
j-org_ring->block0[
i]];
6016 R->order[
j-1]=
R->order[
j];
6017 R->block0[
j-1]=
R->block0[
j];
6018 R->block1[
j-1]=
R->block1[
j];
6020 R->wvhdl[
j-1]=
R->wvhdl[
j];
6028 while (
R->order[n]==0) n--;
6031 if (
R->block1[n] !=
R->N)
6042 R->block0[n] <=
R->N)
6044 R->block1[n] =
R->N;
6048 Werror(
"mismatch of number of vars (%d) and ordering (%d vars) in block %d",
6049 R->N,
R->block1[n],n);
6055 R->OrdSgn = org_ring->OrdSgn;
◆ scIndIndset()
Definition at line 1022 of file ipshell.cc.
1088 res->m[
i].data = (
void *)save->set;
1100 res->m[
i].data = (
void *)save->set;
◆ semicProc()
Definition at line 4489 of file ipshell.cc.
4492 memset(&tmp,0,
sizeof(tmp));
◆ semicProc3()
Definition at line 4449 of file ipshell.cc.
4452 BOOLEAN qh=(((int)(
long)
w->Data())==1);
4463 WerrorS(
"first argument is not a spectrum" );
4468 WerrorS(
"second argument is not a spectrum" );
◆ spaddProc()
Definition at line 4366 of file ipshell.cc.
4379 WerrorS(
"first argument is not a spectrum:" );
4384 WerrorS(
"second argument is not a spectrum:" );
◆ spectrumCompute()
Definition at line 3748 of file ipshell.cc.
3752 #ifdef SPECTRUM_DEBUG
3753 #ifdef SPECTRUM_PRINT
3754 #ifdef SPECTRUM_IOSTREAM
3755 cout <<
"spectrumCompute\n";
3756 if( fast==0 ) cout <<
" no optimization" << endl;
3757 if( fast==1 ) cout <<
" weight optimization" << endl;
3758 if( fast==2 ) cout <<
" symmetry optimization" << endl;
3760 fputs(
"spectrumCompute\n",stdout );
3761 if( fast==0 ) fputs(
" no optimization\n", stdout );
3762 if( fast==1 ) fputs(
" weight optimization\n", stdout );
3763 if( fast==2 ) fputs(
" symmetry optimization\n", stdout );
3807 #ifdef SPECTRUM_DEBUG
3808 #ifdef SPECTRUM_PRINT
3809 #ifdef SPECTRUM_IOSTREAM
3810 cout <<
"\n computing the Jacobi ideal...\n";
3812 fputs(
"\n computing the Jacobi ideal...\n",stdout );
3821 #ifdef SPECTRUM_DEBUG
3822 #ifdef SPECTRUM_PRINT
3823 #ifdef SPECTRUM_IOSTREAM
3826 fputs(
" ", stdout );
3837 #ifdef SPECTRUM_DEBUG
3838 #ifdef SPECTRUM_PRINT
3839 #ifdef SPECTRUM_IOSTREAM
3841 cout <<
" computing a standard basis..." << endl;
3843 fputs(
"\n", stdout );
3844 fputs(
" computing a standard basis...\n", stdout );
3852 #ifdef SPECTRUM_DEBUG
3853 #ifdef SPECTRUM_PRINT
3856 #ifdef SPECTRUM_IOSTREAM
3859 fputs(
" ",stdout );
3904 #ifdef SPECTRUM_DEBUG
3905 #ifdef SPECTRUM_PRINT
3906 #ifdef SPECTRUM_IOSTREAM
3907 cout <<
"\n computing the highest corner...\n";
3909 fputs(
"\n computing the highest corner...\n", stdout );
3914 poly hc = (poly)
NULL;
3918 if( hc!=(poly)
NULL )
3933 #ifdef SPECTRUM_DEBUG
3934 #ifdef SPECTRUM_PRINT
3935 #ifdef SPECTRUM_IOSTREAM
3938 fputs(
" ", stdout );
3948 #ifdef SPECTRUM_DEBUG
3949 #ifdef SPECTRUM_PRINT
3950 #ifdef SPECTRUM_IOSTREAM
3951 cout <<
"\n computing the newton polygon...\n";
3953 fputs(
"\n computing the newton polygon...\n", stdout );
3960 #ifdef SPECTRUM_DEBUG
3961 #ifdef SPECTRUM_PRINT
3970 #ifdef SPECTRUM_DEBUG
3971 #ifdef SPECTRUM_PRINT
3972 #ifdef SPECTRUM_IOSTREAM
3973 cout <<
"\n computing the weight corner...\n";
3975 fputs(
"\n computing the weight corner...\n", stdout );
3980 poly wc = ( fast==0 ?
pCopy( hc ) :
3985 #ifdef SPECTRUM_DEBUG
3986 #ifdef SPECTRUM_PRINT
3987 #ifdef SPECTRUM_IOSTREAM
3990 fputs(
" ", stdout );
4000 #ifdef SPECTRUM_DEBUG
4001 #ifdef SPECTRUM_PRINT
4002 #ifdef SPECTRUM_IOSTREAM
4003 cout <<
"\n computing NF...\n" << endl;
4005 fputs(
"\n computing NF...\n", stdout );
4014 #ifdef SPECTRUM_DEBUG
4015 #ifdef SPECTRUM_PRINT
4017 #ifdef SPECTRUM_IOSTREAM
4020 fputs(
"\n", stdout );
◆ spectrumfProc()
Definition at line 4122 of file ipshell.cc.
4137 WerrorS(
"only works for local orderings" );
4142 WerrorS(
"does not work in quotient rings" );
◆ spectrumFromList()
◆ spectrumPrintError()
Definition at line 4040 of file ipshell.cc.
4045 WerrorS(
"polynomial is zero" );
4048 WerrorS(
"polynomial has constant term" );
4051 WerrorS(
"not a singularity" );
4054 WerrorS(
"the singularity is not isolated" );
4057 WerrorS(
"highest corner cannot be computed" );
4060 WerrorS(
"principal part is degenerate" );
4066 WerrorS(
"unknown error occurred" );
◆ spectrumProc()
Definition at line 4071 of file ipshell.cc.
4083 WerrorS(
"only works for local orderings" );
4091 WerrorS(
"does not work in quotient rings" );
◆ spectrumStateFromList()
Definition at line 3507 of file ipshell.cc.
3516 ( fast==2 ? 2 : 1 ) );
3526 ( fast==0 || (*node)->weight<=smax ) )
3548 cmp =
pCmp( (*node)->mon,
f );
3571 (*node)->nf =
search->nf;
3575 while( cmp<0 &&
f!=(poly)
NULL );
3588 if( (*node)->weight<=(
Rational)1 ) pg++;
3589 if( (*node)->weight==smax ) z++;
3590 if( (*node)->weight>weight_prev ) n++;
3592 weight_prev = (*node)->weight;
3593 node = &((*node)->next);
3615 cmp =
pCmp( (*node)->mon,
f );
3628 while( cmp<0 &&
f!=(poly)
NULL );
3644 n = ( z > 0 ? 2*n - 1 : 2*n );
3659 ( fast==0 ||
search->weight<=smax );
3685 for( n1=0, n2=n-1; n1<n2; n1++, n2-- )
3688 (*den) [n2] = (*den)[n1];
3689 (*mult)[n2] = (*mult)[n1];
3697 if( fast==0 || fast==1 )
3701 for(
int n1=0, n2=n-1 ; n1<n2 && symmetric==
TRUE; n1++, n2-- )
3704 (*
den) [n1]!= (*
den)[n2] ||
3711 if( symmetric==
FALSE )
3721 (*L)->m[0].data = (
void*)(
long)
mu;
3738 (*L)->m[0].data = (
void*)(
long)
mu;
3739 (*L)->m[1].data = (
void*)(
long)pg;
3740 (*L)->m[2].data = (
void*)(
long)n;
3741 (*L)->m[3].data = (
void*)nom;
3742 (*L)->m[4].data = (
void*)
den;
3743 (*L)->m[5].data = (
void*)
mult;
◆ spmulProc()
Definition at line 4408 of file ipshell.cc.
4417 int k = (int)(
long)second->
Data( );
4421 WerrorS(
"first argument is not a spectrum" );
4426 WerrorS(
"second argument should be positive" );
◆ syBetti1()
Definition at line 3110 of file ipshell.cc.
3113 memset(&tmp,0,
sizeof(tmp));
◆ syBetti2()
Definition at line 3087 of file ipshell.cc.
3091 BOOLEAN minim=(int)(
long)
w->Data();
3093 int add_row_shift=0;
3099 add_row_shift = ww->
min_in();
3100 (*weights) -= add_row_shift;
◆ syConvList()
◆ syConvRes()
◆ syForceMin()
◆ test_cmd()
◆ type_cmd()
◆ iiCurrArgs
◆ iiCurrProc
◆ iiDebugMarker
◆ iiNoKeepRing
◆ lastreserved
◆ MAX_SHORT
const short MAX_SHORT = 32767 |
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
static int si_min(const int a, const int b)
static void rDecomposeC(leftv h, const ring R)
void rComposeRing(lists L, ring R)
short float_len2
additional char-flags, rInit
#define omCheckAddrSize(addr, size)
void hIndMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
@ n_Zn
only used if HAVE_RINGS is defined
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
static BOOLEAN rField_is_long_R(const ring r)
BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v)
void iiCheckPack(package &p)
#define pIsConstant(p)
like above, except that Comp might be != 0
BOOLEAN rCheckIV(const intvec *iv)
void copy_deep(spectrum &spec, lists l)
struct for passing initialization parameters to naInitChar
void syMinimizeResolvente(resolvente res, int length, int first)
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
void pNorm(poly p, const ring R=currRing)
virtual IStateType initState() const
#define idDelete(H)
delete an ideal
void scComputeHC(ideal S, ideal Q, int ak, poly &hEdge, ring tailRing)
BOOLEAN iiApplyLIST(leftv res, leftv a, int op, leftv proc)
#define MATELEM(mat, i, j)
void rChangeCurrRing(ring r)
#define SHORT_REAL_LENGTH
Creation data needed for finite fields.
@ n_long_C
complex floating point (GMP) numbers
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv sl)
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
BOOLEAN syBetti2(leftv res, leftv u, leftv w)
#define pGetExp(p, i)
Exponent.
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
void hRadical(scfmon rad, int *Nrad, int Nvar)
@ semicListThirdElementWrongType
virtual number getSubDet()
BOOLEAN jjBETTI2(leftv res, leftv u, leftv v)
void paPrint(const char *n, package p)
bool solver(const int polishmode=PM_NONE)
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
int search(const CFArray &A, const CanonicalForm &F, int i, int j)
search for F in A between index i and j
@ n_Z2m
only used if HAVE_RINGS is defined
rootContainer ** interpolateDenseSP(BOOLEAN matchUp=false, const number subDetVal=NULL)
@ semicListWrongNumberOfMultiplicities
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
ideal loNewtonPolytope(const ideal id)
#define BREAK_LINE_LENGTH
intvec * id_QHomWeight(ideal id, const ring r)
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
static BOOLEAN rComposeVar(const lists L, ring R)
vandermonde system solver for interpolating polynomials from their values
static BOOLEAN length(leftv result, leftv arg)
idhdl rDefault(const char *s)
idhdl get(const char *s, int lev)
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
static void list1(const char *s, idhdl h, BOOLEAN c, BOOLEAN fullname)
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
@ n_Q
rational (GMP) numbers
static resolvente iiCopyRes(resolvente r, int l)
gmp_float sqrt(const gmp_float &a)
semicState list_is_spectrum(lists l)
BOOLEAN semicProc3(leftv res, leftv u, leftv v, leftv w)
@ n_Znm
only used if HAVE_RINGS is defined
void hDimSolve(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
static BOOLEAN rField_is_Zp_a(const ring r)
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
@ semicListWrongNumberOfNumerators
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Class used for (list of) interpreter objects.
ring rCompose(const lists L, const BOOLEAN check_comp, const long bitmask)
BOOLEAN rSleftvOrdering2Ordering(sleftv *ord, ring R)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
#define __p_Mult_nn(p, n, r)
@ semicListSecondElementWrongType
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
BOOLEAN hasAxis(ideal J, int k, const ring r)
const unsigned short fftable[]
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
static long pTotaldegree(poly p)
spectrum spectrumFromList(lists l)
@ n_long_R
real floating point (GMP) numbers
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
void mu(int **points, int sizePoints)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
poly singclap_resultant(poly f, poly g, poly x, const ring r)
for(int i=0;i<=n;i++) degsf[i]
static BOOLEAN rComposeOrder(const lists L, const BOOLEAN check_comp, ring R)
idhdl packFindHdl(package r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static short rVar(const ring r)
#define rVar(r) (r->N)
static BOOLEAN rField_is_Ring_Z(const ring r)
@ semicListFirstElementWrongType
intvec * ivCopy(const intvec *o)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
struct for passing initialization parameters to naInitChar
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static BOOLEAN idIsZeroDim(ideal i)
static BOOLEAN rField_is_Q_a(const ring r)
int status int void * buf
void setGMPFloatDigits(size_t digits, size_t rest)
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of...
void killlocals_rec(idhdl *root, int v, ring r)
void PrintS(const char *s)
#define omFreeSize(addr, size)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
void killhdl2(idhdl h, idhdl *ih, ring r)
void rComposeC(lists L, ring R)
BOOLEAN iiApplyIDEAL(leftv, leftv, int, leftv)
gmp_complex * getRoot(const int i)
ideal maMapIdeal(const ideal map_id, const ring preimage_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for ideals/module/matrix map_id: the ideal to map map_r: the base ring for map_id imag...
#define nPrint(a)
only for debug, over any initalized currRing
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
char * iiGetLibProcBuffer(procinfo *pi, int part)
static BOOLEAN rField_is_Ring(const ring r)
BOOLEAN slWrite(si_link l, leftv v)
BOOLEAN jjPROC(leftv res, leftv u, leftv v)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
@ semicListWrongNumberOfDenominators
spectrumState spectrumStateFromList(spectrumPolyList &speclist, lists *L, int fast)
BOOLEAN lRingDependend(lists L)
void hKill(monf xmem, int Nvar)
void atSet(idhdl root, char *name, void *data, int typ)
matrix singclap_irrCharSeries(ideal I, const ring r)
@ n_Z
only used if HAVE_RINGS is defined
void list_cmd(int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname)
static void rRenameVars(ring R)
static int rPar(const ring r)
(r->cf->P)
void hDelete(scfmon ev, int ev_length)
static BOOLEAN iiNoKeepRing
resMatrixBase * accessResMat()
short float_len
additional char-flags, rInit
intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
static poly p_Init(const ring r, omBin bin)
static BOOLEAN rField_is_R(const ring r)
double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
poly computeWC(const newtonPolygon &np, Rational max_weight, const ring r)
static int rBlocks(ring r)
#define __pp_Mult_nn(p, n, r)
int iiTestConvert(int inputType, int outputType)
void CleanUp(ring r=currRing)
idhdl rSimpleFindHdl(ring r, idhdl root, idhdl n)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
int idGetNumberOfChoise(int t, int d, int begin, int end, int *choise)
void hIndAllMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
matrix mpNew(int r, int c)
create a r x c zero-matrix
void fillContainer(number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
number nlMapGMP(number from, const coeffs src, const coeffs dst)
denominator_list DENOMINATOR_LIST
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
BOOLEAN iiDefaultParameter(leftv p)
Linear Programming / Linear Optimization using Simplex - Algorithm.
static BOOLEAN iiInternalExport(leftv v, int toLev)
@ n_R
single prescision (6,6) real numbers
static FORCE_INLINE const char ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Base class for solving 0-dim poly systems using u-resultant.
void hPure(scfmon stc, int a, int *Nstc, varset var, int Nvar, scmon pure, int *Npure)
BOOLEAN hasConstTerm(poly h, const ring r)
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights)
void rDelete(ring r)
unconditionally deletes fields in r
uResultant::resMatType determineMType(int imtype)
static void iiReportTypes(int nr, int t, const short *T)
idhdl rFindHdl(ring r, idhdl n)
#define IMATELEM(M, I, J)
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
scfmon hInit(ideal S, ideal Q, int *Nexist, ring tailRing)
int IsCmd(const char *n, int &tok)
static BOOLEAN rField_is_numeric(const ring r)
static BOOLEAN rField_is_GF(const ring r)
BOOLEAN nc_CallPlural(matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type,...
void rDecomposeCF(leftv h, const ring r, const ring R)
static int si_max(const int a, const int b)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void list_error(semicState state)
int mult_spectrum(spectrum &)
BOOLEAN ringIsLocal(const ring r)
@ semicListFifthElementWrongType
void spectrumPrintError(spectrumState state)
void delete_node(spectrumPolyNode **)
BOOLEAN iiApplyINTVEC(leftv res, leftv a, int op, leftv proc)
void hSupp(scfmon stc, int Nstc, varset var, int *Nvar)
void rSetSyzComp(int k, const ring r)
@ ringorder_IS
Induced (Schreyer) ordering.
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
void Werror(const char *fmt,...)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
static leftv rOptimizeOrdAsSleftv(leftv ord)
ideal idInit(int idsize, int rank)
initialise an ideal / module
int hasOne(ideal J, const ring r)
const char * rSimpleOrdStr(int ord)
char name(const Variable &v)
char * lString(lists l, BOOLEAN typed, int dim)
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
Rational pow(const Rational &a, int e)
void WerrorS(const char *s)
virtual ideal getMatrix()
static FORCE_INLINE char * nCoeffName(const coeffs cf)
@ semicListSixthElementWrongType
static BOOLEAN rSleftvList2StringArray(leftv sl, char **p)
void computeNF(ideal stdJ, poly hc, poly wc, spectrumPolyList *NF, const ring r)
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
static void jjINT_S_TO_ID(int n, int *e, leftv res)
static void killlocals0(int v, idhdl *localhdl, const ring r)
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 ....
#define omRealloc0Size(addr, o_size, size)
ring rAssure_HasComp(const ring r)
lists listOfRoots(rootArranger *self, const unsigned int oprec)
const Variable & v
< [in] a sqrfree bivariate poly
#define omCheckAddr(addr)
INLINE_THIS void Init(int l=0)
BOOLEAN mapFromMatrix(matrix m)
static long p_Totaldegree(poly p, const ring r)
const char * par_name
parameter name
BOOLEAN iiApplyBIGINTMAT(leftv, leftv, int, leftv)
int mult_spectrumh(spectrum &)
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
idhdl ggetid(const char *n)
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 (...
int rTypeOfMatrixOrder(const intvec *order)
int status int void size_t count
const char * Tok2Cmdname(int tok)
#define pCopy(p)
return a copy of the poly
spectrumState spectrumCompute(poly h, lists *L, int fast)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static int * multiplicity
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
void rDecomposeRing_41(leftv h, const coeffs C)
@ ringorder_rs
opposite of ls
@ ringorder_a64
for int64 weights
complex root finder for univariate polynomials based on laguers algorithm
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
lists getList(spectrum &spec)
static const char ** rParameter(const ring r)
(r->cf->parameter)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static BOOLEAN rField_is_long_C(const ring r)
unsigned char * proc[NUM_PROC]
#define omFreeBin(addr, bin)
static BOOLEAN rField_is_Zp(const ring r)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
#define pGetVariables(p, e)
void hLexR(scfmon rad, int Nrad, varset var, int Nvar)
static FORCE_INLINE void n_MPZ(mpz_t result, number &n, const coeffs r)
conversion of n to a GMP integer; 0 if not possible
rRingOrder_t rOrderName(char *ordername)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
const ExtensionInfo & info
< [in] sqrfree poly
@ semicListFourthElementWrongType
matrix mapToMatrix(matrix m)
static void rDecomposeC_41(leftv h, const coeffs C)
#define pCmp(p1, p2)
pCmp: args may be NULL returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))
void syKillComputation(syStrategy syzstr, ring r=currRing)
void syKillEmptyEntres(resolvente res, int length)
BOOLEAN killlocals_list(int v, lists L)
rootContainer ** specializeInU(BOOLEAN matchUp=false, const number subDetVal=NULL)
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
void rDecomposeRing(leftv h, const ring R)
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
static BOOLEAN rField_is_Q(const ring r)
static int rInternalChar(const ring r)
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...
#define omReallocSize(addr, o_size, size)
void nlGMP(number &i, mpz_t n, const coeffs r)
BOOLEAN hasLinearTerm(poly h, const ring r)
void Clean(ring r=currRing)
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)