10#include "factory/factory.h"
114 case LE:
return "<=";
115 case GE:
return ">=";
124 if (
s[1]==
'\0')
return s[0];
125 else if (
s[2]!=
'\0')
return 0;
128 case '.':
if (
s[1]==
'.')
return DOTDOT;
134 case '+':
if (
s[1]==
'+')
return PLUSPLUS;
138 case '<':
if (
s[1]==
'=')
return LE;
141 case '>':
if (
s[1]==
'=')
return GE;
143 case '!':
if (
s[1]==
'=')
return NOTEQUAL;
210 memset(buffer,0,
sizeof(buffer));
220 Print(
"..., %d char(s)",
l);
243 Print(
" %d x %d (%s)",
269 ((
intvec*)(
v->Data()))->cols());
break;
427 package savePack=currPack;
434 if (
strcmp(what,
"all")==0)
467 Werror(
"%s is undefined",what);
501 package save_p=currPack;
535 WarnS(
"Gerhard, use the option command");
572 rc +=
mm->rows() *
mm->cols();
576 rc+=((
lists)
v->Data())->nr+1;
597 WerrorS(
"write: need at least two arguments");
607 Werror(
"cannot write to %s",
s);
634 Werror(
"can not map from ground field of %s to current ground field",
714 WerrorS(
"argument of a map must have a name");
772 poly
p=(poly)
tmpW.data;
789 Warn(
"possible OVERFLOW in map, max exponent is %ld",
currRing->bitmask/2);
809 theMap->preimage=(
char*)1L;
867 Print(
"//defining: %s as %d-th syzygy module\n",
s,
i+1);
872 Warn(
"cannot define %s",
s);
984 l->m[0].rtyp=u->
Typ();
985 l->m[0].data=u->
Data();
988 l->m[0].attribute=*a;
995 l->m[0].attribute=
NULL;
1033 if (weights!=
NULL)
delete weights;
1057 if (weights!=
NULL)
delete weights;
1064#define BREAK_LINE_LENGTH 80
1164 res->m[
i].data = (
void *)
save->set;
1176 res->m[
i].data = (
void *)
save->set;
1202 const char *
id =
name->name;
1207 WerrorS(
"object to declare is not a name");
1217 Werror(
"can not define `%s` in other package",
name->name);
1270 tmp.data=
at->CopyA();
1278 WerrorS(
"branchTo can only occur in a proc");
1289 short *t=(
short*)
omAlloc(
l*
sizeof(
short));
1293 for(
i=1;
i<
l;
i++,
h=
h->next)
1298 Werror(
"arg %d is not a string",
i);
1307 Werror(
"arg %d is not a type name",
i);
1314 Werror(
"last(%d.) arg.(%s) is not a proc(but %s(%d)), nesting=%d",
1327 if(
pi->data.s.body==
NULL )
1443 WerrorS(
"object with a different type exists");
1461 Warn(
"'%s': no such identifier\n",
v->
name);
1464 package frompack=v->req_packhdl;
1492 Werror(
"`%s` not found",
v->Name());
1510 Werror(
"cannot export:%s of internal type %d",
v->
name,
v->rtyp);
1536 Werror(
"cannot export:%s of internal type %d",
v->
name,
v->rtyp);
1587 WerrorS(
"no ring active (9)");
1629 WarnS(
"package not found\n");
1649 #ifndef TEST_ZN_AS_ZP
1660 r->cf->has_simple_Inverse=1;
1673 r->block0 = (
int *)
omAlloc0(3 *
sizeof(
int *));
1674 r->block1 = (
int *)
omAlloc0(3 *
sizeof(
int *));
1693 if ((r==
NULL)||(r->VarOffset==
NULL))
1732 L->
m[0].
data=(
void *)(
long)r->cf->ch;
1738 for(
i=0;
i<r->N;
i++)
1761 if (r->block1[
i]-r->block0[
i] >=0 )
1763 j=r->block1[
i]-r->block0[
i];
1766 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
1768 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j];
1770 else switch (r->order[
i])
1779 for(;
j>=0;
j--) (*iv)[
j]=1;
1789 LLL->
m[1].
data=(
void *)iv;
1790 LL->m[
i].data=(
void *)LLL;
1804 L->
m[3].
data=(
void *)q;
1823 L->
m[0].
data=(
void *)0;
1857 L->
m[0].
data=(
void *)0;
1900 LL->m[1].data=(
void *) C->modExponent;
1927 LL->m[1].data=(
void *)
R->cf->modExponent;
1940 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1951 else if ( C->extRing!=
NULL )
1961 Lc->m[0].data=(
void*)(
long)C->m_nfCharQ;
1968 Lc->m[1].data=(
void*)
Lv;
1979 Loo->m[1].data=(
void *)iv;
1982 Lo->m[0].data=(
void*)
Loo;
1985 Lc->m[2].data=(
void*)
Lo;
1991 res->data=(
void*)
Lc;
1996 res->data=(
void *)(
long)C->ch;
2010 for(
i=0;
i<r->N;
i++)
2037 assume( r->block0[
i] == r->block1[
i] );
2038 const int s = r->block0[
i];
2044 else if (r->block1[
i]-r->block0[
i] >=0 )
2046 int bl=
j=r->block1[
i]-r->block0[
i];
2054 j+=r->wvhdl[
i][
bl+1];
2057 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2059 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>
bl)];
2061 else switch (r->order[
i])
2070 for(;
j>=0;
j--) (*iv)[
j]=1;
2080 LLL->
m[1].
data=(
void *)iv;
2081 LL->m[
i].data=(
void *)LLL;
2088 if (r->qideal==
NULL)
2119 WerrorS(
"ring with polynomial data must be the base ring or compatible");
2137 L->
m[0].
data=(
char*)r->cf; r->cf->ref++;
2152 || (r->qideal !=
NULL)
2159 WerrorS(
"ring with polynomial data must be the base ring or compatible");
2184 else if ( r->cf->extRing!=
NULL )
2194 Lc->m[0].data=(
void*)(
long)r->cf->m_nfCharQ;
2201 Lc->m[1].data=(
void*)
Lv;
2212 Loo->m[1].data=(
void *)iv;
2215 Lo->m[0].data=(
void*)
Loo;
2218 Lc->m[2].data=(
void*)
Lo;
2229 L->
m[0].
data=(
void *)(
long)r->cf->ch;
2234 L->
m[0].
data=(
void *)r->cf;
2249 WerrorS(
"invalid coeff. field description, expecting 0");
2257 WerrorS(
"invalid coeff. field description, expecting precision list");
2265 WerrorS(
"invalid coeff. field description list, expected list(`int`,`int`)");
2268 int r1=(
int)(
long)
LL->m[0].data;
2269 int r2=(
int)(
long)
LL->m[1].data;
2279 WerrorS(
"invalid coeff. field description, expecting parameter name");
2300 unsigned int modExponent = 1;
2330 modExponent = (
unsigned long)
LL->m[1].data;
2340 WerrorS(
"Wrong ground ring specification (module is 1)");
2343 if (modExponent < 1)
2345 WerrorS(
"Wrong ground ring specification (exponent smaller than 1)");
2354 else if (modExponent > 1)
2357 if ((
mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
2368 info.exp= modExponent;
2379 info.exp= modExponent;
2392 for(
i=0;
i<
R->N-1;
i++)
2394 for(
j=
i+1;
j<
R->N;
j++)
2447 poly
p=(poly)
v->m[
i].Data();
2453 Werror(
"var name %d must be a string or a ring variable",
i+1);
2459 Werror(
"var name %d must be `string` (not %d)",
i+1,
v->m[
i].Typ());
2466 WerrorS(
"variable must be given as `list`");
2482 for (
int j=0;
j < n-1;
j++)
2489 &&(
strcmp((
char*)
vv->m[0].Data(),
"L")==0))
2498 Werror(
"illegal argument for pseudo ordering L: %d",
vv->m[1].Typ());
2505 if (bitmask!=0) n--;
2521 WerrorS(
"ordering must be list of lists");
2528 if (
strcmp((
char*)
vv->m[0].Data(),
"L")==0)
2537 Werror(
"ordering name must be a (string,intvec), not (string,%s)",
Tok2Cmdname(
vv->m[1].Typ()));
2542 if (
j_in_R==0)
R->block0[0]=1;
2565 int l=
si_max(1,(
int)(
long)
vv->m[1].Data());
2567 for(
int i=0;
i<
l;
i++) (*iv)[
i]=1;
2597 Print(
"R->block0[j_in_R]=%d,N=%d\n",
R->block0[
j_in_R],
R->N);
2657 if (((*iv)[
i]!=1)&&(
iv_len!=1))
2660 Warn(
"ignore weight %d for ord %d (%s) at pos %d\n>>%s<<",
2684 const int s = (*iv)[0];
2695 WerrorS(
"ring order not implemented");
2703 WerrorS(
"ordering name must be a (string,intvec)");
2729 Werror(
"ordering incomplete: size (%d) should be %d",
R->block1[
j_in_R],
R->N);
2735 Werror(
"not enough variables (%d) for ordering block %d, scanned so far:",
R->N,
j_in_R+1);
2765 WerrorS(
"ordering must be given as `list`");
2768 if (bitmask!=0) {
R->bitmask=bitmask;
R->wanted_maxExp=bitmask; }
2800 int ch = (
int)(
long)L->
m[0].
Data();
2810 Warn(
"%d is invalid characteristic of ground field. %d is used.", ch,
l);
2813 #ifndef TEST_ZN_AS_ZP
2824 R->cf->has_simple_Inverse=1;
2843 int ch = (
int)(
long)
LL->m[0].Data();
2853 param.GFPar_name = (
const char*)(((
lists)(
LL->m[1].Data()))->m[0].Data());
2866 WerrorS(
"could not create the specified coefficient field");
2870 if( extRing->qideal !=
NULL )
2888 WerrorS(
"coefficient field must be described by `int` or `list`");
2894 WerrorS(
"could not create coefficient field described by the input!");
2906 #ifdef HAVE_SHIFTBBA
2914 if ((bitmask!=0)&&(
R->wanted_maxExp==0))
R->wanted_maxExp=bitmask;
2927 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2964 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
3009 WerrorS(
"q-ideal must be given as `ideal`");
3078 int n=(
int)(
long)
b->Data();
3086 if ((d>n) || (d<1) || (n<1))
3149 if (
ww!=
NULL)
delete weights;
3175 if ((fullres==
NULL) && (minres==
NULL))
3229 syzstr->fullres = fullres;
3295 res->data=(
char *)iv;
3301 for(
int i=0;
i<n;
i++) (*iv)[
i]=1;
3309 for (
i = n;
i!=0;
i--)
3310 (*iv)[
i-1] =
x[
i + n + 1];
3328 res->data=(
void *)
b;
3354 spec.
mu = (
int)(
long)(
l->m[0].Data( ));
3355 spec.
pg = (
int)(
long)(
l->m[1].Data( ));
3356 spec.
n = (
int)(
long)(
l->m[2].Data( ));
3364 for(
int i=0;
i<spec.
n;
i++ )
3367 spec.
w[
i] = (*mul)[
i];
3398 for(
int i=0;
i<spec.
n;
i++ )
3402 (*mult)[
i] = spec.
w[
i];
3412 L->
m[0].
data = (
void*)(
long)spec.
mu;
3413 L->
m[1].
data = (
void*)(
long)spec.
pg;
3414 L->
m[2].
data = (
void*)(
long)spec.
n;
3465 WerrorS(
"the list is too short" );
3468 WerrorS(
"the list is too long" );
3472 WerrorS(
"first element of the list should be int" );
3475 WerrorS(
"second element of the list should be int" );
3478 WerrorS(
"third element of the list should be int" );
3481 WerrorS(
"fourth element of the list should be intvec" );
3484 WerrorS(
"fifth element of the list should be intvec" );
3487 WerrorS(
"sixth element of the list should be intvec" );
3491 WerrorS(
"first element of the list should be positive" );
3494 WerrorS(
"wrong number of numerators" );
3497 WerrorS(
"wrong number of denominators" );
3500 WerrorS(
"wrong number of multiplicities" );
3504 WerrorS(
"the Milnor number should be positive" );
3507 WerrorS(
"the geometrical genus should be nonnegative" );
3510 WerrorS(
"all numerators should be positive" );
3513 WerrorS(
"all denominators should be positive" );
3516 WerrorS(
"all multiplicities should be positive" );
3520 WerrorS(
"it is not symmetric" );
3523 WerrorS(
"it is not monotonous" );
3527 WerrorS(
"the Milnor number is wrong" );
3530 WerrorS(
"the geometrical genus is wrong" );
3534 WerrorS(
"unspecific error" );
3570 ( fast==2 ? 2 : 1 ) );
3580 ( fast==0 || (*node)->weight<=
smax ) )
3625 (*node)->nf =
search->nf;
3642 if( (*node)->weight<=(
Rational)1 ) pg++;
3643 if( (*node)->weight==
smax ) z++;
3647 node = &((*node)->next);
3698 n = ( z > 0 ? 2*n - 1 : 2*n );
3742 (*den) [
n2] = (*den)[
n1];
3743 (*mult)[
n2] = (*mult)[
n1];
3751 if( fast==0 || fast==1 )
3775 (*L)->m[0].data = (
void*)(
long)
mu;
3792 (*L)->m[0].data = (
void*)(
long)
mu;
3793 (*L)->m[1].data = (
void*)(
long)pg;
3794 (*L)->m[2].data = (
void*)(
long)n;
3795 (*L)->m[3].data = (
void*)
nom;
3796 (*L)->m[4].data = (
void*)
den;
3797 (*L)->m[5].data = (
void*)
mult;
3806 #ifdef SPECTRUM_DEBUG
3807 #ifdef SPECTRUM_PRINT
3808 #ifdef SPECTRUM_IOSTREAM
3809 cout <<
"spectrumCompute\n";
3810 if( fast==0 )
cout <<
" no optimization" << endl;
3811 if( fast==1 )
cout <<
" weight optimization" << endl;
3812 if( fast==2 )
cout <<
" symmetry optimization" << endl;
3815 if( fast==0 )
fputs(
" no optimization\n",
stdout );
3816 if( fast==1 )
fputs(
" weight optimization\n",
stdout );
3817 if( fast==2 )
fputs(
" symmetry optimization\n",
stdout );
3861 #ifdef SPECTRUM_DEBUG
3862 #ifdef SPECTRUM_PRINT
3863 #ifdef SPECTRUM_IOSTREAM
3864 cout <<
"\n computing the Jacobi ideal...\n";
3866 fputs(
"\n computing the Jacobi ideal...\n",
stdout );
3875 #ifdef SPECTRUM_DEBUG
3876 #ifdef SPECTRUM_PRINT
3877 #ifdef SPECTRUM_IOSTREAM
3891 #ifdef SPECTRUM_DEBUG
3892 #ifdef SPECTRUM_PRINT
3893 #ifdef SPECTRUM_IOSTREAM
3895 cout <<
" computing a standard basis..." << endl;
3898 fputs(
" computing a standard basis...\n",
stdout );
3906 #ifdef SPECTRUM_DEBUG
3907 #ifdef SPECTRUM_PRINT
3910 #ifdef SPECTRUM_IOSTREAM
3958 #ifdef SPECTRUM_DEBUG
3959 #ifdef SPECTRUM_PRINT
3960 #ifdef SPECTRUM_IOSTREAM
3961 cout <<
"\n computing the highest corner...\n";
3963 fputs(
"\n computing the highest corner...\n",
stdout );
3987 #ifdef SPECTRUM_DEBUG
3988 #ifdef SPECTRUM_PRINT
3989 #ifdef SPECTRUM_IOSTREAM
4002 #ifdef SPECTRUM_DEBUG
4003 #ifdef SPECTRUM_PRINT
4004 #ifdef SPECTRUM_IOSTREAM
4005 cout <<
"\n computing the newton polygon...\n";
4007 fputs(
"\n computing the newton polygon...\n",
stdout );
4014 #ifdef SPECTRUM_DEBUG
4015 #ifdef SPECTRUM_PRINT
4024 #ifdef SPECTRUM_DEBUG
4025 #ifdef SPECTRUM_PRINT
4026 #ifdef SPECTRUM_IOSTREAM
4027 cout <<
"\n computing the weight corner...\n";
4029 fputs(
"\n computing the weight corner...\n",
stdout );
4039 #ifdef SPECTRUM_DEBUG
4040 #ifdef SPECTRUM_PRINT
4041 #ifdef SPECTRUM_IOSTREAM
4054 #ifdef SPECTRUM_DEBUG
4055 #ifdef SPECTRUM_PRINT
4056 #ifdef SPECTRUM_IOSTREAM
4057 cout <<
"\n computing NF...\n" << endl;
4068 #ifdef SPECTRUM_DEBUG
4069 #ifdef SPECTRUM_PRINT
4071 #ifdef SPECTRUM_IOSTREAM
4099 WerrorS(
"polynomial is zero" );
4102 WerrorS(
"polynomial has constant term" );
4105 WerrorS(
"not a singularity" );
4108 WerrorS(
"the singularity is not isolated" );
4111 WerrorS(
"highest corner cannot be computed" );
4114 WerrorS(
"principal part is degenerate" );
4120 WerrorS(
"unknown error occurred" );
4137 WerrorS(
"only works for local orderings" );
4145 WerrorS(
"does not work in quotient rings" );
4191 WerrorS(
"only works for local orderings" );
4196 WerrorS(
"does not work in quotient rings" );
4255 else if(
l->nr > 5 )
4293 int mu = (
int)(
long)(
l->m[0].Data( ));
4294 int pg = (
int)(
long)(
l->m[1].Data( ));
4295 int n = (
int)(
long)(
l->m[2].Data( ));
4306 if( n !=
num->length( ) )
4310 else if( n !=
den->length( ) )
4334 for(
i=0;
i<n;
i++ )
4336 if( (*
num)[
i] <= 0 )
4340 if( (*
den)[
i] <= 0 )
4344 if( (*
mul)[
i] <= 0 )
4356 for(
i=0,
j=n-1;
i<=
j;
i++,
j-- )
4359 (*den)[
i] != (*den)[
j] ||
4360 (*mul)[
i] != (*mul)[
j] )
4370 for(
i=0,
j=1;
i<n/2;
i++,
j++ )
4372 if( (*
num)[
i]*(*den)[
j] >= (*num)[
j]*(*den)[
i] )
4382 for(
mu=0,
i=0;
i<n;
i++ )
4387 if(
mu != (
int)(
long)(
l->m[0].Data( )) )
4396 for( pg=0,
i=0;
i<n;
i++ )
4398 if( (*
num)[
i]<=(*den)[
i] )
4404 if( pg != (
int)(
long)(
l->m[1].Data( )) )
4433 WerrorS(
"first argument is not a spectrum:" );
4438 WerrorS(
"second argument is not a spectrum:" );
4475 WerrorS(
"first argument is not a spectrum" );
4480 WerrorS(
"second argument should be positive" );
4517 WerrorS(
"first argument is not a spectrum" );
4522 WerrorS(
"second argument is not a spectrum" );
4532 res->data = (
void*)(
long)(
s1.mult_spectrumh(
s2 ));
4534 res->data = (
void*)(
long)(
s1.mult_spectrum(
s2 ));
4565 WerrorS(
"Ground field not implemented!");
4585 LP->
m= (
int)(
long)(
v->Data());
4591 LP->
n= (
int)(
long)(
v->Data());
4597 LP->
m1= (
int)(
long)(
v->Data());
4603 LP->
m2= (
int)(
long)(
v->Data());
4609 LP->
m3= (
int)(
long)(
v->Data());
4612 Print(
"m (constraints) %d\n",LP->
m);
4613 Print(
"n (columns) %d\n",LP->
n);
4637 lres->m[4].data=(
void*)(
long)LP->
m;
4640 lres->m[5].data=(
void*)(
long)LP->
n;
4673 gls= (poly)(arg1->
Data());
4674 int howclean= (
int)(
long)arg3->
Data();
4678 WerrorS(
"Input polynomial is constant!");
4687 rlist->Init( r[0] );
4688 for(
int i=r[0];
i>0;
i--)
4703 WerrorS(
"Ground field not implemented!");
4710 unsigned long int ii = (
unsigned long int)arg2->
Data();
4737 WerrorS(
"The input polynomial must be univariate!");
4747 for (
i= deg;
i >= 0;
i-- )
4762 for (
i=deg;
i >= 0;
i--)
4770 roots->
solver( howclean );
4778 rlist->Init( elem );
4782 for (
j= 0;
j < elem;
j++ )
4791 for (
j= 0;
j < elem;
j++ )
4829 int tdg= (
int)(
long)arg3->
Data();
4836 WerrorS(
"Last input parameter must be > 0!");
4844 if (
m != (
int)
pow((
double)tdg+1,(
double)n) )
4846 Werror(
"Size of second input ideal must be equal to %d!",
4847 (
int)
pow((
double)tdg+1,(
double)n));
4854 WerrorS(
"Ground field not implemented!");
4860 for (
i= 0;
i < n;
i++ )
4869 WerrorS(
"Elements of first input ideal must not be equal to -1, 0, 1!");
4878 WerrorS(
"Elements of first input ideal must be numbers!");
4886 for (
i= 0;
i <
m;
i++ )
4895 WerrorS(
"Elements of second input ideal must be numbers!");
4925 else gls= (
ideal)(
v->Data());
4940 if (gls->m[
j]!=
NULL)
4946 WerrorS(
"Newton polytope not of expected dimension");
4960 unsigned long int ii=(
unsigned long int)
v->Data();
4968 else howclean= (
int)(
long)
v->Data();
4997 WerrorS(
"Error occurred during matrix setup!");
5004 smv=
ures->accessResMat()->getSubDet();
5010 WerrorS(
"Unsuitable input ideal: Minor of resultant matrix is singular!");
5028 int c=
iproots[0]->getAnzElems();
5046 WerrorS(
"Solver was unable to find any roots!");
5087 for (
j= 0;
j < elem;
j++ )
5149 Warn(
"deleting denom_list for ring change to %s",
IDID(
h));
5191 if((*iv)[
i]>=0) { neg=
FALSE;
break; }
5196 (*iv)[
i]= - (*iv)[
i];
5205 if((*iv)[
i]>=0) { neg=
FALSE;
break; }
5210 (*iv)[
i]= -(*iv)[
i];
5225 (*iv2)[2]=iv->
length()-2;
5243 (*iv2)[2]=iv->
length()-2;
5284 (*iv)[2] += (*iv2)[2];
5299 int last = 0, o=0, n = 1,
i=0, typ = 1,
j;
5311 R->wanted_maxExp=(*iv)[2]*2+1;
5324 WerrorS(
"invalid combination of orderings");
5332 WerrorS(
"more than one ordering c/C specified");
5338 R->block0=(
int *)
omAlloc0(n*
sizeof(
int));
5339 R->block1=(
int *)
omAlloc0(n*
sizeof(
int));
5345 for (
j=0;
j < n-1;
j++)
5376 R->block0[n] =
last+1;
5379 R->wvhdl[n][
i-2] = (*iv)[
i];
5381 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5394 R->block0[n] =
last+1;
5396 else last += (*iv)[0];
5401 if (weights[
i]==0) weights[
i]=typ;
5413 const int s = (*iv)[2];
5423 const int s = (*iv)[2];
5425 if( 1 <
s ||
s < -1 )
return TRUE;
5441 R->block0[n] =
last+1;
5446 R->wvhdl[n][
i-2]=(*iv)[
i];
5448 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5450 last=
R->block0[n]-1;
5455 R->block0[n] =
last+1;
5458 if (
R->block1[n]-
R->block0[n]+2>=iv->
length())
5459 WarnS(
"missing module weights");
5460 for (
i=2;
i<=(
R->block1[n]-
R->block0[n]+2);
i++)
5462 R->wvhdl[n][
i-2]=(*iv)[
i];
5464 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5466 R->wvhdl[n][
i-2]=iv->
length() -3 -(
R->block1[n]-
R->block0[n]);
5469 R->wvhdl[n][
i-1]=(*iv)[
i];
5471 last=
R->block0[n]-1;
5476 R->block0[n] =
last+1;
5484 if (weights[
last]==0) weights[
last]=(*iv)[
i]*typ;
5486 last=
R->block0[n]-1;
5493 if (
Mtyp==-1) typ = -1;
5497 R->wvhdl[n][
i-2]=(*iv)[
i];
5499 R->block0[n] =
last+1;
5502 for(
i=
R->block1[n];
i>=
R->block0[n];
i--)
5504 if (weights[
i]==0) weights[
i]=typ;
5514 Werror(
"Internal Error: Unknown ordering %d", (*iv)[1]);
5521 Werror(
"mismatch of number of vars (%d) and ordering (>=%d vars)",
5529 for(
i=1;
i<=
R->N;
i++)
5530 {
if (weights[
i]<0) {
R->OrdSgn=-1;
break; }}
5544 if (
R->block1[n] !=
R->N)
5555 R->block0[n] <=
R->N)
5557 R->block1[n] =
R->N;
5561 Werror(
"mismatch of number of vars (%d) and ordering (%d vars)",
5580 *
p = (
char*)sl->
name;
5633 const int P =
pn->listLength();
5642 const int pars =
pnn->listLength();
5648 WerrorS(
"parameter expected");
5667 int ch = (
int)(
long)
pn->Data();
5678 if ((ch<2)||(ch!=
ch2))
5680 Warn(
"%d is invalid as characteristic of the ground field. 32003 is used.", ch);
5683 #ifndef TEST_ZN_AS_ZP
5694 cf->has_simple_Inverse=1;
5702 const int pars =
pnn->listLength();
5719 if ((ch!=0) && (ch!=
IsPrime(ch)))
5721 WerrorS(
"too many parameters");
5729 WerrorS(
"parameter expected");
5748 else if ((
pn->name !=
NULL)
5755 float_len=(
int)(
long)
pnn->Data();
5756 float_len2=float_len;
5760 float_len2=(
int)(
long)
pnn->Data();
5785 param.par_name=(
const char*)
"i";
5787 param.par_name = (
const char*)
pnn->name;
5794 else if ((
pn->name !=
NULL) && (
strcmp(
pn->name,
"integer") == 0))
5798 unsigned int modExponent = 1;
5810 modExponent = (
long)
pnn->Data();
5830 WerrorS(
"Wrong ground ring specification (module is 1)");
5833 if (modExponent < 1)
5835 WerrorS(
"Wrong ground ring specification (exponent smaller than 1");
5840 if (modExponent > 1 &&
cf ==
NULL)
5842 if ((
mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
5853 WerrorS(
"modulus must not be 0 or parameter not allowed");
5859 info.exp= modExponent;
5868 WerrorS(
"modulus must not be 0 or parameter not allowed");
5874 info.exp= modExponent;
5884 if (r->qideal==
NULL)
5891 else if (
IDELEMS(r->qideal)==1)
5900 WerrorS(
"algebraic extension ring must have one minpoly");
5906 WerrorS(
"Wrong or unknown ground field specification");
5912 Print(
"pn[%p]: type: %d [%s]: %p, name: %s", (
void*)
p,
p->Typ(),
Tok2Cmdname(
p->Typ()),
p->Data(), (
p->name ==
NULL?
"NULL" :
p->name) );
5934 WerrorS(
"Invalid ground field specification");
5946 int l=
rv->listLength();
5958 WerrorS(
"name of ring variable expected");
6016 int l=
rv->listLength();
6028 WerrorS(
"name of ring variable expected");
6048 Werror(
"variable %d (%s) not in basering",
j+1,
R->names[
j]);
6061 for(
j=
R->block0[
i];
j<=
R->block1[
i];
j++)
6083 R->wvhdl[
i][perm[
j]-
R->block0[
i]]=
6110 R->order[
j-1]=
R->order[
j];
6111 R->block0[
j-1]=
R->block0[
j];
6112 R->block1[
j-1]=
R->block1[
j];
6114 R->wvhdl[
j-1]=
R->wvhdl[
j];
6122 while (
R->order[n]==0) n--;
6125 if (
R->block1[n] !=
R->N)
6136 R->block0[n] <=
R->N)
6138 R->block1[n] =
R->N;
6142 Werror(
"mismatch of number of vars (%d) and ordering (%d vars) in block %d",
6143 R->N,
R->block1[n],n);
6172 if ((r->ref<=0)&&(r->order!=
NULL))
6182 if (
j==0)
WarnS(
"killing the basering for level 0");
6187 while (r->idroot!=
NULL)
6190 killhdl2(r->idroot,&(r->idroot),r);
6236 Warn(
"deleting denom_list for ring change from %s",
IDID(
h));
6313 for(
i=
I->nrows*
I->ncols-1;
i>=0;
i--)
6325 switch (
p->language)
6334 if(
p->libname!=
NULL)
6335 Print(
",%s",
p->libname);
6350 tmp_in.data=(
void*)(
long)(*aa)[
i];
6358 Werror(
"apply fails at index %d",
i+1);
6388 res->data=(
void *)
l;
6395 for(
int i=0;
i<=
aa->nr;
i++)
6407 Werror(
"apply fails at index %d",
i+1);
6438 WerrorS(
"first argument to `apply` must allow an index");
6484 snprintf(
ss,len,
"parameter def %s;return(%s);\n",a,
s);
6550 snprintf(
buf,250,
"wrong length of parameters(%d), expected ",t);
6552 snprintf(
buf,250,
"par. %d is of undefined, expected ",nr);
6555 for(
int i=1;
i<=
T[0];
i++)
6578 for(
int i=1;
i<=
l;
i++,args=args->
next)
6584 || (t!=args->
Typ()))
6607 Print(
" %s (%s) -> %s",
Rational pow(const Rational &a, int e)
struct for passing initialization parameters to naInitChar
void atSet(idhdl root, char *name, void *data, int typ)
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
unsigned char * proc[NUM_PROC]
poly singclap_resultant(poly f, poly g, poly x, const ring r)
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
matrix singclap_irrCharSeries(ideal I, const ring r)
int * Zp_roots(poly p, const ring r)
idhdl get(const char *s, int lev)
void show(int mat=0, int spaces=0) const
virtual ideal getMatrix()
complex root finder for univariate polynomials based on laguers algorithm
gmp_complex * getRoot(const int i)
void fillContainer(number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz)
bool solver(const int polishmode=PM_NONE)
Linear Programming / Linear Optimization using Simplex - Algorithm.
BOOLEAN mapFromMatrix(matrix m)
matrix mapToMatrix(matrix m)
Class used for (list of) interpreter objects.
void CleanUp(ring r=currRing)
INLINE_THIS void Init(int l=0)
Base class for solving 0-dim poly systems using u-resultant.
resMatrixBase * accessResMat()
vandermonde system solver for interpolating polynomials from their values
Coefficient rings, fields and other domains suitable for Singular polynomials.
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 ....
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
@ n_R
single prescision (6,6) real numbers
@ n_Q
rational (GMP) numbers
@ n_Znm
only used if HAVE_RINGS is defined
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
@ n_Zn
only used if HAVE_RINGS is defined
@ n_long_R
real floating point (GMP) numbers
@ n_Z2m
only used if HAVE_RINGS is defined
@ n_transExt
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
@ n_Z
only used if HAVE_RINGS is defined
@ n_long_C
complex floating point (GMP) numbers
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
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
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 FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
const unsigned short fftable[]
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE char * nCoeffName(const coeffs cf)
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
Creation data needed for finite fields.
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
int search(const CFArray &A, const CanonicalForm &F, int i, int j)
search for F in A between index i and j
char name(const Variable &v)
void WerrorS(const char *s)
VAR char my_yylinebuf[80]
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
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...
int iiTestConvert(int inputType, int outputType)
const char * iiTwoOps(int t)
const char * Tok2Cmdname(int tok)
static int RingDependend(int t)
void scComputeHC(ideal S, ideal Q, int ak, poly &hEdge)
void hIndMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hDimSolve(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hIndAllMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
void hKill(monf xmem, int Nvar)
void hDelete(scfmon ev, int ev_length)
void hPure(scfmon stc, int a, int *Nstc, varset var, int Nvar, scmon pure, int *Npure)
void hSupp(scfmon stc, int Nstc, varset var, int *Nvar)
void hLexR(scfmon rad, int Nrad, varset var, int Nvar)
scfmon hInit(ideal S, ideal Q, int *Nexist)
void hRadical(scfmon rad, int *Nrad, int Nvar)
#define idDelete(H)
delete an ideal
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
static BOOLEAN idIsZeroDim(ideal i)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
int idGetNumberOfChoise(int t, int d, int begin, int end, int *choise)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
STATIC_VAR int * multiplicity
static BOOLEAN length(leftv result, leftv arg)
intvec * ivCopy(const intvec *o)
#define IMATELEM(M, I, J)
int IsCmd(const char *n, int &tok)
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
BOOLEAN jjPROC(leftv res, leftv u, leftv v)
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
idhdl ggetid(const char *n)
void killhdl2(idhdl h, idhdl *ih, ring r)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
VAR proclevel * procstack
idhdl packFindHdl(package r)
EXTERN_VAR omBin sleftv_bin
INST_VAR sleftv iiRETURNEXPR
char * iiGetLibProcBuffer(procinfo *pi, int part)
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
lists rDecompose(const ring r)
@ semicListWrongNumberOfNumerators
@ semicListFirstElementWrongType
@ semicListSecondElementWrongType
@ semicListFourthElementWrongType
@ semicListWrongNumberOfDenominators
@ semicListThirdElementWrongType
@ semicListWrongNumberOfMultiplicities
@ semicListFifthElementWrongType
@ semicListSixthElementWrongType
BOOLEAN iiApplyINTVEC(leftv res, leftv a, int op, leftv proc)
BOOLEAN jjVARIABLES_P(leftv res, leftv u)
lists rDecompose_list_cf(const ring r)
int iiOpsTwoChar(const char *s)
BOOLEAN spaddProc(leftv result, leftv first, leftv second)
BOOLEAN jjMINRES(leftv res, leftv v)
BOOLEAN killlocals_list(int v, lists L)
BOOLEAN iiParameter(leftv p)
STATIC_VAR BOOLEAN iiNoKeepRing
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
static void rRenameVars(ring R)
void iiCheckPack(package &p)
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 (...
BOOLEAN iiApply(leftv res, leftv a, int op, leftv proc)
void list_cmd(int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname)
VAR BOOLEAN iiDebugMarker
ring rInit(leftv pn, leftv rv, leftv ord)
leftv iiMap(map theMap, const char *what)
int iiRegularity(lists L)
BOOLEAN rDecompose_CF(leftv res, const coeffs C)
static void rDecomposeC_41(leftv h, const coeffs C)
void iiMakeResolv(resolvente r, int length, int rlen, char *name, int typ0, intvec **weights)
BOOLEAN iiARROW(leftv r, char *a, char *s)
BOOLEAN semicProc3(leftv res, leftv u, leftv v, leftv w)
BOOLEAN syBetti1(leftv res, leftv u)
BOOLEAN iiApplyLIST(leftv res, leftv a, int op, leftv proc)
static void rDecomposeC(leftv h, const ring R)
int exprlist_length(leftv v)
BOOLEAN mpKoszul(leftv res, leftv c, leftv b, leftv id)
poly iiHighCorner(ideal I, int ak)
BOOLEAN spectrumfProc(leftv result, leftv first)
lists listOfRoots(rootArranger *self, const unsigned int oprec)
static void jjINT_S_TO_ID(int n, int *e, leftv res)
lists scIndIndset(ideal S, BOOLEAN all, ideal Q)
BOOLEAN jjCHARSERIES(leftv res, leftv u)
void rDecomposeCF(leftv h, const ring r, const ring R)
BOOLEAN iiApplyIDEAL(leftv, leftv, int, leftv)
static void list1(const char *s, idhdl h, BOOLEAN c, BOOLEAN fullname)
void list_error(semicState state)
BOOLEAN mpJacobi(leftv res, leftv a)
const char * iiTwoOps(int t)
BOOLEAN iiBranchTo(leftv, leftv args)
BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v)
BOOLEAN iiTestAssume(leftv a, leftv b)
void iiSetReturn(const leftv source)
BOOLEAN iiAssignCR(leftv r, leftv arg)
BOOLEAN spmulProc(leftv result, leftv first, leftv second)
spectrumState spectrumCompute(poly h, lists *L, int fast)
idhdl rFindHdl(ring r, idhdl n)
syStrategy syConvList(lists li)
BOOLEAN spectrumProc(leftv result, leftv first)
BOOLEAN iiDefaultParameter(leftv p)
void rComposeC(lists L, ring R)
BOOLEAN iiCheckRing(int i)
#define BREAK_LINE_LENGTH
static void rDecomposeRing_41(leftv h, const coeffs C)
spectrumState spectrumStateFromList(spectrumPolyList &speclist, lists *L, int fast)
BOOLEAN syBetti2(leftv res, leftv u, leftv w)
ring rSubring(ring org_ring, sleftv *rv)
BOOLEAN kWeight(leftv res, leftv id)
static leftv rOptimizeOrdAsSleftv(leftv ord)
BOOLEAN rSleftvOrdering2Ordering(sleftv *ord, ring R)
static BOOLEAN rComposeOrder(const lists L, const BOOLEAN check_comp, ring R)
spectrum spectrumFromList(lists l)
static idhdl rSimpleFindHdl(const ring r, const idhdl root, const idhdl n)
static void iiReportTypes(int nr, int t, const short *T)
void rDecomposeRing(leftv h, const ring R)
BOOLEAN jjRESULTANT(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN iiInternalExport(leftv v, int toLev)
static void rDecompose_23456(const ring r, lists L)
void copy_deep(spectrum &spec, lists l)
void killlocals_rec(idhdl *root, int v, ring r)
semicState list_is_spectrum(lists l)
static void killlocals0(int v, idhdl *localhdl, const ring r)
BOOLEAN semicProc(leftv res, leftv u, leftv v)
ring rCompose(const lists L, const BOOLEAN check_comp, const long bitmask, const int isLetterplace)
BOOLEAN iiApplyBIGINTMAT(leftv, leftv, int, leftv)
BOOLEAN jjBETTI2(leftv res, leftv u, leftv v)
const char * lastreserved
static BOOLEAN rSleftvList2StringArray(leftv sl, char **p)
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
BOOLEAN iiWRITE(leftv, leftv v)
void paPrint(const char *n, package p)
static resolvente iiCopyRes(resolvente r, int l)
BOOLEAN kQHWeight(leftv res, leftv v)
void rComposeRing(lists L, ring R)
BOOLEAN iiExport(leftv v, int toLev)
BOOLEAN jjBETTI(leftv res, leftv u)
void spectrumPrintError(spectrumState state)
lists getList(spectrum &spec)
BOOLEAN jjVARIABLES_ID(leftv res, leftv u)
static BOOLEAN rComposeVar(const lists L, ring R)
const struct sValCmd1 dArith1[]
ideal kStd2(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
generic interface to GB/SB computations, large hilbert vectors
VAR denominator_list DENOMINATOR_LIST
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,...
char * lString(lists l, BOOLEAN typed, int dim)
BOOLEAN lRingDependend(lists L)
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights)
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
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)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
static matrix mu(matrix A, const ring R)
matrix mpNew(int r, int c)
create a r x c zero-matrix
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
#define MATELEM(mat, i, j)
1-based access to matrix
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
ideal loNewtonPolytope(const ideal id)
EXTERN_VAR size_t gmp_output_digits
uResultant::resMatType determineMType(int imtype)
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
gmp_float sqrt(const gmp_float &a)
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...
BOOLEAN nuLagSolve(leftv res, leftv arg1, leftv arg2, leftv arg3)
find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial us...
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: consi...
BOOLEAN nuMPResMat(leftv res, leftv arg1, leftv arg2)
returns module representing the multipolynomial resultant matrix Arguments 2: ideal i,...
BOOLEAN loSimplex(leftv res, leftv args)
Implementation of the Simplex Algorithm.
BOOLEAN loNewtonP(leftv res, leftv arg1)
compute Newton Polytopes of input polynomials
BOOLEAN nuUResSolve(leftv res, leftv args)
solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing-...
The main handler for Singular numbers which are suitable for Singular polynomials.
#define nPrint(a)
only for debug, over any initialized currRing
#define SHORT_REAL_LENGTH
#define omFreeSize(addr, size)
#define omCheckAddr(addr)
#define omReallocSize(addr, o_size, size)
#define omCheckAddrSize(addr, size)
#define omFreeBin(addr, bin)
#define omFreeBinAddr(addr)
#define omRealloc0Size(addr, o_size, size)
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)
static int pLength(poly a)
#define __pp_Mult_nn(p, n, r)
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 void p_Setm(poly p, const ring r)
static void p_Delete(poly *p, const ring r)
static poly p_Init(const ring r, omBin bin)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
#define __p_Mult_nn(p, n, r)
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
static long pTotaldegree(poly p)
#define pIsConstant(p)
like above, except that Comp must be 0
#define pCmp(p1, p2)
pCmp: args may be NULL returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))
#define pGetVariables(p, e)
#define pGetExp(p, i)
Exponent.
#define pCopy(p)
return a copy of the poly
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
void PrintS(const char *s)
void Werror(const char *fmt,...)
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...
const char * rSimpleOrdStr(int ord)
int rTypeOfMatrixOrder(const intvec *order)
ring rAssure_HasComp(const ring r)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
BOOLEAN rCheckIV(const intvec *iv)
rRingOrder_t rOrderName(char *ordername)
void rDelete(ring r)
unconditionally deletes fields in r
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
void rSetSyzComp(int k, const ring r)
static BOOLEAN rField_is_R(const ring r)
static BOOLEAN rField_is_Zp_a(const ring r)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rField_is_Zp(const ring r)
static BOOLEAN rHasLocalOrMixedOrdering(const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rField_is_long_C(const ring r)
static int rBlocks(const ring r)
static ring rIncRefCnt(ring r)
static BOOLEAN rField_is_Zn(const ring r)
static int rPar(const ring r)
(r->cf->P)
static int rInternalChar(const ring r)
static BOOLEAN rIsLPRing(const ring r)
@ ringorder_a64
for int64 weights
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
@ ringorder_IS
Induced (Schreyer) ordering.
static BOOLEAN rField_is_Q_a(const ring r)
static BOOLEAN rField_is_Q(const ring r)
static void rDecRefCnt(ring r)
static char const ** rParameter(const ring r)
(r->cf->parameter)
static BOOLEAN rField_is_long_R(const ring r)
static BOOLEAN rField_is_numeric(const ring r)
static BOOLEAN rField_is_GF(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
#define rField_is_Ring(R)
int status int void size_t count
int status int void * buf
BOOLEAN slWrite(si_link l, leftv v)
ideal idInit(int idsize, int rank)
initialise an ideal / module
intvec * id_QHomWeight(ideal id, const ring r)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
BOOLEAN hasAxis(ideal J, int k, const ring r)
int hasOne(ideal J, const ring r)
BOOLEAN ringIsLocal(const ring r)
static BOOLEAN hasConstTerm(poly h, const ring r)
poly computeWC(const newtonPolygon &np, Rational max_weight, const ring r)
static BOOLEAN hasLinearTerm(poly h, const ring r)
void computeNF(ideal stdJ, poly hc, poly wc, spectrumPolyList *NF, const ring r)
INST_VAR sleftv sLastPrinted
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
void syMinimizeResolvente(resolvente res, int length, int first)
void syKillComputation(syStrategy syzstr, ring r=currRing)
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
void syKillEmptyEntres(resolvente res, int length)
struct for passing initialization parameters to naInitChar
THREAD_VAR double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)