My Project
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
slimgb_alg Class Reference

#include <tgb_internal.h>

Public Member Functions

 slimgb_alg (ideal I, int syz_comp, BOOLEAN F4, int deg_pos)
 
void introduceDelayedPairs (poly *pa, int s)
 
virtual ~slimgb_alg ()
 
void cleanDegs (int lower, int upper)
 
unsigned long pTotaldegree (poly p)
 
int pTotaldegree_full (poly p)
 

Data Fields

char ** states
 
ideal add_later
 
ideal S
 
ring r
 
int * lengths
 
wlen_typeweighted_lengths
 
long * short_Exps
 
kStrategy strat
 
int * T_deg
 
int * T_deg_full
 
poly tmp_lm
 
poly * tmp_pair_lm
 
sorted_pair_node ** tmp_spn
 
poly * expandS
 
poly * gcd_of_terms
 
int_pair_nodesoon_free
 
sorted_pair_node ** apairs
 
poly_list_nodeto_destroy
 
mp_array_listF
 
poly_array_listF_minus
 
unsigned int reduction_steps
 
int n
 
int syz_comp
 array_lengths should be greater equal n; More...
 
int array_lengths
 
int normal_forms
 
int current_degree
 
int Rcounter
 
int last_index
 
int max_pairs
 
int pair_top
 
int easy_product_crit
 
int extended_product_crit
 
int average_length
 
int lastDpBlockStart
 
int lastCleanedDeg
 
int deg_pos
 
BOOLEAN use_noro
 
BOOLEAN use_noro_last_block
 
BOOLEAN isDifficultField
 
BOOLEAN completed
 
BOOLEAN is_homog
 
BOOLEAN tailReductions
 
BOOLEAN eliminationProblem
 
BOOLEAN F4_mode
 
BOOLEAN nc
 

Detailed Description

Definition at line 198 of file tgb_internal.h.

Constructor & Destructor Documentation

◆ slimgb_alg()

slimgb_alg::slimgb_alg ( ideal  I,
int  syz_comp,
BOOLEAN  F4,
int  deg_pos 
)

Definition at line 3192 of file tgb.cc.

3193{
3194 this->deg_pos = deg_pos;
3195 lastCleanedDeg = -1;
3196 completed = FALSE;
3197 this->syz_comp = syz_comp;
3198 r = currRing;
3199 nc = rIsPluralRing (r);
3201 //Print("last dp Block start: %i\n", this->lastDpBlockStart);
3202 is_homog = TRUE;
3203 {
3204 int hzz;
3205 for(hzz = 0; hzz < IDELEMS (I); hzz++)
3206 {
3207 assume (I->m[hzz] != NULL);
3208 int d = this->pTotaldegree (I->m[hzz]);
3209 poly t = I->m[hzz]->next;
3210 while(t)
3211 {
3212 if(d != (int)this->pTotaldegree (t))
3213 {
3214 is_homog = FALSE;
3215 break;
3216 }
3217 t = t->next;
3218 }
3219 if(!(is_homog))
3220 break;
3221 }
3222 }
3223 eliminationProblem = ((!(is_homog)) && ((currRing->pLexOrder) || (I->rank > 1)));
3224 tailReductions = ((is_homog) || ((TEST_OPT_REDTAIL) && (!(I->rank > 1))));
3225 // Print("is homog:%d",c->is_homog);
3226 void *h;
3227 int i;
3228 to_destroy = NULL;
3231 if(rField_is_Zp (r))
3233 else
3235 //not fully correct
3236 //(rChar()==0);
3237 F4_mode = F4;
3238
3239 reduction_steps = 0;
3240 last_index = -1;
3241
3242 F = NULL;
3243 F_minus = NULL;
3244
3245 Rcounter = 0;
3246
3247 soon_free = NULL;
3248
3249 tmp_lm = pOne ();
3250
3251 normal_forms = 0;
3252 current_degree = 1;
3253
3254 max_pairs = 5 * IDELEMS (I);
3255
3256 apairs =
3258 pair_top = -1;
3259
3260 int n = IDELEMS (I);
3261 array_lengths = n;
3262
3263
3264 i = 0;
3265 this->n = 0;
3266 T_deg = (int *) omAlloc (n * sizeof (int));
3268 T_deg_full = (int *) omAlloc (n * sizeof (int));
3269 else
3270 T_deg_full = NULL;
3271 tmp_pair_lm = (poly *) omAlloc (n * sizeof (poly));
3272 tmp_spn = (sorted_pair_node **) omAlloc (n * sizeof (sorted_pair_node *));
3273 lm_bin = omGetSpecBin (POLYSIZE + (r->ExpL_Size) * sizeof (long));
3274 /* omUnGetSpecBin(&(c->HeadBin)); */
3275#ifndef HAVE_BOOST
3276#ifdef USE_STDVECBOOL
3277#else
3278 h = omAlloc (n * sizeof (char *));
3279
3280 states = (char **) h;
3281#endif
3282#endif
3283 h = omAlloc (n * sizeof (int));
3284 lengths = (int *) h;
3286 gcd_of_terms = (poly *) omAlloc (n * sizeof (poly));
3287
3288 short_Exps = (long *) omAlloc (n * sizeof (long));
3289 if(F4_mode)
3290 S = idInit (n, I->rank);
3291 else
3292 S = idInit (1, I->rank);
3293 strat = new skStrategy;
3295 strat->honey = TRUE;
3300 strat->tailRing = r;
3302 strat->sl = -1;
3303 i = n;
3304 i = 1; //some strange bug else
3305 /* initS(c->S,NULL,c->strat); */
3306 /* intS start: */
3307 // i=((i+IDELEMS(c->S)+15)/16)*16;
3308 strat->ecartS = (intset) omAlloc (i * sizeof (int)); /*initec(i); */
3309 strat->sevS = (unsigned long *) omAlloc0 (i * sizeof (unsigned long));
3310 /*initsevS(i); */
3311 strat->S_2_R = (int *) omAlloc0 (i * sizeof (int)); /*initS_2_R(i); */
3312 strat->fromQ = NULL;
3313 strat->Shdl = idInit (1, 1);
3314 strat->S = strat->Shdl->m;
3315 strat->lenS = (int *) omAlloc0 (i * sizeof (int));
3317 strat->lenSw = (wlen_type *) omAlloc0 (i * sizeof (wlen_type));
3318 else
3319 strat->lenSw = NULL;
3320 assume (n > 0);
3321 add_to_basis_ideal_quotient (I->m[0], this, NULL);
3322
3323 assume (strat->sl == IDELEMS (strat->Shdl) - 1);
3324 if(!(F4_mode))
3325 {
3326 poly *array_arg = I->m;
3327 array_arg++;
3328 introduceDelayedPairs (array_arg, n - 1);
3329 /*
3330 for (i=1;i<n;i++)//the 1 is wanted, because first element is added to basis
3331 {
3332 // add_to_basis(I->m[i],-1,-1,c);
3333 si=(sorted_pair_node*) omalloc(sizeof(sorted_pair_node));
3334 si->i=-1;
3335 si->j=-2;
3336 si->expected_length=pQuality(I->m[i],this,pLength(I->m[i]));
3337 si->deg=pTotaldegree(I->m[i]);
3338 if (!rField_is_Zp(r))
3339 {
3340 p_Cleardenom(I->m[i], r);
3341 }
3342 si->lcm_of_lm=I->m[i];
3343
3344 // c->apairs[n-1-i]=si;
3345 apairs[n-i-1]=si;
3346 ++(pair_top);
3347 } */
3348 }
3349 else
3350 {
3351 for(i = 1; i < n; i++) //the 1 is wanted, because first element is added to basis
3352 add_to_basis_ideal_quotient (I->m[i], this, NULL);
3353 }
3354 for(i = 0; i < IDELEMS (I); i++)
3355 {
3356 I->m[i] = NULL;
3357 }
3358 idDelete (&I);
3359 add_later = idInit (ADD_LATER_SIZE, S->rank);
3360#ifdef USE_NORO
3361 use_noro = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r))
3362 && (!(eliminationProblem)) && (n_GetChar(currRing->cf) <= NV_MAX_PRIME));
3363 use_noro_last_block = false;
3364 if((!(use_noro)) && (lastDpBlockStart <= (currRing->N)))
3365 {
3366 use_noro_last_block = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r))
3367 && (n_GetChar(currRing->cf) <= NV_MAX_PRIME));
3368 }
3369#else
3370 use_noro = false;
3371 use_noro_last_block = false;
3372#endif
3373 //Print("NORO last block %i",use_noro_last_block);
3374 memset (add_later->m, 0, ADD_LATER_SIZE * sizeof (poly));
3375}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
int i
Definition: cfEzgcd.cc:132
int * S_2_R
Definition: kutil.h:342
ring tailRing
Definition: kutil.h:343
intset lenS
Definition: kutil.h:319
intset ecartS
Definition: kutil.h:309
char honey
Definition: kutil.h:377
unsigned syzComp
Definition: kutil.h:354
polyset S
Definition: kutil.h:306
ideal Shdl
Definition: kutil.h:303
wlen_set lenSw
Definition: kutil.h:320
intset fromQ
Definition: kutil.h:321
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:286
void(* initEcart)(TObject *L)
Definition: kutil.h:280
int sl
Definition: kutil.h:348
unsigned long * sevS
Definition: kutil.h:322
unsigned long pTotaldegree(poly p)
Definition: tgb_internal.h:271
mp_array_list * F
Definition: tgb_internal.h:238
BOOLEAN completed
Definition: tgb_internal.h:262
int lastCleanedDeg
Definition: tgb_internal.h:257
int_pair_node * soon_free
Definition: tgb_internal.h:228
sorted_pair_node ** apairs
Definition: tgb_internal.h:229
BOOLEAN nc
Definition: tgb_internal.h:267
kStrategy strat
Definition: tgb_internal.h:220
int * T_deg_full
Definition: tgb_internal.h:222
BOOLEAN use_noro_last_block
Definition: tgb_internal.h:260
int array_lengths
Definition: tgb_internal.h:246
int easy_product_crit
Definition: tgb_internal.h:253
int lastDpBlockStart
Definition: tgb_internal.h:256
int * lengths
Definition: tgb_internal.h:217
ideal add_later
Definition: tgb_internal.h:214
int extended_product_crit
Definition: tgb_internal.h:254
sorted_pair_node ** tmp_spn
Definition: tgb_internal.h:225
void introduceDelayedPairs(poly *pa, int s)
Definition: tgb.cc:3156
char ** states
Definition: tgb_internal.h:209
BOOLEAN isDifficultField
Definition: tgb_internal.h:261
unsigned int reduction_steps
Definition: tgb_internal.h:242
poly_array_list * F_minus
Definition: tgb_internal.h:239
int current_degree
Definition: tgb_internal.h:248
poly * gcd_of_terms
Definition: tgb_internal.h:227
poly * tmp_pair_lm
Definition: tgb_internal.h:224
long * short_Exps
Definition: tgb_internal.h:219
BOOLEAN tailReductions
Definition: tgb_internal.h:264
BOOLEAN is_homog
Definition: tgb_internal.h:263
int syz_comp
array_lengths should be greater equal n;
Definition: tgb_internal.h:245
BOOLEAN use_noro
Definition: tgb_internal.h:259
BOOLEAN eliminationProblem
Definition: tgb_internal.h:265
wlen_type * weighted_lengths
Definition: tgb_internal.h:218
BOOLEAN F4_mode
Definition: tgb_internal.h:266
poly_list_node * to_destroy
Definition: tgb_internal.h:236
int normal_forms
Definition: tgb_internal.h:247
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition: coeffs.h:441
STATIC_VAR omBin lm_bin
Definition: fast_mult.cc:429
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
STATIC_VAR Poly * h
Definition: janet.cc:971
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9627
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9476
void initEcartBBA(TObject *h)
Definition: kutil.cc:1312
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
Definition: kutil.cc:8829
int64 wlen_type
Definition: kutil.h:54
int * intset
Definition: kutil.h:53
#define assume(x)
Definition: mod2.h:389
#define NV_MAX_PRIME
Definition: modulop.h:37
#define POLYSIZE
Definition: monomials.h:233
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define omAlloc0(size)
Definition: omAllocDecl.h:211
#define omAllocAligned
Definition: omAllocDecl.h:273
#define omGetSpecBin(size)
Definition: omBin.h:11
#define NULL
Definition: omList.c:12
#define TEST_OPT_REDTAIL
Definition: options.h:117
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
#define pOne()
Definition: polys.h:315
static BOOLEAN rField_is_Zp(const ring r)
Definition: ring.h:500
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:400
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:35
#define IDELEMS(i)
Definition: simpleideals.h:23
#define ADD_LATER_SIZE
Definition: tgb.cc:39
static int get_last_dp_block_start(ring r)
Definition: tgb.cc:427
sorted_pair_node ** add_to_basis_ideal_quotient(poly h, slimgb_alg *c, int *ip)
Definition: tgb.cc:1378

◆ ~slimgb_alg()

slimgb_alg::~slimgb_alg ( )
virtual

Definition at line 3377 of file tgb.cc.

3378{
3379
3380 if(!(completed))
3381 {
3382 poly *add = (poly *) omAlloc ((pair_top + 2) * sizeof (poly));
3383 int piter;
3384 int pos = 0;
3385 for(piter = 0; piter <= pair_top; piter++)
3386 {
3387 sorted_pair_node *s = apairs[piter];
3388 if(s->i < 0)
3389 {
3390 //delayed element
3391 if(s->lcm_of_lm != NULL)
3392 {
3393 add[pos] = s->lcm_of_lm;
3394 pos++;
3395 }
3396 }
3398 apairs[piter] = NULL;
3399 }
3400 pair_top = -1;
3401 add[pos] = NULL;
3402 pos = 0;
3403 while(add[pos] != NULL)
3404 {
3405 add_to_basis_ideal_quotient (add[pos], this, NULL);
3406 pos++;
3407 }
3408 for(piter = 0; piter <= pair_top; piter++)
3409 {
3410 sorted_pair_node *s = apairs[piter];
3411 assume (s->i >= 0);
3413 apairs[piter] = NULL;
3414 }
3415 pair_top = -1;
3416 }
3417 id_Delete (&add_later, r);
3418 int i, j;
3419 slimgb_alg *c = this;
3420 while(c->to_destroy)
3421 {
3422 pDelete (&(c->to_destroy->p));
3423 poly_list_node *old = c->to_destroy;
3424 c->to_destroy = c->to_destroy->next;
3425 omFree (old);
3426 }
3427 while(c->F)
3428 {
3429 for(i = 0; i < c->F->size; i++)
3430 {
3431 pDelete (&(c->F->mp[i].m));
3432 }
3433 omFree (c->F->mp);
3434 c->F->mp = NULL;
3435 mp_array_list *old = c->F;
3436 c->F = c->F->next;
3437 omFree (old);
3438 }
3439 while(c->F_minus)
3440 {
3441 for(i = 0; i < c->F_minus->size; i++)
3442 {
3443 pDelete (&(c->F_minus->p[i]));
3444 }
3445 omFree (c->F_minus->p);
3446 c->F_minus->p = NULL;
3447 poly_array_list *old = c->F_minus;
3448 c->F_minus = c->F_minus->next;
3449 omFree (old);
3450 }
3451#ifndef HAVE_BOOST
3452#ifndef USE_STDVECBOOL
3453 for(int z = 1 /* zero length at 0 */ ; z < c->n; z++)
3454 {
3455 omFree (c->states[z]);
3456 }
3457 omFree (c->states);
3458#endif
3459#endif
3460
3461 omFree (c->lengths);
3463 for(int z = 0; z < c->n; z++)
3464 {
3465 pDelete (&c->tmp_pair_lm[z]);
3466 omFree (c->tmp_spn[z]);
3467 }
3468 omFree (c->tmp_pair_lm);
3469 omFree (c->tmp_spn);
3470
3471 omFree (c->T_deg);
3472 omfree (c->T_deg_full); /*c->T_deg_full my be NULL*/
3473
3474 omFree (c->strat->ecartS);
3475 omFree (c->strat->sevS);
3476// initsevS(i);
3477 omFree (c->strat->S_2_R);
3478
3479
3480 omFree (c->strat->lenS);
3481
3482 if(c->strat->lenSw)
3483 omFree (c->strat->lenSw);
3484
3485 for(i = 0; i < c->n; i++)
3486 {
3487 if(c->gcd_of_terms[i])
3488 pDelete (&(c->gcd_of_terms[i]));
3489 }
3490 omFree (c->gcd_of_terms);
3491
3492 omFree (c->apairs);
3493 if(TEST_OPT_PROT)
3494 {
3495 //Print("calculated %d NFs\n",c->normal_forms);
3496 Print ("\nNF:%i product criterion:%i, ext_product criterion:%i \n",
3498 }
3499
3500 for(i = 0; i <= c->strat->sl; i++)
3501 {
3502 if(!c->strat->S[i])
3503 continue;
3505 for(j = 0; j < c->n; j++)
3506 {
3507 if(c->S->m[j] == c->strat->S[i])
3508 {
3509 found = TRUE;
3510 break;
3511 }
3512 }
3513 if(!found)
3514 pDelete (&c->strat->S[i]);
3515 }
3516// for(i=0;i<c->n;i++)
3517// {
3518// if (c->rep[i]!=i)
3519// {
3520// // for(j=0;j<=c->strat->sl;j++)
3521// {
3522// // if(c->strat->S[j]==c->S->m[i])
3523// {
3524// // c->strat->S[j]=NULL;
3525// // break;
3526// // }
3527// // }
3528// // PrintS("R_delete");
3529// pDelete(&c->S->m[i]);
3530// }
3531// }
3532
3533 if(completed)
3534 {
3535 for(i = 0; i < c->n; i++)
3536 {
3537 assume (c->S->m[i] != NULL);
3538 if(p_GetComp (c->S->m[i], currRing) > this->syz_comp)
3539 continue;
3540 for(j = 0; j < c->n; j++)
3541 {
3542 if((c->S->m[j] == NULL) || (i == j))
3543 continue;
3544 assume (p_LmShortDivisibleBy (c->S->m[j], c->short_Exps[j],
3545 c->S->m[i], ~c->short_Exps[i],
3546 c->r) == p_LmDivisibleBy (c->S->m[j],
3547 c->S->m[i],
3548 c->r));
3549 if(p_LmShortDivisibleBy (c->S->m[j], c->short_Exps[j],
3550 c->S->m[i], ~c->short_Exps[i], c->r))
3551 {
3552 pDelete (&c->S->m[i]);
3553 break;
3554 }
3555 }
3556 }
3557 }
3558 omFree (c->short_Exps);
3559
3560 ideal I = c->S;
3561 IDELEMS (I) = c->n;
3562 idSkipZeroes (I);
3563 for(i = 0; i <= c->strat->sl; i++)
3564 c->strat->S[i] = NULL;
3565 id_Delete (&c->strat->Shdl, c->r);
3566 pDelete (&c->tmp_lm);
3568 delete c->strat;
3569}
int BOOLEAN
Definition: auxiliary.h:87
#define Print
Definition: emacs.cc:80
const CanonicalForm int s
Definition: facAbsFact.cc:51
bool found
Definition: facFactorize.cc:55
int j
Definition: facHensel.cc:110
STATIC_VAR unsigned add[]
Definition: misc_ip.cc:107
#define p_GetComp(p, r)
Definition: monomials.h:64
#define omfree(addr)
Definition: omAllocDecl.h:237
#define omFree(addr)
Definition: omAllocDecl.h:261
#define omUnGetSpecBin(bin_ptr)
Definition: omBin.h:14
#define TEST_OPT_PROT
Definition: options.h:104
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
Definition: p_polys.h:1908
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
Definition: p_polys.h:1889
#define pDelete(p_ptr)
Definition: polys.h:186
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
poly_array_list * next
Definition: tgb_internal.h:196
mp_array_list * next
Definition: tgb_internal.h:188
poly_list_node * next
Definition: tgb_internal.h:170
void free_sorted_pair_node(sorted_pair_node *s, const ring r)
Definition: tgb.cc:3954
monom_poly * mp
Definition: tgb_internal.h:186

Member Function Documentation

◆ cleanDegs()

void slimgb_alg::cleanDegs ( int  lower,
int  upper 
)

Definition at line 3794 of file tgb.cc.

3795{
3796 assume (is_homog);
3797 int deg;
3798 if(TEST_OPT_PROT)
3799 {
3800 PrintS ("C");
3801 }
3802 for(deg = lower; deg <= upper; deg++)
3803 {
3804 int i;
3805 for(i = 0; i < n; i++)
3806 {
3807 if(T_deg[i] == deg)
3808 {
3809 poly h;
3810 h = S->m[i];
3811 h = redNFTail (h, strat->sl, strat, lengths[i]);
3813 {
3814 p_Cleardenom (h, r); //includes p_Content(h,r);
3815 }
3816 else
3817 pNorm (h);
3818 //TODO:GCD of TERMS
3819 poly got =::gcd_of_terms (h, r);
3820 p_Delete (&gcd_of_terms[i], r);
3821 gcd_of_terms[i] = got;
3822 int len = pLength (h);
3823 wlen_type wlen = pQuality (h, this, len);
3825 weighted_lengths[i] = wlen;
3826 lengths[i] = len;
3827 assume (h == S->m[i]);
3828 int j;
3829 for(j = 0; j <= strat->sl; j++)
3830 {
3831 if(h == strat->S[j])
3832 {
3833 int new_pos = simple_posInS (strat, h, len, wlen);
3834 if(strat->lenS)
3835 {
3836 strat->lenS[j] = len;
3837 }
3838 if(strat->lenSw)
3839 {
3840 strat->lenSw[j] = wlen;
3841 }
3842 if(new_pos < j)
3843 {
3844 move_forward_in_S (j, new_pos, strat);
3845 }
3846 else
3847 {
3848 if(new_pos > j)
3849 new_pos = new_pos - 1; //is identical with one element
3850 if(new_pos > j)
3851 move_backward_in_S (j, new_pos, strat);
3852 }
3853 break;
3854 }
3855 }
3856 }
3857 }
3858 }
3859 {
3860 int i, j;
3861 for(i = 0; i < this->n; i++)
3862 {
3863 for(j = 0; j < i; j++)
3864 {
3865 if(T_deg[i] + T_deg[j] <= upper)
3866 {
3867 now_t_rep (i, j, this);
3868 }
3869 }
3870 }
3871 }
3872 //TODO resort and update strat->S,strat->lenSw
3873 //TODO mark pairs
3874}
poly redNFTail(poly h, const int sl, kStrategy strat)
#define TEST_OPT_INTSTRATEGY
Definition: options.h:111
poly p_Cleardenom(poly p, const ring r)
Definition: p_polys.cc:2845
static int pLength(poly a)
Definition: p_polys.h:188
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:899
void pNorm(poly p)
Definition: polys.h:362
void PrintS(const char *s)
Definition: reporter.cc:284
static void move_forward_in_S(int old_pos, int new_pos, kStrategy strat)
Definition: tgb.cc:990
static int simple_posInS(kStrategy strat, poly p, int len, wlen_type wlen)
Definition: tgb.cc:1260
static wlen_type pQuality(poly p, slimgb_alg *c, int l=-1)
Definition: tgb.cc:521
static void move_backward_in_S(int old_pos, int new_pos, kStrategy strat)
Definition: tgb.cc:1027
void now_t_rep(const int &arg_i, const int &arg_j, slimgb_alg *c)
Definition: tgb.cc:3674

◆ introduceDelayedPairs()

void slimgb_alg::introduceDelayedPairs ( poly *  pa,
int  s 
)

Definition at line 3156 of file tgb.cc.

3157{
3158 if(s == 0)
3159 return;
3160 sorted_pair_node **si_array =
3161 (sorted_pair_node **) omAlloc (s * sizeof (sorted_pair_node *));
3162
3163 for(int i = 0; i < s; i++)
3164 {
3165 sorted_pair_node *si =
3167 si->i = -1;
3168 si->j = -2;
3169 poly p = pa[i];
3170 simplify_poly (p, r);
3171 si->expected_length = pQuality (p, this, pLength (p));
3172 p_Test (p, r);
3173 si->deg = this->pTotaldegree_full (p);
3174 /*if (!rField_is_Zp(r))
3175 {
3176 p_Content(p,r);
3177 p_Cleardenom(p,r);
3178 } */
3179
3180 si->lcm_of_lm = p;
3181
3182 // c->apairs[n-1-i]=si;
3183 si_array[i] = si;
3184 }
3185
3186 qsort (si_array, s, sizeof (sorted_pair_node *), tgb_pair_better_gen2);
3187 apairs = spn_merge (apairs, pair_top + 1, si_array, s, this);
3188 pair_top += s;
3189 omFree (si_array);
3190}
int p
Definition: cfModGcd.cc:4078
int pTotaldegree_full(poly p)
Definition: tgb_internal.h:279
static BOOLEAN pa(leftv res, leftv args)
Definition: cohomo.cc:3723
#define p_Test(p, r)
Definition: p_polys.h:159
static void simplify_poly(poly p, ring r)
Definition: tgb.cc:59
int tgb_pair_better_gen2(const void *ap, const void *bp)
Definition: tgb.cc:645
sorted_pair_node ** spn_merge(sorted_pair_node **p, int pn, sorted_pair_node **q, int qn, slimgb_alg *c)
Definition: tgb.cc:716
wlen_type expected_length
Definition: tgb_internal.h:146

◆ pTotaldegree()

unsigned long slimgb_alg::pTotaldegree ( poly  p)
inline

Definition at line 271 of file tgb_internal.h.

272 {
273 pTest(p);
274 //assume(pDeg(p,r)==::p_Totaldegree(p,r));
275 assume(((unsigned long)::p_Totaldegree(p,r))==p->exp[deg_pos]);
276 return p->exp[deg_pos];
277 //return ::pTotaldegree(p,this->r);
278 }
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1505
#define pTest(p)
Definition: polys.h:414

◆ pTotaldegree_full()

int slimgb_alg::pTotaldegree_full ( poly  p)
inline

Definition at line 279 of file tgb_internal.h.

280 {
281 int rr=0;
282 while(p!=NULL)
283 {
284 int d=this->pTotaldegree(p);
285 if (d>rr) rr=d;
286 pIter(p);
287 }
288 return rr;
289 }
#define pIter(p)
Definition: monomials.h:37

Field Documentation

◆ add_later

ideal slimgb_alg::add_later

Definition at line 214 of file tgb_internal.h.

◆ apairs

sorted_pair_node** slimgb_alg::apairs

Definition at line 229 of file tgb_internal.h.

◆ array_lengths

int slimgb_alg::array_lengths

Definition at line 246 of file tgb_internal.h.

◆ average_length

int slimgb_alg::average_length

Definition at line 255 of file tgb_internal.h.

◆ completed

BOOLEAN slimgb_alg::completed

Definition at line 262 of file tgb_internal.h.

◆ current_degree

int slimgb_alg::current_degree

Definition at line 248 of file tgb_internal.h.

◆ deg_pos

int slimgb_alg::deg_pos

Definition at line 258 of file tgb_internal.h.

◆ easy_product_crit

int slimgb_alg::easy_product_crit

Definition at line 253 of file tgb_internal.h.

◆ eliminationProblem

BOOLEAN slimgb_alg::eliminationProblem

Definition at line 265 of file tgb_internal.h.

◆ expandS

poly* slimgb_alg::expandS

Definition at line 226 of file tgb_internal.h.

◆ extended_product_crit

int slimgb_alg::extended_product_crit

Definition at line 254 of file tgb_internal.h.

◆ F

mp_array_list* slimgb_alg::F

Definition at line 238 of file tgb_internal.h.

◆ F4_mode

BOOLEAN slimgb_alg::F4_mode

Definition at line 266 of file tgb_internal.h.

◆ F_minus

poly_array_list* slimgb_alg::F_minus

Definition at line 239 of file tgb_internal.h.

◆ gcd_of_terms

poly* slimgb_alg::gcd_of_terms

Definition at line 227 of file tgb_internal.h.

◆ is_homog

BOOLEAN slimgb_alg::is_homog

Definition at line 263 of file tgb_internal.h.

◆ isDifficultField

BOOLEAN slimgb_alg::isDifficultField

Definition at line 261 of file tgb_internal.h.

◆ last_index

int slimgb_alg::last_index

Definition at line 250 of file tgb_internal.h.

◆ lastCleanedDeg

int slimgb_alg::lastCleanedDeg

Definition at line 257 of file tgb_internal.h.

◆ lastDpBlockStart

int slimgb_alg::lastDpBlockStart

Definition at line 256 of file tgb_internal.h.

◆ lengths

int* slimgb_alg::lengths

Definition at line 217 of file tgb_internal.h.

◆ max_pairs

int slimgb_alg::max_pairs

Definition at line 251 of file tgb_internal.h.

◆ n

int slimgb_alg::n

Definition at line 243 of file tgb_internal.h.

◆ nc

BOOLEAN slimgb_alg::nc

Definition at line 267 of file tgb_internal.h.

◆ normal_forms

int slimgb_alg::normal_forms

Definition at line 247 of file tgb_internal.h.

◆ pair_top

int slimgb_alg::pair_top

Definition at line 252 of file tgb_internal.h.

◆ r

ring slimgb_alg::r

Definition at line 216 of file tgb_internal.h.

◆ Rcounter

int slimgb_alg::Rcounter

Definition at line 249 of file tgb_internal.h.

◆ reduction_steps

unsigned int slimgb_alg::reduction_steps

Definition at line 242 of file tgb_internal.h.

◆ S

ideal slimgb_alg::S

Definition at line 215 of file tgb_internal.h.

◆ short_Exps

long* slimgb_alg::short_Exps

Definition at line 219 of file tgb_internal.h.

◆ soon_free

int_pair_node* slimgb_alg::soon_free

Definition at line 228 of file tgb_internal.h.

◆ states

char** slimgb_alg::states

Definition at line 209 of file tgb_internal.h.

◆ strat

kStrategy slimgb_alg::strat

Definition at line 220 of file tgb_internal.h.

◆ syz_comp

int slimgb_alg::syz_comp

array_lengths should be greater equal n;

Definition at line 245 of file tgb_internal.h.

◆ T_deg

int* slimgb_alg::T_deg

Definition at line 221 of file tgb_internal.h.

◆ T_deg_full

int* slimgb_alg::T_deg_full

Definition at line 222 of file tgb_internal.h.

◆ tailReductions

BOOLEAN slimgb_alg::tailReductions

Definition at line 264 of file tgb_internal.h.

◆ tmp_lm

poly slimgb_alg::tmp_lm

Definition at line 223 of file tgb_internal.h.

◆ tmp_pair_lm

poly* slimgb_alg::tmp_pair_lm

Definition at line 224 of file tgb_internal.h.

◆ tmp_spn

sorted_pair_node** slimgb_alg::tmp_spn

Definition at line 225 of file tgb_internal.h.

◆ to_destroy

poly_list_node* slimgb_alg::to_destroy

Definition at line 236 of file tgb_internal.h.

◆ use_noro

BOOLEAN slimgb_alg::use_noro

Definition at line 259 of file tgb_internal.h.

◆ use_noro_last_block

BOOLEAN slimgb_alg::use_noro_last_block

Definition at line 260 of file tgb_internal.h.

◆ weighted_lengths

wlen_type* slimgb_alg::weighted_lengths

Definition at line 218 of file tgb_internal.h.


The documentation for this class was generated from the following files: