Loading...
Searching...
No Matches
customstd.cc
Go to the documentation of this file.
#include "Singular/libsingular.h"
#include "libpolys/polys/prCopy.h"
//#include <vector>
//#include <iostream>
// global variable potentially storing output
//ideal idealCache=NULL;
// //------------------------------------------------------------------------
// // example of a routine which changes nothing
// static BOOLEAN display_sp(kStrategy strat)
// {
// // will be call each time a new s-poly is computed (strat->P)
// // the algorithm assures that strat->P.p!=NULL, in currRing
// // if strat->P.t_p==NULL: strat->P.p->next is in currRing
// // otherwise: strat->P.t_p->next==strat->P.p->next, in strat->tailRing
// // must return TRUE, if strat->P is changed, FALSE otherwise
// PrintS("a new s-poly found: ");
// p_Write(strat->P.p,currRing,strat->tailRing);
// return FALSE;
// }
// static BOOLEAN std_with_display(leftv res, leftv args)
// {
// if (args!=NULL)
// {
// if (args->Typ()==IDEAL_CMD)
// {
// ideal I=(ideal)args->Data();
// I=kStd2(I,currRing->qideal,testHomog,NULL,NULL,0,0,NULL,display_sp);
// idSkipZeroes(I);
// res->data=(char*)I;
// res->rtyp=IDEAL_CMD;
// return FALSE;
// }
// }
// WerrorS("expected: std_with_display(`idea;`)");
// return TRUE;
// }
static BOOLEAN satstd(leftv res, leftv args)
{
leftv u = args;
if ((u!=NULL)
&& ((u->Typ()==IDEAL_CMD)||(u->Typ()==MODUL_CMD)))
{
ideal I=(ideal)u->Data();
leftv v = u->next;
res->rtyp=IDEAL_CMD;
ideal J;
if (v==NULL)
{
J=id_MaxIdeal(1,currRing);
}
else
{
if (v->Typ()==IDEAL_CMD)
{
J = (ideal) v->Data();
}
else
{
args->CleanUp();
WerrorS("satstd: unexpected parameters");
return TRUE;
}
}
I=id_Satstd(I,J,currRing);
#if 0 /* unused */
if (idealCache)
{
id_Delete(&I,currRing);
res->data = (char*) idealCache;
idealCache = NULL;
}
else
#endif
{
idSkipZeroes(I);
res->data=(char*)I;
}
if (v==NULL) id_Delete(&J,currRing);
args->CleanUp();
setFlag(res,FLAG_STD);
return (res->data==NULL);
}
WerrorS("satstd: unexpected parameters");
return TRUE;
}
static BOOLEAN abort_if_monomial_sp(kStrategy strat)
{
BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
// let it remain FALSE otherwise
if (strat->P.t_p==NULL)
{
poly p=strat->P.p;
if (pNext(p)==NULL)
{
while ((strat->Ll >= 0))
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
return FALSE;
}
}
else
{
poly p=strat->P.t_p;
if (pNext(p)==NULL)
{
while ((strat->Ll >= 0))
deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
return FALSE;
}
}
return b; // return TRUE if sp was changed, FALSE if not
}
STATIC_VAR char* si_filename;
static BOOLEAN print_spoly(kStrategy strat)
{
char *s;
if (strat->P.t_p==NULL)
{
s=pString(strat->P.p);
}
else
{
poly p=strat->P.t_p;
s=p_String(p,strat->tailRing);
}
FILE *f=fopen(si_filename,"a");
fwrite(s,strlen(s),1,f);
fwrite("\n",1,1,f);
fflush(f);
fclose(f);
return FALSE; // return TRUE if sp was changed, FALSE if not
}
#if 0 //unused
STATIC_VAR int si_filenr;
static BOOLEAN print_syz(kStrategy strat)
{
char *s=NULL;
if (strat->P.t_p==NULL)
{
if (pGetComp(strat->P.p)>=strat->syzComp)
s=pString(strat->P.p);
}
else
{
if (p_GetComp(strat->P.t_p,strat->tailRing)>=strat->syzComp)
s=p_String(strat->P.t_p,strat->tailRing);
}
if (s!=NULL)
{
size_t len=strlen(si_filename)+12;
char *fn=(char*)malloc(len);
snprintf(fn,len, "%s.%d",si_filename,si_filenr);
si_filenr++;
FILE *f=fopen(fn,"w");
fwrite(s,strlen(s),1,f);
fwrite("\n",1,1,f);
fclose(f);
free(fn);
}
return FALSE; // return TRUE if sp was changed, FALSE if not
}
#endif
static BOOLEAN std_print_spoly(leftv res, leftv args)
{
if (args!=NULL)
{
if ((args->Typ()==IDEAL_CMD) && (args->next!=NULL)
&& (args->next->Typ()==STRING_CMD))
{
si_filename=(char*)args->next->Data();
ideal I=(ideal)args->Data();
I=kStd2(I,currRing->qideal,testHomog,NULL,(bigintmat*)NULL,0,0,NULL,print_spoly);
idSkipZeroes(I);
res->rtyp=IDEAL_CMD;
res->data=(char*)I;
return FALSE;
}
}
WerrorS("std_print_spoly: unexpected parameters");
return TRUE;
}
#if 0 // unused
static ideal idGroebner_print(ideal temp,int syzComp, intvec* w=NULL, tHomog hom=testHomog)
{
ideal temp1;
if (w==NULL)
{
if (hom==testHomog)
hom=(tHomog)idHomModule(temp,currRing->qideal,&w); //sets w to weight vector or NULL
}
else
{
w=ivCopy(w);
hom=isHomog;
}
temp1 = kStd2(temp,currRing->qideal,hom,&w,NULL,syzComp,0,NULL,print_syz);
idDelete(&temp);
if (w!=NULL) delete w;
return temp1;
}
#endif
#if 0 // unused
static ideal idPrepare_print (ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w)
{
ideal h2,h22;
int j,k;
poly p,q;
assume(!idIs0(h1));
k = id_RankFreeModule(h1,currRing);
if (h11!=NULL)
{
k = si_max(k,(int)id_RankFreeModule(h11,currRing));
h22=idCopy(h11);
}
h2=idCopy(h1);
int i = IDELEMS(h2);
if (h11!=NULL) i+=IDELEMS(h22);
if (k == 0)
{
id_Shift(h2,1,currRing);
if (h11!=NULL) id_Shift(h22,1,currRing);
k = 1;
}
if (syzcomp<k)
{
Warn("syzcomp too low, should be %d instead of %d",k,syzcomp);
syzcomp = k;
rSetSyzComp(k,currRing);
}
h2->rank = syzcomp+i;
for (j=0; j<IDELEMS(h2); j++)
{
p = h2->m[j];
q = pOne();
pSetComp(q,syzcomp+1+j);
pSetmComp(q);
if (p!=NULL)
{
{
while (pNext(p)) pIter(p);
p->next = q;
}
}
else
h2->m[j]=q;
}
if (h11!=NULL)
{
ideal h=id_SimpleAdd(h2,h22,currRing);
id_Delete(&h2,currRing);
id_Delete(&h22,currRing);
h2=h;
}
idTest(h2);
#if 0
matrix TT=id_Module2Matrix(idCopy(h2),currRing);
PrintS(" --------------before std------------------------\n");
ipPrint_MA0(TT,"T");
PrintLn();
idDelete((ideal*)&TT);
#endif
ideal h3;
if (w!=NULL) h3=idGroebner_print(h2,syzcomp,*w,hom);
else h3=idGroebner_print(h2,syzcomp,NULL,hom);
return h3;
}
#endif
#if 0
static ideal idSyzygies_print (ideal h1, tHomog h,intvec **w)
{
ideal s_h1;
int j, k;
BOOLEAN isMonomial=TRUE;
int ii, idElemens_h1;
assume(h1 != NULL);
idElemens_h1=IDELEMS(h1);
#ifdef PDEBUG
for(ii=0;ii<idElemens_h1 /*IDELEMS(h1)*/;ii++) pTest(h1->m[ii]);
#endif
if (idIs0(h1))
{
ideal result=idFreeModule(idElemens_h1/*IDELEMS(h1)*/);
return result;
}
int slength=(int)id_RankFreeModule(h1,currRing);
k=si_max(1,slength /*id_RankFreeModule(h1)*/);
assume(currRing != NULL);
ring orig_ring=currRing;
ring syz_ring=rAssure_SyzComp(orig_ring,TRUE);
rSetSyzComp(k,syz_ring);
if (orig_ring != syz_ring)
{
rChangeCurrRing(syz_ring);
s_h1=idrCopyR_NoSort(h1,orig_ring,syz_ring);
}
else
{
s_h1 = h1;
}
idTest(s_h1);
BITSET save_opt;
SI_SAVE_OPT1(save_opt);
si_opt_1|=Sy_bit(OPT_REDTAIL_SYZ);
ideal s_h3=idPrepare_print(s_h1,NULL,h,k,w); // main (syz) GB computation
SI_RESTORE_OPT1(save_opt);
if (orig_ring != syz_ring)
{
idDelete(&s_h1);
for (j=0; j<IDELEMS(s_h3); j++)
{
if (s_h3->m[j] != NULL)
{
if (p_MinComp(s_h3->m[j],syz_ring) > k)
p_Shift(&s_h3->m[j], -k,syz_ring);
else
p_Delete(&s_h3->m[j],syz_ring);
}
}
idSkipZeroes(s_h3);
s_h3->rank -= k;
rChangeCurrRing(orig_ring);
s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring);
rDelete(syz_ring);
#ifdef HAVE_PLURAL
if (rIsPluralRing(orig_ring))
{
id_DelMultiples(s_h3,orig_ring);
idSkipZeroes(s_h3);
}
#endif
idTest(s_h3);
return s_h3;
}
ideal e = idInit(IDELEMS(s_h3), s_h3->rank);
for (j=IDELEMS(s_h3)-1; j>=0; j--)
{
if (s_h3->m[j] != NULL)
{
if (p_MinComp(s_h3->m[j],syz_ring) <= k)
{
e->m[j] = s_h3->m[j];
isMonomial=isMonomial && (pNext(s_h3->m[j])==NULL);
p_Delete(&pNext(s_h3->m[j]),syz_ring);
s_h3->m[j] = NULL;
}
}
}
idSkipZeroes(s_h3);
idDelete(&e);
assume(orig_ring==currRing);
idTest(s_h3);
if (currRing->qideal != NULL)
{
ideal ts_h3=kStd2(s_h3,currRing->qideal,h,w);
idDelete(&s_h3);
s_h3 = ts_h3;
}
return s_h3;
}
#endif
#if 0
static BOOLEAN syz_print_spoly(leftv res, leftv args)
{
if (args!=NULL)
{
if (((args->Typ()==IDEAL_CMD)||(args->Typ()==MODUL_CMD)) && (args->next!=NULL)
&& (args->next->Typ()==STRING_CMD))
{
si_filename=(char*)args->next->Data();
si_filenr=0;
ideal v_id=(ideal)args->Data();
intvec *ww=(intvec *)atGet(args,"isHomog",INTVEC_CMD);
intvec *w=NULL;
tHomog hom=testHomog;
if (ww!=NULL)
{
if (idTestHomModule(v_id,currRing->qideal,ww))
{
w=ivCopy(ww);
int add_row_shift=w->min_in();
(*w)-=add_row_shift;
hom=isHomog;
}
else
{
//WarnS("wrong weights");
delete ww; ww=NULL;
hom=testHomog;
}
}
else
{
if (args->Typ()==IDEAL_CMD)
if (idHomIdeal(v_id,currRing->qideal))
hom=isHomog;
}
ideal S=idSyzygies_print(v_id,hom,&w);
res->data = (char *)S;
res->rtyp=args->Typ();
if (hom==isHomog)
{
int vl=S->rank;
intvec *vv=new intvec(vl);
if ((args->Typ()==IDEAL_CMD)||(ww==NULL))
{
for(int i=0;i<vl;i++)
{
if (v_id->m[i]!=NULL)
(*vv)[i]=p_Deg(v_id->m[i],currRing);
}
}
else
{
p_SetModDeg(ww, currRing);
for(int i=0;i<vl;i++)
{
if (v_id->m[i]!=NULL)
(*vv)[i]=currRing->pFDeg(v_id->m[i],currRing);
}
p_SetModDeg(NULL, currRing);
}
if (idTestHomModule(S,currRing->qideal,vv))
atSet(res,omStrDup("isHomog"),vv,INTVEC_CMD);
else
delete vv;
}
if (w!=NULL) delete w;
return FALSE;
}
}
WerrorS("syz_print_spoly: unexpected parameters");
return TRUE;
}
#endif
static BOOLEAN monomialabortstd(leftv res, leftv args)
{
if (args!=NULL)
{
if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
{
ideal I=(ideal)args->Data();
I=kStd2(I,currRing->qideal,testHomog,NULL,(bigintmat*)NULL,0,0,NULL,abort_if_monomial_sp);
idSkipZeroes(I);
res->rtyp=IDEAL_CMD;
res->data=(char*)I;
return FALSE;
}
}
WerrorS("monomialabortstd: unexpected parameters");
return TRUE;
}
// static long wDeg(const poly p, const ring r)
// {
// if (r->order[0] == ringorder_lp)
// return p_GetExp(p,1,currRing);
// if (r->order[0] == ringorder_ls)
// return -p_GetExp(p,1,currRing);
// if (r->order[0] == ringorder_dp)
// {
// long d = 0;
// for (int i=1; i<=rVar(r); i++)
// d = d + p_GetExp(p,i,r);
// return d;
// }
// if (r->order[0] == ringorder_wp || r->order[0] == ringorder_a)
// {
// long d = 0;
// for (int i=r->block0[0]; i<=r->block1[0]; i++)
// d = d + p_GetExp(p,i,r)*r->wvhdl[0][i-1];
// return d;
// }
// if (r->order[0] == ringorder_ws)
// {
// long d = 0;
// for (int i=r->block0[0]; i<=r->block1[0]; i++)
// d = d - p_GetExp(p,i,r)*r->wvhdl[0][i-1];
// return d;
// }
// }
// static bool isInitialFormMonomial(const poly g, const ring r)
// {
// if (g->next==NULL)
// return true;
// return wDeg(g,r)!=wDeg(g->next,r);
// }
// //------------------------------------------------------------------------
// // routine that checks whether the initial form is a monomial,
// // breaks computation if it finds one, writing the element into idealCache
// static BOOLEAN sat_sp_initial(kStrategy strat)
// {
// BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
// // let it remain FALSE otherwise
// if (strat->P.t_p==NULL)
// {
// poly p=strat->P.p;
// if (pNext(p)==NULL)
// {
// // if a term is contained in the ideal, abort std computation
// // and store the output in idealCache to be returned
// while ((strat->Ll >= 0))
// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
// idealCache = idInit(1);
// idealCache->m[0] = p_One(currRing);
// return FALSE;
// }
// if (isInitialFormMonomial(p,currRing))
// {
// while ((strat->Ll >= 0))
// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
// idealCache = idInit(1);
// idealCache->m[0] = p_Copy(p,currRing);
// }
// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
// p_GetExpV(p,mm,currRing);
// int m_null=0;
// while(p!=NULL)
// {
// m_null=0;
// p_GetExpV(p,m0,currRing);
// for(int i=1;i<=rVar(currRing);i++)
// {
// mm[i]=si_min(mm[i],m0[i]);
// if (mm[i]>0) m_null++;
// }
// if (m_null==0) break;
// pIter(p);
// }
// if (m_null>0)
// {
// std::cout << "simplifying!" << std::endl;
// p=p_Copy(strat->P.p,currRing);
// strat->P.p=p;
// while(p!=NULL)
// {
// for(int i=1;i<=rVar(currRing);i++)
// p_SubExp(p,i,mm[i],currRing);
// p_Setm(p,currRing);
// pIter(p);
// }
// b = TRUE;
// }
// omFree(mm);
// omFree(m0);
// }
// else
// {
// poly p=strat->P.t_p;
// if (pNext(p)==NULL)
// {
// // if a term is contained in the ideal, abort std computation
// // and store the output in idealCache to be returned
// while ((strat->Ll >= 0))
// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
// idealCache = idInit(1);
// idealCache->m[0] = p_One(currRing);
// return FALSE;
// }
// if (isInitialFormMonomial(p,strat->tailRing))
// {
// while ((strat->Ll >= 0))
// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
// nMapFunc identity = n_SetMap(strat->tailRing,currRing);
// idealCache = idInit(1);
// idealCache->m[0] = p_PermPoly(p,NULL,strat->tailRing,currRing,identity,NULL,0);
// }
// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
// p_GetExpV(p,mm,strat->tailRing);
// int m_null=0;
// while(p!=NULL)
// {
// m_null=0;
// p_GetExpV(p,m0,strat->tailRing);
// for(int i=1;i<=rVar(currRing);i++)
// {
// mm[i]=si_min(mm[i],m0[i]);
// if (mm[i]>0) m_null++;
// }
// if (m_null==0) break;
// pIter(p);
// }
// if (m_null>0)
// {
// std::cout << "simplifying!" << std::endl;
// p=p_Copy(strat->P.t_p,strat->tailRing);
// strat->P.t_p=p;
// strat->P.p=NULL;
// while(p!=NULL)
// {
// for(int i=1;i<=rVar(currRing);i++)
// p_SubExp(p,i,mm[i],strat->tailRing);
// p_Setm(p,strat->tailRing);
// pIter(p);
// }
// strat->P.GetP();
// b = TRUE;
// }
// omFree(mm);
// omFree(m0);
// }
// return b; // return TRUE if sp was changed, FALSE if not
// }
// static BOOLEAN satstdWithInitialCheck(leftv res, leftv args)
// {
// if (args!=NULL)
// {
// if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
// {
// ideal I=(ideal)args->Data();
// idealCache = NULL;
// I=kStd2(I,currRing->qideal,testHomog,NULL,NULL,0,0,NULL,sat_sp_initial);
// res->rtyp=IDEAL_CMD;
// if (idealCache)
// res->data=(char*)idealCache;
// else
// res->data=(char*)I;
// return FALSE;
// }
// }
// WerrorS("satstdWithInitialCheck: unexpected parameters");
// return TRUE;
// }
//------------------------------------------------------------------------
// initialisation of the module
extern "C" int SI_MOD_INIT(customstd)(SModulFunctions* p)
{
// p->iiAddCproc("std_demo","std_with_display",FALSE,std_with_display);
p->iiAddCproc("customstd.lib","satstdInternal",FALSE,satstd);
// p->iiAddCproc("std_demo","satstdWithInitialCheck",FALSE,satstdWithInitialCheck);
p->iiAddCproc("customstd.lib","monomialabortstdInternal",FALSE,monomialabortstd);
// PrintS("init of std_demo - type `listvar(Std_demo);` to its contents\n");
p->iiAddCproc("customstd.lib","std_print_spoly",FALSE,std_print_spoly);
p->iiAddCproc("customstd.lib","syz_print_spoly",FALSE,std_print_spoly);
return (MAX_TOK);
}
atSet
void atSet(idhdl root, char *name, void *data, int typ)
Definition attrib.cc:153
atGet
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
Definition attrib.cc:132
BITSET
#define BITSET
Definition auxiliary.h:85
si_max
static int si_max(const int a, const int b)
Definition auxiliary.h:125
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
p
int p
Definition cfModGcd.cc:4086
b
CanonicalForm b
Definition cfModGcd.cc:4111
f
FILE * f
Definition checklibs.c:9
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
intvec
Definition intvec.h:24
skStrategy::syzComp
int syzComp
Definition kutil.h:353
skStrategy::tailRing
ring tailRing
Definition kutil.h:342
skStrategy::Ll
int Ll
Definition kutil.h:350
skStrategy::P
LObject P
Definition kutil.h:301
skStrategy::L
LSet L
Definition kutil.h:326
sleftv::Typ
int Typ()
Definition subexpr.cc:1048
sleftv::Data
void * Data()
Definition subexpr.cc:1192
sleftv::next
leftv next
Definition subexpr.h:86
sleftv::CleanUp
void CleanUp(ring r=currRing)
Definition subexpr.cc:351
customstd
int SI_MOD_INIT customstd(SModulFunctions *p)
Definition customstd.cc:662
satstd
static BOOLEAN satstd(leftv res, leftv args)
Definition customstd.cc:40
abort_if_monomial_sp
static BOOLEAN abort_if_monomial_sp(kStrategy strat)
Definition customstd.cc:92
si_filename
STATIC_VAR char * si_filename
Definition customstd.cc:119
std_print_spoly
static BOOLEAN std_print_spoly(leftv res, leftv args)
Definition customstd.cc:170
monomialabortstd
static BOOLEAN monomialabortstd(leftv res, leftv args)
Definition customstd.cc:464
print_spoly
static BOOLEAN print_spoly(kStrategy strat)
Definition customstd.cc:120
Warn
#define Warn
Definition emacs.cc:77
result
return result
Definition facAbsBiFact.cc:76
s
const CanonicalForm int s
Definition facAbsFact.cc:51
res
CanonicalForm res
Definition facAbsFact.cc:60
w
const CanonicalForm & w
Definition facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
j
int j
Definition facHensel.cc:110
WerrorS
void WerrorS(const char *s)
Definition feFopen.cc:24
STATIC_VAR
#define STATIC_VAR
Definition globaldefs.h:7
IDEAL_CMD
@ IDEAL_CMD
Definition grammar.cc:285
MODUL_CMD
@ MODUL_CMD
Definition grammar.cc:288
idTestHomModule
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
Definition ideals.cc:2120
ipPrint_MA0
void ipPrint_MA0(matrix m, const char *name)
Definition ipprint.cc:57
id_Satstd
ideal id_Satstd(const ideal I, ideal J, const ring r)
Definition ideals.cc:3363
idDelete
#define idDelete(H)
delete an ideal
Definition ideals.h:29
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition simpleideals.cc:960
idHomModule
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition ideals.h:96
idTest
#define idTest(id)
Definition ideals.h:47
idHomIdeal
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition ideals.h:91
idCopy
ideal idCopy(ideal A)
Definition ideals.h:60
idFreeModule
ideal idFreeModule(int i)
Definition ideals.h:111
ivCopy
intvec * ivCopy(const intvec *o)
Definition intvec.h:146
setFlag
#define setFlag(A, F)
Definition ipid.h:113
FLAG_STD
#define FLAG_STD
Definition ipid.h:106
SModulFunctions
Definition ipid.h:69
h
STATIC_VAR Poly * h
Definition janet.cc:971
kStd2
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
Definition kstd1.cc:2607
deleteInL
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition kutil.cc:1208
libsingular.h
matrix
ip_smatrix * matrix
Definition matpol.h:43
assume
#define assume(x)
Definition mod2.h:389
p_GetComp
#define p_GetComp(p, r)
Definition monomials.h:64
pIter
#define pIter(p)
Definition monomials.h:37
pNext
#define pNext(p)
Definition monomials.h:36
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
free
#define free
Definition omAllocFunc.c:14
malloc
#define malloc
Definition omAllocFunc.c:12
NULL
#define NULL
Definition omList.c:12
si_opt_1
VAR unsigned si_opt_1
Definition options.c:5
OPT_REDTAIL_SYZ
#define OPT_REDTAIL_SYZ
Definition options.h:88
SI_SAVE_OPT1
#define SI_SAVE_OPT1(A)
Definition options.h:21
SI_RESTORE_OPT1
#define SI_RESTORE_OPT1(A)
Definition options.h:24
Sy_bit
#define Sy_bit(x)
Definition options.h:31
p_Shift
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
Definition p_polys.cc:4860
p_SetModDeg
void p_SetModDeg(intvec *w, ring r)
Definition p_polys.cc:3798
p_Deg
long p_Deg(poly a, const ring r)
Definition p_polys.cc:586
p_String
char * p_String(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:322
p_MinComp
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition p_polys.h:315
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition polys.cc:16
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
pTest
#define pTest(p)
Definition polys.h:415
pGetComp
#define pGetComp(p)
Component.
Definition polys.h:38
pSetComp
#define pSetComp(p, v)
Definition polys.h:39
pSetmComp
#define pSetmComp(p)
TODO:
Definition polys.h:274
pString
char * pString(poly p)
Definition polys.h:307
pOne
#define pOne()
Definition polys.h:316
idrMoveR_NoSort
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:261
idrCopyR_NoSort
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:205
prCopy.h
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
PrintLn
void PrintLn()
Definition reporter.cc:314
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition ring.cc:4527
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition simpleideals.cc:35
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition simpleideals.cc:123
id_Module2Matrix
matrix id_Module2Matrix(ideal mod, const ring R)
Definition simpleideals.cc:1594
id_RankFreeModule
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
Definition simpleideals.cc:992
id_MaxIdeal
ideal id_MaxIdeal(const ring r)
initialise the maximal ideal (at 0)
Definition simpleideals.cc:98
id_DelMultiples
void id_DelMultiples(ideal id, const ring r)
ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i
Definition simpleideals.cc:296
id_SimpleAdd
ideal id_SimpleAdd(ideal h1, ideal h2, const ring R)
concat the lists h1 and h2 without zeros
Definition simpleideals.cc:790
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition simpleideals.cc:201
id_Shift
void id_Shift(ideal M, int s, const ring r)
Definition simpleideals.cc:2196
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
leftv
sleftv * leftv
Definition structs.h:53
tHomog
tHomog
Definition structs.h:31
isHomog
@ isHomog
Definition structs.h:33
testHomog
@ testHomog
Definition structs.h:34
kStrategy
skStrategy * kStrategy
Definition structs.h:54
INTVEC_CMD
@ INTVEC_CMD
Definition tok.h:101
STRING_CMD
@ STRING_CMD
Definition tok.h:187
MAX_TOK
@ MAX_TOK
Definition tok.h:220