Loading...
Searching...
No Matches
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_type * | weighted_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_node * | soon_free
sorted_pair_node ** | apairs
poly_list_node * | to_destroy
mp_array_list * | F
poly_array_list * | F_minus
unsigned int | reduction_steps
int | n
int | syz_comp
| array_lengths should be greater equal n;
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 3202 of file tgb.cc.

{
this->deg_pos = deg_pos;
lastCleanedDeg = -1;
completed = FALSE;
this->syz_comp = syz_comp;
r = currRing;
nc = rIsPluralRing (r);
this->lastDpBlockStart = get_last_dp_block_start (r);
//Print("last dp Block start: %i\n", this->lastDpBlockStart);
is_homog = TRUE;
{
int hzz;
for(hzz = 0; hzz < IDELEMS (I); hzz++)
{
assume (I->m[hzz] != NULL);
int d = this->pTotaldegree (I->m[hzz]);
poly t = I->m[hzz]->next;
while(t)
{
if(d != (int)this->pTotaldegree (t))
{
is_homog = FALSE;
break;
}
t = t->next;
}
if(!(is_homog))
break;
}
}
eliminationProblem = ((!(is_homog)) && ((currRing->pLexOrder) || (I->rank > 1)));
tailReductions = ((is_homog) || ((TEST_OPT_REDTAIL) && (!(I->rank > 1))));
// Print("is homog:%d",c->is_homog);
void *h;
int i;
to_destroy = NULL;
easy_product_crit = 0;
extended_product_crit = 0;
if(rField_is_Zp (r))
isDifficultField = FALSE;
else
isDifficultField = TRUE;
//not fully correct
//(rChar()==0);
F4_mode = F4;
reduction_steps = 0;
last_index = -1;
F = NULL;
F_minus = NULL;
Rcounter = 0;
soon_free = NULL;
tmp_lm = pOne ();
normal_forms = 0;
current_degree = 1;
max_pairs = 5 * IDELEMS (I);
apairs =
(sorted_pair_node **) omAlloc (sizeof (sorted_pair_node *) * max_pairs);
pair_top = -1;
int n = IDELEMS (I);
array_lengths = n;
i = 0;
this->n = 0;
T_deg = (int *) omAlloc (n * sizeof (int));
if(eliminationProblem)
T_deg_full = (int *) omAlloc (n * sizeof (int));
else
T_deg_full = NULL;
tmp_pair_lm = (poly *) omAlloc (n * sizeof (poly));
tmp_spn = (sorted_pair_node **) omAlloc (n * sizeof (sorted_pair_node *));
lm_bin = omGetSpecBin (POLYSIZE + (r->ExpL_Size) * sizeof (long));
/* omUnGetSpecBin(&(c->HeadBin)); */
#ifndef HAVE_BOOST
#ifdef USE_STDVECBOOL
#else
h = omAlloc (n * sizeof (char *));
states = (char **) h;
#endif
#endif
h = omAlloc (n * sizeof (int));
lengths = (int *) h;
weighted_lengths = (wlen_type *) omAllocAligned (n * sizeof (wlen_type));
gcd_of_terms = (poly *) omAlloc (n * sizeof (poly));
short_Exps = (long *) omAlloc (n * sizeof (long));
if(F4_mode)
S = idInit (n, I->rank);
else
S = idInit (1, I->rank);
strat = new skStrategy;
if(eliminationProblem)
strat->honey = TRUE;
strat->syzComp = syz_comp;
initBuchMoraCrit (strat);
initBuchMoraPos (strat);
strat->initEcart = initEcartBBA;
strat->tailRing = r;
strat->enterS = enterSBba;
strat->sl = -1;
i = n;
i = 1; //some strange bug else
/* initS(c->S,NULL,c->strat); */
/* intS start: */
// i=((i+IDELEMS(c->S)+15)/16)*16;
strat->ecartS = (intset) omAlloc (i * sizeof (int)); /*initec(i); */
strat->sevS = (unsigned long *) omAlloc0 (i * sizeof (unsigned long));
/*initsevS(i); */
strat->S_2_R = (int *) omAlloc0 (i * sizeof (int)); /*initS_2_R(i); */
strat->fromQ = NULL;
strat->Shdl = idInit (1, 1);
strat->S = strat->Shdl->m;
strat->lenS = (int *) omAlloc0 (i * sizeof (int));
if((isDifficultField) || (eliminationProblem))
strat->lenSw = (wlen_type *) omAlloc0 (i * sizeof (wlen_type));
else
strat->lenSw = NULL;
assume (n > 0);
add_to_basis_ideal_quotient (I->m[0], this, NULL);
assume (strat->sl == IDELEMS (strat->Shdl) - 1);
if(!(F4_mode))
{
poly *array_arg = I->m;
array_arg++;
introduceDelayedPairs (array_arg, n - 1);
/*
for (i=1;i<n;i++)//the 1 is wanted, because first element is added to basis
{
// add_to_basis(I->m[i],-1,-1,c);
si=(sorted_pair_node*) omalloc(sizeof(sorted_pair_node));
si->i=-1;
si->j=-2;
si->expected_length=pQuality(I->m[i],this,pLength(I->m[i]));
si->deg=pTotaldegree(I->m[i]);
if (!rField_is_Zp(r))
{
p_Cleardenom(I->m[i], r);
}
si->lcm_of_lm=I->m[i];
// c->apairs[n-1-i]=si;
apairs[n-i-1]=si;
++(pair_top);
} */
}
else
{
for(i = 1; i < n; i++) //the 1 is wanted, because first element is added to basis
add_to_basis_ideal_quotient (I->m[i], this, NULL);
}
for(i = 0; i < IDELEMS (I); i++)
{
I->m[i] = NULL;
}
idDelete (&I);
add_later = idInit (ADD_LATER_SIZE, S->rank);
#ifdef USE_NORO
use_noro = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r))
&& (!(eliminationProblem)) && (n_GetChar(currRing->cf) <= NV_MAX_PRIME));
use_noro_last_block = false;
if((!(use_noro)) && (lastDpBlockStart <= (currRing->N)))
{
use_noro_last_block = ((!(nc)) && (S->rank <= 1) && (rField_is_Zp (r))
&& (n_GetChar(currRing->cf) <= NV_MAX_PRIME));
}
#else
use_noro = false;
use_noro_last_block = false;
#endif
//Print("NORO last block %i",use_noro_last_block);
memset (add_later->m, 0, ADD_LATER_SIZE * sizeof (poly));
}
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
i
int i
Definition cfEzgcd.cc:132
slimgb_alg::pTotaldegree
unsigned long pTotaldegree(poly p)
Definition tgb_internal.h:271
slimgb_alg::F
mp_array_list * F
Definition tgb_internal.h:238
slimgb_alg::completed
BOOLEAN completed
Definition tgb_internal.h:262
slimgb_alg::deg_pos
int deg_pos
Definition tgb_internal.h:258
slimgb_alg::S
ideal S
Definition tgb_internal.h:215
slimgb_alg::lastCleanedDeg
int lastCleanedDeg
Definition tgb_internal.h:257
slimgb_alg::soon_free
int_pair_node * soon_free
Definition tgb_internal.h:228
slimgb_alg::max_pairs
int max_pairs
Definition tgb_internal.h:251
slimgb_alg::apairs
sorted_pair_node ** apairs
Definition tgb_internal.h:229
slimgb_alg::nc
BOOLEAN nc
Definition tgb_internal.h:267
slimgb_alg::strat
kStrategy strat
Definition tgb_internal.h:220
slimgb_alg::T_deg_full
int * T_deg_full
Definition tgb_internal.h:222
slimgb_alg::use_noro_last_block
BOOLEAN use_noro_last_block
Definition tgb_internal.h:260
slimgb_alg::array_lengths
int array_lengths
Definition tgb_internal.h:246
slimgb_alg::easy_product_crit
int easy_product_crit
Definition tgb_internal.h:253
slimgb_alg::lastDpBlockStart
int lastDpBlockStart
Definition tgb_internal.h:256
slimgb_alg::lengths
int * lengths
Definition tgb_internal.h:217
slimgb_alg::Rcounter
int Rcounter
Definition tgb_internal.h:249
slimgb_alg::add_later
ideal add_later
Definition tgb_internal.h:214
slimgb_alg::extended_product_crit
int extended_product_crit
Definition tgb_internal.h:254
slimgb_alg::tmp_spn
sorted_pair_node ** tmp_spn
Definition tgb_internal.h:225
slimgb_alg::introduceDelayedPairs
void introduceDelayedPairs(poly *pa, int s)
Definition tgb.cc:3166
slimgb_alg::states
char ** states
Definition tgb_internal.h:209
slimgb_alg::isDifficultField
BOOLEAN isDifficultField
Definition tgb_internal.h:261
slimgb_alg::reduction_steps
unsigned int reduction_steps
Definition tgb_internal.h:242
slimgb_alg::F_minus
poly_array_list * F_minus
Definition tgb_internal.h:239
slimgb_alg::current_degree
int current_degree
Definition tgb_internal.h:248
slimgb_alg::tmp_lm
poly tmp_lm
Definition tgb_internal.h:223
slimgb_alg::gcd_of_terms
poly * gcd_of_terms
Definition tgb_internal.h:227
slimgb_alg::tmp_pair_lm
poly * tmp_pair_lm
Definition tgb_internal.h:224
slimgb_alg::short_Exps
long * short_Exps
Definition tgb_internal.h:219
slimgb_alg::tailReductions
BOOLEAN tailReductions
Definition tgb_internal.h:264
slimgb_alg::is_homog
BOOLEAN is_homog
Definition tgb_internal.h:263
slimgb_alg::syz_comp
int syz_comp
array_lengths should be greater equal n;
Definition tgb_internal.h:245
slimgb_alg::pair_top
int pair_top
Definition tgb_internal.h:252
slimgb_alg::T_deg
int * T_deg
Definition tgb_internal.h:221
slimgb_alg::use_noro
BOOLEAN use_noro
Definition tgb_internal.h:259
slimgb_alg::eliminationProblem
BOOLEAN eliminationProblem
Definition tgb_internal.h:265
slimgb_alg::weighted_lengths
wlen_type * weighted_lengths
Definition tgb_internal.h:218
slimgb_alg::n
int n
Definition tgb_internal.h:243
slimgb_alg::F4_mode
BOOLEAN F4_mode
Definition tgb_internal.h:266
slimgb_alg::to_destroy
poly_list_node * to_destroy
Definition tgb_internal.h:236
slimgb_alg::r
ring r
Definition tgb_internal.h:216
slimgb_alg::normal_forms
int normal_forms
Definition tgb_internal.h:247
slimgb_alg::last_index
int last_index
Definition tgb_internal.h:250
n_GetChar
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
Definition coeffs.h:450
lm_bin
STATIC_VAR omBin lm_bin
Definition fast_mult.cc:429
idDelete
#define idDelete(H)
delete an ideal
Definition ideals.h:29
h
STATIC_VAR Poly * h
Definition janet.cc:971
enterSBba
void enterSBba(LObject *p, int atS, kStrategy strat, int atR)
Definition kutil.cc:8792
initBuchMoraPos
void initBuchMoraPos(kStrategy strat)
Definition kutil.cc:9580
initBuchMoraCrit
void initBuchMoraCrit(kStrategy strat)
Definition kutil.cc:9435
initEcartBBA
void initEcartBBA(TObject *h)
Definition kutil.cc:1301
wlen_type
int64 wlen_type
Definition kutil.h:55
intset
int * intset
Definition kutil.h:54
assume
#define assume(x)
Definition mod2.h:389
NV_MAX_PRIME
#define NV_MAX_PRIME
Definition modulop.h:37
POLYSIZE
#define POLYSIZE
Definition monomials.h:233
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
omAllocAligned
#define omAllocAligned
Definition omAllocDecl.h:273
omGetSpecBin
#define omGetSpecBin(size)
Definition omBin.h:11
NULL
#define NULL
Definition omList.c:12
TEST_OPT_REDTAIL
#define TEST_OPT_REDTAIL
Definition options.h:118
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
pOne
#define pOne()
Definition polys.h:316
rField_is_Zp
static BOOLEAN rField_is_Zp(const ring r)
Definition ring.h:506
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
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
ADD_LATER_SIZE
#define ADD_LATER_SIZE
Definition tgb.cc:39
get_last_dp_block_start
static int get_last_dp_block_start(ring r)
Definition tgb.cc:427
add_to_basis_ideal_quotient
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 3387 of file tgb.cc.

{
if(!(completed))
{
poly *add = (poly *) omAlloc ((pair_top + 2) * sizeof (poly));
int piter;
int pos = 0;
for(piter = 0; piter <= pair_top; piter++)
{
sorted_pair_node *s = apairs[piter];
if(s->i < 0)
{
//delayed element
if(s->lcm_of_lm != NULL)
{
add[pos] = s->lcm_of_lm;
pos++;
}
}
free_sorted_pair_node (s, r);
apairs[piter] = NULL;
}
pair_top = -1;
add[pos] = NULL;
pos = 0;
while(add[pos] != NULL)
{
add_to_basis_ideal_quotient (add[pos], this, NULL);
pos++;
}
for(piter = 0; piter <= pair_top; piter++)
{
sorted_pair_node *s = apairs[piter];
assume (s->i >= 0);
free_sorted_pair_node (s, r);
apairs[piter] = NULL;
}
pair_top = -1;
}
id_Delete (&add_later, r);
int i, j;
slimgb_alg *c = this;
while(c->to_destroy)
{
pDelete (&(c->to_destroy->p));
poly_list_node *old = c->to_destroy;
c->to_destroy = c->to_destroy->next;
omFree (old);
}
while(c->F)
{
for(i = 0; i < c->F->size; i++)
{
pDelete (&(c->F->mp[i].m));
}
omFree (c->F->mp);
c->F->mp = NULL;
mp_array_list *old = c->F;
c->F = c->F->next;
omFree (old);
}
while(c->F_minus)
{
for(i = 0; i < c->F_minus->size; i++)
{
pDelete (&(c->F_minus->p[i]));
}
omFree (c->F_minus->p);
c->F_minus->p = NULL;
poly_array_list *old = c->F_minus;
c->F_minus = c->F_minus->next;
omFree (old);
}
#ifndef HAVE_BOOST
#ifndef USE_STDVECBOOL
for(int z = 1 /* zero length at 0 */ ; z < c->n; z++)
{
omFree (c->states[z]);
}
omFree (c->states);
#endif
#endif
omFree (c->lengths);
omFree (c->weighted_lengths);
for(int z = 0; z < c->n; z++)
{
pDelete (&c->tmp_pair_lm[z]);
omFree (c->tmp_spn[z]);
}
omFree (c->tmp_pair_lm);
omFree (c->tmp_spn);
omFree (c->T_deg);
omfree (c->T_deg_full); /*c->T_deg_full my be NULL*/
omFree (c->strat->ecartS);
omFree (c->strat->sevS);
// initsevS(i);
omFree (c->strat->S_2_R);
omFree (c->strat->lenS);
if(c->strat->lenSw)
omFree (c->strat->lenSw);
for(i = 0; i < c->n; i++)
{
if(c->gcd_of_terms[i])
pDelete (&(c->gcd_of_terms[i]));
}
omFree (c->gcd_of_terms);
omFree (c->apairs);
if(TEST_OPT_PROT)
{
//Print("calculated %d NFs\n",c->normal_forms);
Print ("\nNF:%i product criterion:%i, ext_product criterion:%i \n",
c->normal_forms, c->easy_product_crit, c->extended_product_crit);
}
for(i = 0; i <= c->strat->sl; i++)
{
if(!c->strat->S[i])
continue;
BOOLEAN found = FALSE;
for(j = 0; j < c->n; j++)
{
if(c->S->m[j] == c->strat->S[i])
{
found = TRUE;
break;
}
}
if(!found)
pDelete (&c->strat->S[i]);
}
// for(i=0;i<c->n;i++)
// {
// if (c->rep[i]!=i)
// {
// // for(j=0;j<=c->strat->sl;j++)
// {
// // if(c->strat->S[j]==c->S->m[i])
// {
// // c->strat->S[j]=NULL;
// // break;
// // }
// // }
// // PrintS("R_delete");
// pDelete(&c->S->m[i]);
// }
// }
if(completed)
{
for(i = 0; i < c->n; i++)
{
assume (c->S->m[i] != NULL);
if(p_GetComp (c->S->m[i], currRing) > this->syz_comp)
continue;
for(j = 0; j < c->n; j++)
{
if((c->S->m[j] == NULL) || (i == j))
continue;
assume (p_LmShortDivisibleBy (c->S->m[j], c->short_Exps[j],
c->S->m[i], ~c->short_Exps[i],
c->r) == p_LmDivisibleBy (c->S->m[j],
c->S->m[i],
c->r));
if(p_LmShortDivisibleBy (c->S->m[j], c->short_Exps[j],
c->S->m[i], ~c->short_Exps[i], c->r))
{
pDelete (&c->S->m[i]);
break;
}
}
}
}
omFree (c->short_Exps);
ideal I = c->S;
IDELEMS (I) = c->n;
idSkipZeroes (I);
for(i = 0; i <= c->strat->sl; i++)
c->strat->S[i] = NULL;
id_Delete (&c->strat->Shdl, c->r);
pDelete (&c->tmp_lm);
omUnGetSpecBin (&lm_bin);
delete c->strat;
}
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
skStrategy::S_2_R
int * S_2_R
Definition kutil.h:341
skStrategy::lenS
intset lenS
Definition kutil.h:318
skStrategy::ecartS
intset ecartS
Definition kutil.h:308
skStrategy::S
polyset S
Definition kutil.h:305
skStrategy::Shdl
ideal Shdl
Definition kutil.h:302
skStrategy::lenSw
wlen_set lenSw
Definition kutil.h:319
skStrategy::sl
int sl
Definition kutil.h:347
skStrategy::sevS
unsigned long * sevS
Definition kutil.h:321
slimgb_alg::slimgb_alg
slimgb_alg(ideal I, int syz_comp, BOOLEAN F4, int deg_pos)
Definition tgb.cc:3202
Print
#define Print
Definition emacs.cc:80
s
const CanonicalForm int s
Definition facAbsFact.cc:51
found
bool found
Definition facFactorize.cc:55
j
int j
Definition facHensel.cc:110
add
STATIC_VAR unsigned add[]
Definition misc_ip.cc:108
p_GetComp
#define p_GetComp(p, r)
Definition monomials.h:64
omfree
#define omfree(addr)
Definition omAllocDecl.h:237
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
omUnGetSpecBin
#define omUnGetSpecBin(bin_ptr)
Definition omBin.h:14
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition options.h:105
p_LmShortDivisibleBy
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
Definition p_polys.h:1931
p_LmDivisibleBy
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
Definition p_polys.h:1912
pDelete
#define pDelete(p_ptr)
Definition polys.h:187
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition simpleideals.cc:123
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition simpleideals.cc:201
poly_array_list::p
poly * p
Definition tgb_internal.h:194
poly_array_list::size
int size
Definition tgb_internal.h:195
poly_list_node::p
poly p
Definition tgb_internal.h:169
poly_array_list::next
poly_array_list * next
Definition tgb_internal.h:196
mp_array_list::next
mp_array_list * next
Definition tgb_internal.h:188
mp_array_list::size
int size
Definition tgb_internal.h:187
poly_list_node::next
poly_list_node * next
Definition tgb_internal.h:170
monom_poly::m
poly m
Definition tgb_internal.h:181
free_sorted_pair_node
void free_sorted_pair_node(sorted_pair_node *s, const ring r)
Definition tgb.cc:3964
mp_array_list::mp
monom_poly * mp
Definition tgb_internal.h:186

## Member Function Documentation

## cleanDegs()

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

Definition at line 3804 of file tgb.cc.

{
assume (is_homog);
int deg;
if(TEST_OPT_PROT)
{
PrintS ("C");
}
for(deg = lower; deg <= upper; deg++)
{
int i;
for(i = 0; i < n; i++)
{
if(T_deg[i] == deg)
{
poly h;
h = S->m[i];
h = redNFTail (h, strat->sl, strat, lengths[i]);
if(TEST_OPT_INTSTRATEGY)
{
p_Cleardenom (h, r); //includes p_Content(h,r);
}
else
pNorm (h);
//TODO:GCD of TERMS
poly got =::gcd_of_terms (h, r);
p_Delete (&gcd_of_terms[i], r);
gcd_of_terms[i] = got;
int len = pLength (h);
wlen_type wlen = pQuality (h, this, len);
if(weighted_lengths)
weighted_lengths[i] = wlen;
lengths[i] = len;
assume (h == S->m[i]);
int j;
for(j = 0; j <= strat->sl; j++)
{
if(h == strat->S[j])
{
int new_pos = simple_posInS (strat, h, len, wlen);
if(strat->lenS)
{
strat->lenS[j] = len;
}
if(strat->lenSw)
{
strat->lenSw[j] = wlen;
}
if(new_pos < j)
{
move_forward_in_S (j, new_pos, strat);
}
else
{
if(new_pos > j)
new_pos = new_pos - 1; //is identical with one element
if(new_pos > j)
move_backward_in_S (j, new_pos, strat);
}
break;
}
}
}
}
}
{
int i, j;
for(i = 0; i < this->n; i++)
{
for(j = 0; j < i; j++)
{
if(T_deg[i] + T_deg[j] <= upper)
{
now_t_rep (i, j, this);
}
}
}
}
//TODO resort and update strat->S,strat->lenSw
//TODO mark pairs
}
redNFTail
poly redNFTail(poly h, const int sl, kStrategy strat)
TEST_OPT_INTSTRATEGY
#define TEST_OPT_INTSTRATEGY
Definition options.h:112
p_Cleardenom
poly p_Cleardenom(poly p, const ring r)
Definition p_polys.cc:2893
pLength
static int pLength(poly a)
Definition p_polys.h:190
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
pNorm
void pNorm(poly p)
Definition polys.h:363
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
move_forward_in_S
static void move_forward_in_S(int old_pos, int new_pos, kStrategy strat)
Definition tgb.cc:990
simple_posInS
static int simple_posInS(kStrategy strat, poly p, int len, wlen_type wlen)
Definition tgb.cc:1260
pQuality
static wlen_type pQuality(poly p, slimgb_alg *c, int l=-1)
Definition tgb.cc:521
move_backward_in_S
static void move_backward_in_S(int old_pos, int new_pos, kStrategy strat)
Definition tgb.cc:1027
now_t_rep
void now_t_rep(const int &arg_i, const int &arg_j, slimgb_alg *c)
Definition tgb.cc:3684

## introduceDelayedPairs()

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

Definition at line 3166 of file tgb.cc.

{
if(s == 0)
return;
sorted_pair_node **si_array =
(sorted_pair_node **) omAlloc (s * sizeof (sorted_pair_node *));
for(int i = 0; i < s; i++)
{
sorted_pair_node *si =
(sorted_pair_node *) omAlloc (sizeof (sorted_pair_node));
si->i = -1;
si->j = -2;
poly p = pa[i];
simplify_poly (p, r);
si->expected_length = pQuality (p, this, pLength (p));
p_Test (p, r);
si->deg = this->pTotaldegree_full (p);
/*if (!rField_is_Zp(r))
{
p_Content(p,r);
p_Cleardenom(p,r);
} */
si->lcm_of_lm = p;
// c->apairs[n-1-i]=si;
si_array[i] = si;
}
qsort (si_array, s, sizeof (sorted_pair_node *), tgb_pair_better_gen2);
apairs = spn_merge (apairs, pair_top + 1, si_array, s, this);
pair_top += s;
omFree (si_array);
}
p
int p
Definition cfModGcd.cc:4086
slimgb_alg::pTotaldegree_full
int pTotaldegree_full(poly p)
Definition tgb_internal.h:279
pa
static BOOLEAN pa(leftv res, leftv args)
Definition cohomo.cc:3770
p_Test
#define p_Test(p, r)
Definition p_polys.h:161
simplify_poly
static void simplify_poly(poly p, ring r)
Definition tgb.cc:59
tgb_pair_better_gen2
int tgb_pair_better_gen2(const void *ap, const void *bp)
Definition tgb.cc:645
spn_merge
sorted_pair_node ** spn_merge(sorted_pair_node **p, int pn, sorted_pair_node **q, int qn, slimgb_alg *c)
Definition tgb.cc:716
sorted_pair_node::i
int i
Definition tgb_internal.h:148
sorted_pair_node::expected_length
wlen_type expected_length
Definition tgb_internal.h:146
sorted_pair_node::j
int j
Definition tgb_internal.h:149
sorted_pair_node::deg
int deg
Definition tgb_internal.h:150
sorted_pair_node::lcm_of_lm
poly lcm_of_lm
Definition tgb_internal.h:147

## pTotaldegree()

unsigned long slimgb_alg::pTotaldegree | ( | poly | p | ) |

inline

Definition at line 271 of file tgb_internal.h.

{
pTest(p);
//assume(pDeg(p,r)==::p_Totaldegree(p,r));
assume(((unsigned long)::p_Totaldegree(p,r))==p->exp[deg_pos]);
return p->exp[deg_pos];
//return ::pTotaldegree(p,this->r);
}
p_Totaldegree
static long p_Totaldegree(poly p, const ring r)
Definition p_polys.h:1528
pTest
#define pTest(p)
Definition polys.h:415

## pTotaldegree_full()

int slimgb_alg::pTotaldegree_full | ( | poly | p | ) |

inline

Definition at line 279 of file tgb_internal.h.

{
int rr=0;
while(p!=NULL)
{
int d=this->pTotaldegree(p);
if (d>rr) rr=d;
pIter(p);
}
return rr;
}
pIter
#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:

- kernel/GBEngine/tgb_internal.h
- kernel/GBEngine/tgb.cc