 |
My Project
debian-1:4.1.1-p2+ds-4build2
|
Go to the source code of this file.
|
static intvec * | syPrepareModComp (ideal arg, intvec **w) |
|
static void | syDeleteAbove (ideal up, int k) |
|
static void | syMinStep (ideal mod, ideal &syz, BOOLEAN final=FALSE, ideal up=NULL, tHomog h=isNotHomog) |
|
void | syGaussForOne (ideal syz, int elnum, int ModComp, int from, int till) |
|
static void | syDeleteAbove1 (ideal up, int k) |
|
static void | syMinStep1 (resolvente res, int length) |
|
void | syMinimizeResolvente (resolvente res, int length, int first) |
|
resolvente | syResolvente (ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim) |
|
syStrategy | syResolution (ideal arg, int maxlength, intvec *w, BOOLEAN minim) |
|
static poly | sypCopyConstant (poly inp) |
|
int | syDetect (ideal id, int index, BOOLEAN homog, int *degrees, int *tocancel) |
|
void | syDetect (ideal id, int index, int rsmin, BOOLEAN homog, intvec *degrees, intvec *tocancel) |
|
intvec * | syBetti (resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift) |
|
ideal | syMinBase (ideal arg) |
|
◆ syBetti()
Definition at line 771 of file syz.cc.
776 int i,
j=0,
k=0,
l,rows,cols,mr;
777 int *temp1,*temp2,*temp3;
813 WarnS(
"betti-command: Input is not homogeneous!");
817 if (weights==
NULL) weights=
w;
820 while ((r0_len>0) && (
res[0]->
m[r0_len-1]==
NULL)) r0_len--;
831 temp1 = (
int*)
omAlloc0((
l+1)*
sizeof(int));
832 temp2 = (
int*)
omAlloc((
l+1)*
sizeof(int));
836 for (
i=0;
i<cols-1;
i++)
839 memset(temp2,0,(
l+1)*
sizeof(
int));
849 WerrorS(
"input not a resolution");
855 if (temp2[
j+1]-
i>rows) rows = temp2[
j+1]-
i;
856 if (temp2[
j+1]-
i<mr) mr = temp2[
j+1]-
i;
869 if (rows <(*weights)[
j]+1) rows=(-mr)+(*weights)[
j]+1;
885 (*result)[(-mr)*cols] = rkl;
886 if ((!
idIs0(
res[0])) && ((*result)[(-mr)*cols]==0))
887 (*
result)[(-mr)*cols] = 1;
889 tocancel = (
int*)
omAlloc0((rows+1)*
sizeof(int));
890 memset(temp1,0,(
l+1)*
sizeof(
int));
893 memset(temp2,0,
l*
sizeof(
int));
897 memset(temp2,0,
l*
sizeof(
int));
903 for(
j=0;
j<=rows+mr;
j++)
909 for (
i=0;
i<cols-1;
i++)
912 memset(temp2,0,
l*
sizeof(
int));
930 for (
j=mr;
j<rows+mr;
j++)
937 memset(tocancel,0,(rows+1)*
sizeof(
int));
949 for (
j=0;
j<=rows;
j++)
961 if ((tomin) && (mr<0))
963 for (
j=1;
j<=rows+mr+1;
j++)
965 for (
k=1;
k<=cols;
k++)
970 for (
j=rows+mr+1;
j<=rows+1;
j++)
972 for (
k=1;
k<=cols;
k++)
990 for (
i=0;
i<exactresult->
rows();
i++)
992 for (
j=0;
j<exactresult->
cols();
j++)
997 if (row_shift!=
NULL) *row_shift = mr;
◆ syDeleteAbove()
static void syDeleteAbove |
( |
ideal |
up, |
|
|
int |
k |
|
) |
| |
|
static |
◆ syDeleteAbove1()
static void syDeleteAbove1 |
( |
ideal |
up, |
|
|
int |
k |
|
) |
| |
|
static |
◆ syDetect() [1/2]
int syDetect |
( |
ideal |
id, |
|
|
int |
index, |
|
|
BOOLEAN |
homog, |
|
|
int * |
degrees, |
|
|
int * |
tocancel |
|
) |
| |
Definition at line 702 of file syz.cc.
704 int i,
j,
k, subFromRank=0;
707 if (
idIs0(
id))
return 0;
714 while ((
i>0) && (temp->m[
i-1]==
NULL))
i--;
721 while ((
j<
i) && (temp->m[
j]==
NULL))
j++;
729 if ((
k>=0) && (
index==0)) subFromRank++;
737 while ((
j<
i) && (temp->m[
j]==
NULL))
j++;
◆ syDetect() [2/2]
void syDetect |
( |
ideal |
id, |
|
|
int |
index, |
|
|
int |
rsmin, |
|
|
BOOLEAN |
homog, |
|
|
intvec * |
degrees, |
|
|
intvec * |
tocancel |
|
) |
| |
Definition at line 743 of file syz.cc.
758 (*tocancel)[
i-1] = tocan[
i-1];
◆ syGaussForOne()
void syGaussForOne |
( |
ideal |
syz, |
|
|
int |
elnum, |
|
|
int |
ModComp, |
|
|
int |
from, |
|
|
int |
till |
|
) |
| |
Definition at line 219 of file syz.cc.
223 poly actWith=syz->m[elnum];
225 if (from<0) from = 0;
227 syz->m[elnum] =
NULL;
233 poly tmp=syz->m[from];
238 syz->m[from] =
pSub(tmp,
◆ syMinBase()
ideal syMinBase |
( |
ideal |
arg | ) |
|
Definition at line 1005 of file syz.cc.
1020 if ((leng>=1) && (*(weights+1)!=
NULL))
1022 delete *(weights+1);
◆ syMinimizeResolvente()
void syMinimizeResolvente |
( |
resolvente |
res, |
|
|
int |
length, |
|
|
int |
first |
|
) |
| |
Definition at line 356 of file syz.cc.
361 if (syzIndex<1) syzIndex=1;
◆ syMinStep()
Definition at line 83 of file syz.cc.
86 poly Unit1,Unit2,actWith;
87 int len,
i,
j,ModComp,
m,
k,
l;
101 while ((
j>0) && (!syz->m[
j-1]))
j--;
110 for (
l=
k;
l<
j-1;
l++) syz->m[
l] = syz->m[
l+1];
126 while ((
j>0) && (syz->m[
j-1]==
NULL))
j--;
128 if (bHasGlobalOrdering)
130 while ((
i<
j) && (!existsUnit))
146 if ((len==0) ||((
l>0) && (
l<len)))
155 if (len>0) existsUnit =
TRUE;
167 for (
k=
i;
k<
j-1;
k++) syz->m[
k] = syz->m[
k+1];
185 syz->m[
k] =
pSub(syz->m[
k],
190 syz->m[
l] = syz->m[
l+1];
202 pDelete(&(
mod->m[ModComp-1 - curr_syz_limit]));
◆ syMinStep1()
static void syMinStep1 |
( |
resolvente |
res, |
|
|
int |
length |
|
) |
| |
|
static |
Definition at line 290 of file syz.cc.
307 if (reddeg0->m[
i]!=
NULL)
312 (*have_del)[
j-1] = 1;
320 j = to_del->length();
323 if ((*to_del)[
j-1]==1)
346 if (to_del!=
NULL)
delete to_del;
353 if (to_del!=
NULL)
delete to_del;
◆ sypCopyConstant()
static poly sypCopyConstant |
( |
poly |
inp | ) |
|
|
static |
◆ syPrepareModComp()
Definition at line 26 of file syz.cc.
33 int maxxx = (*w)->
length();
62 (**w)[
i+1] = (*w1)[
i+maxxx];
◆ syResolution()
Definition at line 614 of file syz.cc.
618 const ideal idSaveCurrRingQuotient =
currRing->qideal;
671 currRing->qideal = idSaveCurrRingQuotient;
◆ syResolvente()
Definition at line 390 of file syz.cc.
405 if (maxlength!=-1) *
length = maxlength+1;
407 if ((wlength!=0) && (*
length!=wlength))
410 wtmp[0]=(*weights)[0];
421 if (syz_ring != origR)
432 if ((weights!=
NULL) && (*weights!=
NULL)&& ((*weights)[0]!=
NULL))
436 WarnS(
"wrong weights given(1):"); (*weights)[0]->show();
PrintLn();
443 if ((weights==
NULL) || (*weights==
NULL) || ((*weights)[0]==
NULL))
454 if ((weights!=
NULL) && (*weights!=
NULL)&& ((*weights)[0]!=
NULL))
467 #endif // HAVE_PLURAL
479 setRegularity =
FALSE;
484 setRegularity =
FALSE;
489 ((maxlength==-1) || (syzIndex<=maxlength)))
501 if (*weights!=
NULL) tempW[
j] = (*weights)[
j];
517 if (minim || (syzIndex!=0))
522 res[syzIndex] = temp;
536 completeMinim=(syzIndex!=maxlength) || (maxlength ==-1) || (hom!=
isHomog);
542 if ((minim)||(syzIndex>1))
563 (*weights)[syzIndex] =
new intvec(
k);
593 for (
i=1;
i<=syzIndex;
i++)
601 if (origR != syz_ring)
604 for (
i=0;
i<=syzIndex;
i++)
BOOLEAN rHasGlobalOrdering(const ring r)
void pTakeOutComp(poly *p, long comp, poly *q, int *lq, const ring R=currRing)
Splits *p into two polys: *q which consists of all monoms with component == comp and *p of all other ...
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
#define pGetComp(p)
Component.
#define TEST_OPT_NOTREGULARITY
#define idDelete(H)
delete an ideal
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
int syDetect(ideal id, int index, BOOLEAN homog, int *degrees, int *tocancel)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
#define pDeleteComp(p, k)
static BOOLEAN length(leftv result, leftv arg)
ideal kInterRedOld(ideal F, ideal Q)
static void syDeleteAbove1(ideal up, int k)
void id_Shift(ideal M, int s, const ring r)
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static intvec * syPrepareModComp(ideal arg, intvec **w)
#define pLmIsConstantComp(p)
like above, except that p must be != NULL
static long pTotaldegree(poly p)
static void syMinStep(ideal mod, ideal &syz, BOOLEAN final=FALSE, ideal up=NULL, tHomog h=isNotHomog)
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static int rGetCurrSyzLimit(const ring r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
intvec * ivCopy(const intvec *o)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void show(int mat=0, int spaces=0) const
void PrintS(const char *s)
#define omFreeSize(addr, size)
#define TEST_OPT_NO_SYZ_MINIM
static poly sypCopyConstant(poly inp)
static short scaFirstAltVar(ring r)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Ring(const ring r)
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
ideal id_Jet(const ideal i, int d, const ring R)
bool ncExtensions(int iMask)
poly p_Cleardenom(poly p, const ring r)
static void syMinStep1(resolvente res, int length)
void syGaussForOne(ideal syz, int elnum, int ModComp, int from, int till)
void rDelete(ring r)
unconditionally deletes fields in r
#define IMATELEM(M, I, J)
static int si_max(const int a, const int b)
void rSetSyzComp(int k, const ring r)
static short scaLastAltVar(ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
void WerrorS(const char *s)
static BOOLEAN rField_has_simple_inverse(const ring r)
#define pVectorHasUnitB(p, k)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
void p_SetModDeg(intvec *w, ring r)
ideal SCAQuotient(const ring r)
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg, GbVariant alg)
#define pCopy(p)
return a copy of the poly
#define SI_RESTORE_OPT1(A)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pVectorHasUnit(p, k, l)
static bool rIsSCA(const ring r)
static long p_FDeg(const poly p, const ring r)
static int index(p_Length length, p_Ord ord)
static void syDeleteAbove(ideal up, int k)
void syKillEmptyEntres(resolvente res, int length)