Loading...
Searching...
No Matches
kstdfac.h File Reference
`#include "kernel/structs.h"`
`#include "polys/simpleideals.h"`

Go to the source code of this file.

## Functions

ideal_list | kStdfac (ideal F, ideal Q, tHomog h, intvec **w, ideal D=NULL)

## Function Documentation

## kStdfac()

ideal_list kStdfac | ( | ideal | F,
|  | ideal | Q,
|  | tHomog | h,
|  | intvec ** | w,
|  | ideal | D = NULL )

Definition at line 800 of file kstdfac.cc.

{
ideal r;
BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
BOOLEAN delete_w=(w==NULL);
kStrategy strat=new skStrategy;
kStrategy orgstrat=strat;
ideal_list L=NULL;
if (rField_has_simple_inverse(currRing))
strat->LazyPass=20;
else
strat->LazyPass=2;
strat->LazyDegree = 1;
strat->ak = id_RankFreeModule(F,currRing);
if (h==testHomog)
{
if (strat->ak==0)
{
h = (tHomog)idHomIdeal(F,Q);
w=NULL;
}
else
h = (tHomog)idHomModule(F,Q,w);
}
if (h==isHomog)
{
if ((w!=NULL) && (*w!=NULL))
{
kModW = *w;
strat->kModW = *w;
strat->pOrigFDeg = currRing->pFDeg;
strat->pOrigLDeg = currRing->pLDeg;
pSetDegProcs(currRing,kModDeg);
toReset = TRUE;
}
currRing->pLexOrder = TRUE;
strat->LazyPass*=2;
}
strat->homog=h;
initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/
initBuchMoraPos(strat);
initBba(strat);
initBuchMora(F, Q,strat);
if (D!=NULL)
{
strat->D=idCopy(D);
}
// Ende der Initalisierung
while (strat!=NULL)
{
if (TEST_OPT_DEBUG)
PrintS("====================================\n");
if (w!=NULL)
r=bbafac(F,Q,*w,strat,L);
else
r=bbafac(F,Q,NULL,strat,L);
#ifdef KDEBUG
int i;
for (i=0; i<IDELEMS(r); i++) pTest(r->m[i]);
#endif
idSkipZeroes(r);
// Testausgabe:
//if (!idIs0(r))
//{
// PrintS("===================================================\n");
// iiWriteMatrix((matrix)r,"S",1,currRing,0);
// PrintS("\n===================================================\n");
//}
//else
//{
// PrintS("=========empty============================\n");
//}
if(!idIs0(r))
{
ideal_list LL=(ideal_list)omAlloc(sizeof(*LL));
LL->d=r;
#ifndef SING_NDEBUG
LL->nr=strat->nr;
#endif
LL->next=L;
L=LL;
}
strat=strat->next;
}
/* check for empty sets */
if (L!=NULL)
{
ideal_list Lj=L->next;
ideal_list Lj_prev=L;
while (Lj!=NULL)
{
ideal_list Li=L;
while(Li!=Lj)
{
ideal r=kNF(Lj->d,NULL,Li->d,0,KSTD_NF_LAZY | KSTD_NF_NONORM);
if (idIs0(r))
{
#ifdef KDEBUG
if (TEST_OPT_DEBUG)
{
Print("empty set L[%p] because:L[%p]\n",(void*)Lj,(void*)Li);
}
#endif
// delete L[j],
Li=L;
if (Lj_prev!=NULL)
{
Lj=Lj_prev;
if (Lj==L) Lj_prev=NULL;
else
{
Lj_prev=L;
while(Lj_prev->next!=Lj) Lj_prev=Lj_prev->next;
}
}
else Lj=NULL;
}
else
{
Li=Li->next;
}
idDelete (&r);
}
if (Lj!=NULL) Lj=Lj->next;
}
}
// Ende: aufraeumen
if (toReset)
{
pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
kModW = NULL;
}
currRing->pLexOrder = b;
delete(strat);
strat=orgstrat;
while (strat!=NULL)
{
orgstrat=strat->next;
delete(strat);
strat=orgstrat;
}
if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
return L;
}
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
b
CanonicalForm b
Definition cfModGcd.cc:4111
skStrategy
Definition kutil.h:276
skStrategy::next
kStrategy next
Definition kutil.h:278
skStrategy::kModW
intvec * kModW
Definition kutil.h:334
skStrategy::D
ideal D
Definition kutil.h:303
skStrategy::ak
int ak
Definition kutil.h:352
skStrategy::nr
int nr
Definition kutil.h:345
skStrategy::pOrigFDeg
pFDegProc pOrigFDeg
Definition kutil.h:295
skStrategy::LazyPass
int LazyPass
Definition kutil.h:352
skStrategy::LazyDegree
int LazyDegree
Definition kutil.h:352
skStrategy::homog
char homog
Definition kutil.h:369
skStrategy::pOrigLDeg
pLDegProc pOrigLDeg
Definition kutil.h:296
Print
#define Print
Definition emacs.cc:80
w
const CanonicalForm & w
Definition facAbsFact.cc:51
D
#define D(A)
Definition gentable.cc:128
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
idHomIdeal
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition ideals.h:91
idCopy
ideal idCopy(ideal A)
Definition ideals.h:60
h
STATIC_VAR Poly * h
Definition janet.cc:971
kModDeg
long kModDeg(poly p, const ring r)
Definition kstd1.cc:2411
initBba
void initBba(kStrategy strat)
Definition kstd1.cc:1690
kModW
VAR intvec * kModW
Definition kstd1.cc:2409
kNF
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition kstd1.cc:3229
KSTD_NF_LAZY
#define KSTD_NF_LAZY
Definition kstd1.h:18
KSTD_NF_NONORM
#define KSTD_NF_NONORM
Definition kstd1.h:22
bbafac
ideal bbafac(ideal, ideal Q, intvec *, kStrategy strat, ideal_list FL)
Definition kstdfac.cc:480
initBuchMora
void initBuchMora(ideal F, ideal Q, kStrategy strat)
Definition kutil.cc:9749
initBuchMoraPos
void initBuchMoraPos(kStrategy strat)
Definition kutil.cc:9580
initBuchMoraCrit
void initBuchMoraCrit(kStrategy strat)
Definition kutil.cc:9435
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
NULL
#define NULL
Definition omList.c:12
TEST_OPT_DEBUG
#define TEST_OPT_DEBUG
Definition options.h:110
pRestoreDegProcs
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
Definition p_polys.cc:3774
pSetDegProcs
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition p_polys.cc:3762
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
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
rField_has_simple_inverse
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition ring.h:554
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
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition simpleideals.cc:201
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
Q
#define Q
Definition sirandom.c:26
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