 |
My Project
debian-1:4.1.1-p2+ds-4build3
|
Go to the source code of this file.
|
int | ksReducePoly (LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat) |
|
int | ksReducePolyBound (LObject *PR, TObject *PW, int bound, poly spNoether, number *coef, kStrategy strat) |
|
int | ksReducePolySig (LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat) |
|
int | ksReducePolySigRing (LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat) |
|
void | ksCreateSpoly (LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R) |
|
int | ksReducePolyTail (LObject *PR, TObject *PW, poly Current, poly spNoether) |
|
int | ksReducePolyTailBound (LObject *PR, TObject *PW, int bound, poly Current, poly spNoether) |
|
poly | ksCreateShortSpoly (poly p1, poly p2, ring tailRing) |
|
◆ TEST_OPT_DEBUG_RED
#define TEST_OPT_DEBUG_RED |
◆ ksCreateShortSpoly()
poly ksCreateShortSpoly |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
ring |
tailRing |
|
) |
| |
Definition at line 1005 of file kspoly.cc.
1056 if ((c1==c2)||(c2!=0))
1106 if ((c1==c2)||(c1!=0))
◆ ksCreateSpoly()
void ksCreateSpoly |
( |
LObject * |
Pair, |
|
|
poly |
spNoether, |
|
|
int |
use_buckets, |
|
|
ring |
tailRing, |
|
|
poly |
m1, |
|
|
poly |
m2, |
|
|
TObject ** |
R |
|
) |
| |
Definition at line 759 of file kspoly.cc.
769 Pair->tailRing = tailRing;
809 if (Pair->i_r1 == -1)
815 l1 = (
R[Pair->i_r1])->GetpLength() - 1;
817 if ((Pair->i_r2 == -1)||(
R[Pair->i_r2]==
NULL))
823 l2 = (
R[Pair->i_r2])->GetpLength() - 1;
828 if (spNoether !=
NULL)
831 a2 = tailRing->p_Procs->pp_Mult_mm_Noether(a2, m2, spNoether, l2, tailRing);
835 a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing);
840 Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing);
843 Pair->Tail_Minus_mm_Mult_qq(m1, a1, l1, spNoether);
846 Pair->LmDeleteAndIter();
862 #ifdef HAVE_SHIFTBBA_NONEXISTENT
871 Pair->SetShortExpVector();
◆ ksReducePoly()
Definition at line 41 of file kspoly.cc.
49 #ifdef TEST_OPT_DEBUG_RED
60 ring tailRing = PR->tailRing;
64 poly p1 = PR->GetLmTailRing();
65 poly p2 = PW->GetLmTailRing();
66 poly t2 =
pNext(p2), lm = p1;
87 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
90 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
99 PR->LmDeleteAndIter();
100 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
113 if (strat ==
NULL)
return 2;
116 p1 = PR->GetLmTailRing();
117 p2 = PW->GetLmTailRing();
132 if ((ct == 0) || (ct == 2))
133 PR->Tail_Mult_nn(an);
134 if (coef !=
NULL) *coef = an;
139 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
144 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
146 PR->LmDeleteAndIter();
149 #ifdef HAVE_SHIFTBBA_NONEXISTENT
158 PR->SetShortExpVector();
162 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolyBound()
Definition at line 172 of file kspoly.cc.
181 #ifdef TEST_OPT_DEBUG_RED
192 ring tailRing = PR->tailRing;
196 poly p1 = PR->GetLmTailRing();
197 poly p2 = PW->GetLmTailRing();
198 poly t2 =
pNext(p2), lm = p1;
219 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
222 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
231 PR->LmDeleteAndIter();
232 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
245 if (strat ==
NULL)
return 2;
248 p1 = PR->GetLmTailRing();
249 p2 = PW->GetLmTailRing();
264 if ((ct == 0) || (ct == 2))
265 PR->Tail_Mult_nn(an);
266 if (coef !=
NULL) *coef = an;
271 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
276 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
278 PR->LmDeleteAndIter();
281 #ifdef HAVE_SHIFTBBA_NONEXISTENT
290 PR->SetShortExpVector();
294 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySig()
Definition at line 311 of file kspoly.cc.
320 #ifdef TEST_OPT_DEBUG_RED
329 ring tailRing = PR->tailRing;
363 poly sigMult =
pCopy(PW->sig);
366 printf(
"IN KSREDUCEPOLYSIG: \n");
370 printf(
"--------------\n");
375 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
380 printf(
"--------------\n");
387 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
396 PR->is_redundant =
TRUE;
401 PR->is_redundant =
FALSE;
402 poly p1 = PR->GetLmTailRing();
403 poly p2 = PW->GetLmTailRing();
404 poly t2 =
pNext(p2), lm = p1;
425 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
428 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
437 PR->LmDeleteAndIter();
438 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
451 if (strat ==
NULL)
return 2;
454 p1 = PR->GetLmTailRing();
455 p2 = PW->GetLmTailRing();
470 if ((ct == 0) || (ct == 2))
471 PR->Tail_Mult_nn(an);
472 if (coef !=
NULL) *coef = an;
477 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
482 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
484 PR->LmDeleteAndIter();
487 #ifdef HAVE_SHIFTBBA_NONEXISTENT
496 PR->SetShortExpVector();
500 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySigRing()
Definition at line 509 of file kspoly.cc.
518 #ifdef TEST_OPT_DEBUG_RED
527 ring tailRing = PR->tailRing;
561 poly sigMult =
pCopy(PW->sig);
564 printf(
"IN KSREDUCEPOLYSIG: \n");
568 printf(
"--------------\n");
582 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
587 printf(
"--------------\n");
596 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
602 poly origsig =
pCopy(PR->sig);
613 if(
pLtCmp(PR->sig,origsig) == 1)
617 PR->is_redundant =
TRUE;
623 if(
pLtCmp(PR->sig,origsig) == -1)
635 PR->is_redundant =
TRUE;
640 PR->is_redundant =
FALSE;
641 poly p1 = PR->GetLmTailRing();
642 poly p2 = PW->GetLmTailRing();
643 poly t2 =
pNext(p2), lm = p1;
664 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
667 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
676 PR->LmDeleteAndIter();
677 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
690 if (strat ==
NULL)
return 2;
693 p1 = PR->GetLmTailRing();
694 p2 = PW->GetLmTailRing();
705 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
715 if (((ct == 0) || (ct == 2)))
716 PR->Tail_Mult_nn(an);
717 if (coef !=
NULL) *coef = an;
722 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
727 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
729 PR->LmDeleteAndIter();
732 #ifdef HAVE_SHIFTBBA_NONEXISTENT
741 PR->SetShortExpVector();
744 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolyTail()
int ksReducePolyTail |
( |
LObject * |
PR, |
|
|
TObject * |
PW, |
|
|
poly |
Current, |
|
|
poly |
spNoether |
|
) |
| |
Definition at line 877 of file kspoly.cc.
881 poly Lp = PR->GetLmCurrRing();
882 poly Save = PW->GetLmCurrRing();
902 if (Current == PR->p && PR->t_p !=
NULL)
908 pNext(Current) = Red.GetLmTailRing();
909 if (Current == PR->p && PR->t_p !=
NULL)
917 #ifdef HAVE_SHIFTBBA_NONEXISTENT
926 PR->SetShortExpVector();
◆ ksReducePolyTailBound()
int ksReducePolyTailBound |
( |
LObject * |
PR, |
|
|
TObject * |
PW, |
|
|
int |
bound, |
|
|
poly |
Current, |
|
|
poly |
spNoether |
|
) |
| |
Definition at line 933 of file kspoly.cc.
937 poly Lp = PR->GetLmCurrRing();
938 poly Save = PW->GetLmCurrRing();
958 if (Current == PR->p && PR->t_p !=
NULL)
964 pNext(Current) = Red.GetLmTailRing();
965 if (Current == PR->p && PR->t_p !=
NULL)
973 #ifdef HAVE_SHIFTBBA_NONEXISTENT
982 PR->SetShortExpVector();
◆ create_count
◆ red_count
int ksCheckCoeff(number *a, number *b)
void nc_PolyPolyRed(poly &b, poly p, number *c, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static BOOLEAN rField_is_Domain(const ring r)
static void p_SetCompP(poly p, int i, ring r)
#define __p_GetComp(p, r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static void p_ExpVectorSub(poly p1, poly p2, const ring 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 BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
static BOOLEAN rField_is_Ring(const ring r)
static void p_LmDelete(poly p, const ring r)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
int ksReducePolyBound(LObject *PR, TObject *PW, int bound, poly spNoether, number *coef, kStrategy strat)
static void p_ExpVectorAddSub(poly p1, poly p2, poly p3, const ring r)
static BOOLEAN p_LmExpVectorAddIsOk(const poly p1, const poly p2, const ring r)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
static poly p_Init(const ring r, omBin bin)
static int p_LmCmp(poly p, poly q, const ring r)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
static void p_LmFree(poly p, ring)
static CanonicalForm bound(const CFMatrix &M)
poly p_Shrink(poly p, int lV, const ring r)
BOOLEAN p_CheckPolyRing(poly p, ring r)
static number p_SetCoeff(poly p, number n, ring r)
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static void p_Setm(poly p, const ring r)
#define pCopy(p)
return a copy of the poly
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
BOOLEAN pHaveCommonMonoms(poly p, poly q)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
static void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c)
BOOLEAN pIsMonomOf(poly p, poly m)