 |
My Project
UNKNOWN_GIT_VERSION
|
Go to the source code of this file.
|
static int | add_to_reductors (slimgb_alg *c, poly h, int len, int ecart, BOOLEAN simplified=FALSE) |
|
static void | multi_reduction (red_object *los, int &losl, slimgb_alg *c) |
|
static void | multi_reduce_step (find_erg &erg, red_object *r, slimgb_alg *c) |
|
static BOOLEAN | extended_product_criterion (poly p1, poly gcd1, poly p2, poly gcd2, slimgb_alg *c) |
|
static poly | gcd_of_terms (poly p, ring r) |
|
static int | tgb_pair_better_gen (const void *ap, const void *bp) |
|
static BOOLEAN | pair_better (sorted_pair_node *a, sorted_pair_node *b, slimgb_alg *c=NULL) |
|
static BOOLEAN | state_is (calc_state state, const int &i, const int &j, slimgb_alg *c) |
|
static void | super_clean_top_of_pair_list (slimgb_alg *c) |
|
static int | simple_posInS (kStrategy strat, poly p, int len, wlen_type wlen) |
|
static int * | make_connections (int from, int to, poly bound, slimgb_alg *c) |
|
static BOOLEAN | has_t_rep (const int &arg_i, const int &arg_j, slimgb_alg *state) |
|
static void | shorten_tails (slimgb_alg *c, poly monom) |
|
static poly | redNF2 (poly h, slimgb_alg *c, int &len, number &m, int n=0) |
|
static poly | redNFTail (poly h, const int sl, kStrategy strat, int len) |
|
static int | bucket_guess (kBucket *bucket) |
|
static void | simplify_poly (poly p, ring r) |
|
int | slim_nsize (number n, ring r) |
|
static BOOLEAN | monomial_root (poly m, ring r) |
|
static BOOLEAN | polynomial_root (poly h, ring r) |
|
static poly | p_Init_Special (const ring r) |
|
static poly | pOne_Special (const ring r=currRing) |
|
static wlen_type | pSLength (poly p, int l) |
|
wlen_type | kSBucketLength (kBucket *b, poly lm=NULL) |
| TODO CoefBuckets bercksichtigen. More...
|
|
static BOOLEAN | elength_is_normal_length (poly p, slimgb_alg *c) |
|
static BOOLEAN | lies_in_last_dp_block (poly p, slimgb_alg *c) |
|
static int | get_last_dp_block_start (ring r) |
|
static wlen_type | do_pELength (poly p, slimgb_alg *c, int dlm=-1) |
|
wlen_type | pELength (poly p, slimgb_alg *c, ring) |
|
wlen_type | kEBucketLength (kBucket *b, poly lm, slimgb_alg *ca) |
|
static int | pELength (poly p, slimgb_alg *c, int l) |
|
static wlen_type | pQuality (poly p, slimgb_alg *c, int l=-1) |
|
static int | pTotaldegree_full (poly p) |
|
static int | red_object_better_gen (const void *ap, const void *bp) |
|
int | tgb_pair_better_gen2 (const void *ap, const void *bp) |
|
int | kFindDivisibleByInS_easy (kStrategy strat, const red_object &obj) |
|
int | kFindDivisibleByInS_easy (kStrategy strat, poly p, long sev) |
|
static int | posInPairs (sorted_pair_node **p, int pn, sorted_pair_node *qe, slimgb_alg *c, int an=0) |
|
static BOOLEAN | ascending (int *i, int top) |
|
sorted_pair_node ** | spn_merge (sorted_pair_node **p, int pn, sorted_pair_node **q, int qn, slimgb_alg *c) |
|
static BOOLEAN | trivial_syzygie (int pos1, int pos2, poly bound, slimgb_alg *c) |
|
int | find_best (red_object *r, int l, int u, wlen_type &w, slimgb_alg *c) |
| returns position sets w as weight More...
|
|
BOOLEAN | good_has_t_rep (int i, int j, slimgb_alg *c) |
|
BOOLEAN | lenS_correct (kStrategy strat) |
|
static void | cleanS (kStrategy strat, slimgb_alg *c) |
|
static void | length_one_crit (slimgb_alg *c, int pos, int len) |
|
static void | move_forward_in_S (int old_pos, int new_pos, kStrategy strat) |
|
static void | move_backward_in_S (int old_pos, int new_pos, kStrategy strat) |
|
static void | replace_pair (int &i, int &j, slimgb_alg *c) |
|
static void | add_later (poly p, const char *prot, slimgb_alg *c) |
|
static void | clearS (poly p, unsigned long p_sev, int l, int *at, int *k, kStrategy strat) |
|
static int | iq_crit (const void *ap, const void *bp) |
|
static wlen_type | coeff_mult_size_estimate (int s1, int s2, ring r) |
|
static wlen_type | pair_weighted_length (int i, int j, slimgb_alg *c) |
|
sorted_pair_node ** | add_to_basis_ideal_quotient (poly h, slimgb_alg *c, int *ip) |
|
static poly | redTailShort (poly h, kStrategy strat) |
|
static void | line_of_extended_prod (int fixpos, slimgb_alg *c) |
|
static void | c_S_element_changed_hook (int pos, slimgb_alg *c) |
|
BOOLEAN | is_valid_ro (red_object &ro) |
|
int | terms_sort_crit (const void *a, const void *b) |
|
static void | mass_add (poly *p, int pn, slimgb_alg *c) |
|
static void | go_on (slimgb_alg *c) |
|
void | init_with_mac_poly (tgb_sparse_matrix *mat, int row, mac_poly m) |
|
poly | free_row_to_poly (tgb_sparse_matrix *mat, int row, poly *monoms, int monom_index) |
|
static int | poly_crit (const void *ap1, const void *ap2) |
|
ideal | t_rep_gb (const ring r, ideal arg_I, int syz_comp, BOOLEAN F4_mode) |
|
ideal | do_t_rep_gb (ring, ideal arg_I, int syz_comp, BOOLEAN F4_mode, int deg_pos) |
|
void | now_t_rep (const int &arg_i, const int &arg_j, slimgb_alg *c) |
|
sorted_pair_node * | top_pair (slimgb_alg *c) |
|
sorted_pair_node * | quick_pop_pair (slimgb_alg *c) |
|
void | clean_top_of_pair_list (slimgb_alg *c) |
|
void | free_sorted_pair_node (sorted_pair_node *s, const ring r) |
|
static BOOLEAN | pHasNotCFExtended (poly p1, poly p2, poly m) |
|
static wlen_type | quality_of_pos_in_strat_S (int pos, slimgb_alg *c) |
|
static wlen_type | quality_of_pos_in_strat_S_mult_high (int pos, poly high, slimgb_alg *c) |
|
static void | multi_reduction_lls_trick (red_object *los, int, slimgb_alg *c, find_erg &erg) |
|
static int | fwbw (red_object *los, int i) |
|
static void | canonicalize_region (red_object *los, int l, int u, slimgb_alg *) |
|
static void | multi_reduction_find (red_object *los, int, slimgb_alg *c, int startf, find_erg &erg) |
|
static int | multi_reduction_clear_zeroes (red_object *los, int losl, int l, int u) |
|
int | search_red_object_pos (red_object *a, int top, red_object *key) |
|
static void | sort_region_down (red_object *los, int l, int u, slimgb_alg *) |
|
◆ ADD_LATER_SIZE
#define ADD_LATER_SIZE 500 |
◆ BUCKETS_FOR_NORO_RED
#define BUCKETS_FOR_NORO_RED 1 |
@TODO: delay nur auf Sugarvergroesserung @TODO: grade aus ecartS, setze dazu strat->honey; und nutze p.ecart @TODO: no tail reductions in syz comp
Definition at line 34 of file tgb.cc.
◆ degbound
◆ ENLARGE
#define ENLARGE |
( |
|
pointer, |
|
|
|
type |
|
) |
| pointer=(type*) omrealloc(pointer, c->array_lengths*sizeof(type)) |
◆ ENLARGE_ALIGN
#define ENLARGE_ALIGN |
( |
|
pointer, |
|
|
|
type |
|
) |
| |
◆ LEN_VAR3
◆ SR_HDL
#define SR_HDL |
( |
|
A | ) |
((long)(A)) |
◆ add_later()
◆ add_to_basis_ideal_quotient()
Definition at line 1426 of file tgb.cc.
1452 #define ENLARGE(pointer, type) pointer=(type*) omrealloc(pointer, c->array_lengths*sizeof(type))
1454 #define ENLARGE_ALIGN(pointer, type) {if(pointer)\
1455 pointer=(type*)omReallocAligned(pointer, c->array_lengths*sizeof(type));\
1456 else pointer=(type*)omAllocAligned(c->array_lengths*sizeof(type));}
1478 #ifndef USE_STDVECBOOL
1496 ecart = sugar - c->
T_deg[
i];
1518 c->
states.push_back (dynamic_bitset <> (
i));
1521 #ifdef USE_STDVECBOOL
1523 c->
states.push_back (vector < bool > (
i));
1537 #undef ENLARGE_ALIGN
1540 for(
j = 0;
j <
i;
j++)
1697 for(upper = lower + 1; upper < spc; upper++)
1699 if(!
pLmEqual (nodes[lower]->lcm_of_lm, nodes[upper]->lcm_of_lm))
1703 if(
has_t_rep (nodes[upper]->
i, nodes[upper]->
j, c))
1709 for(z = 0; z < spc_final; z++)
1712 (nodes_final[z]->lcm_of_lm, nodes[lower]->lcm_of_lm, c->
r))
1721 for(; lower <= upper; lower++)
1725 nodes[lower] =
NULL;
1732 p_Test (nodes[lower]->lcm_of_lm, c->
r);
1736 nodes_final[spc_final] =
1739 *(nodes_final[spc_final++]) = *(nodes[lower]);
1741 nodes[lower] =
NULL;
1742 for(lower = lower + 1; lower <= upper; lower++)
1746 nodes[lower] =
NULL;
1755 assume (spc_final <= spc);
1790 m_iLastAltVar - m_iFirstAltVar + 1;
1793 poly *array_arg = (poly *)
omalloc (
N *
sizeof (poly));
1797 for(
unsigned short v = m_iFirstAltVar;
v <= m_iLastAltVar;
v++)
1815 #endif // if SCAlgebra
◆ add_to_reductors()
Definition at line 965 of file tgb.cc.
978 memset (&P, 0,
sizeof (P));
982 P.FDeg = c->
r->pFDeg (P.p, c->
r);
◆ ascending()
static BOOLEAN ascending |
( |
int * |
i, |
|
|
int |
top |
|
) |
| |
|
static |
Definition at line 742 of file tgb.cc.
746 if(
i[top] <
i[top - 1])
◆ bucket_guess()
static int bucket_guess |
( |
kBucket * |
bucket | ) |
|
|
static |
Definition at line 952 of file tgb.cc.
956 for(
i = bucket->buckets_used;
i >= 0;
i--)
958 if(bucket->buckets[
i])
959 sum += bucket->buckets_length[
i];
◆ c_S_element_changed_hook()
static void c_S_element_changed_hook |
( |
int |
pos, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
static |
◆ canonicalize_region()
◆ clean_top_of_pair_list()
◆ cleanS()
Definition at line 919 of file tgb.cc.
923 while(i <= strat->sl)
926 P.sev = strat->
sevS[
i];
935 for(
j = 0;
j < c->
n;
j++)
937 if(c->
S->m[
j] == P.p)
◆ clearS()
static void clearS |
( |
poly |
p, |
|
|
unsigned long |
p_sev, |
|
|
int |
l, |
|
|
int * |
at, |
|
|
int * |
k, |
|
|
kStrategy |
strat |
|
) |
| |
|
inlinestatic |
◆ coeff_mult_size_estimate()
static wlen_type coeff_mult_size_estimate |
( |
int |
s1, |
|
|
int |
s2, |
|
|
ring |
r |
|
) |
| |
|
static |
◆ do_pELength()
◆ do_t_rep_gb()
ideal do_t_rep_gb |
( |
ring |
, |
|
|
ideal |
arg_I, |
|
|
int |
syz_comp, |
|
|
BOOLEAN |
F4_mode, |
|
|
int |
deg_pos |
|
) |
| |
◆ elength_is_normal_length()
◆ extended_product_criterion()
static BOOLEAN extended_product_criterion |
( |
poly |
p1, |
|
|
poly |
gcd1, |
|
|
poly |
p2, |
|
|
poly |
gcd2, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
inlinestatic |
◆ find_best()
returns position sets w as weight
Definition at line 854 of file tgb.cc.
859 for(
i =
l + 1;
i <= u;
i++)
◆ free_row_to_poly()
poly free_row_to_poly |
( |
tgb_sparse_matrix * |
mat, |
|
|
int |
row, |
|
|
poly * |
monoms, |
|
|
int |
monom_index |
|
) |
| |
Definition at line 3064 of file tgb.cc.
3068 poly *set_this = &
p;
3073 (*set_this) =
pLmInit (monoms[monom_index - 1 - r->
exp]);
3075 set_this = &((*set_this)->next);
◆ free_sorted_pair_node()
◆ fwbw()
Definition at line 4387 of file tgb.cc.
4399 step =
si_min (i2, step);
4411 if((!incr) && (step == 1))
4436 step = (step + 1) / 2;
◆ gcd_of_terms()
static poly gcd_of_terms |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
|
static |
Definition at line 3983 of file tgb.cc.
4003 for(
i = max_g_0;
i;
i--)
4009 if((max_g_0 == 0) && (
pGetExp (
m,
i) > 0))
◆ get_last_dp_block_start()
static int get_last_dp_block_start |
( |
ring |
r | ) |
|
|
static |
Definition at line 427 of file tgb.cc.
442 return r->block0[last_block];
◆ go_on()
Definition at line 2678 of file tgb.cc.
2690 for(
i = 0;
i < c->
n;
i++)
2702 poly *
p = (poly *)
omAlloc ((max_pairs + 1) *
sizeof (poly));
2705 while(
i < max_pairs)
2714 if(
s->deg > curr_deg)
2760 if((!c->
nc) & (!(use_noro)))
2780 #ifdef TGB_RESORT_PAIRS
2781 c->replaced =
new bool[c->
n];
2831 for(
j = 0;
j <
i;
j++)
2840 buf[
j].initial_quality =
buf[
j].guess_quality (c);
2848 Print (
"%dM[%d,", curr_deg,
i);
2852 #ifdef TGB_RESORT_PAIRS
2863 if((c->replaced[c->
apairs[e]->
i]) || (c->replaced[c->
apairs[e]->
j]))
2876 for(
k = 0;
k <
i;
k++)
2880 for(k2 = 0; k2 <
i; k2++)
2896 poly *add_those = (poly *)
omalloc (
i *
sizeof (poly));
2897 for(
j = 0;
j <
i;
j++)
2927 #ifdef TGB_RESORT_PAIRS
◆ good_has_t_rep()
Definition at line 876 of file tgb.cc.
893 for(
int n = 0; ((n < c->
n) && (i_con[n] >= 0)); n++)
◆ has_t_rep()
◆ init_with_mac_poly()
◆ iq_crit()
static int iq_crit |
( |
const void * |
ap, |
|
|
const void * |
bp |
|
) |
| |
|
static |
◆ is_valid_ro()
◆ kEBucketLength()
Definition at line 494 of file tgb.cc.
516 for(
i =
b->buckets_used;
i >= 0;
i--)
524 s +=
b->buckets_length[
i];
◆ kFindDivisibleByInS_easy() [1/2]
Definition at line 685 of file tgb.cc.
689 long not_sev = ~obj.
sev;
690 for(
int i = 0;
i <= strat->
sl;
i++)
◆ kFindDivisibleByInS_easy() [2/2]
int kFindDivisibleByInS_easy |
( |
kStrategy |
strat, |
|
|
poly |
p, |
|
|
long |
sev |
|
) |
| |
Definition at line 698 of file tgb.cc.
702 for(
int i = 0;
i <= strat->
sl;
i++)
◆ kSBucketLength()
TODO CoefBuckets bercksichtigen.
Definition at line 221 of file tgb.cc.
240 for(
i =
b->buckets_used;
i >= 0;
i--)
243 s +=
b->buckets_length[
i] ;
245 #ifdef HAVE_COEF_BUCKETS
247 if(
b->coef[0] !=
NULL)
◆ length_one_crit()
static void length_one_crit |
( |
slimgb_alg * |
c, |
|
|
int |
pos, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 1005 of file tgb.cc.
1012 for(
i = 0;
i < pos;
i++)
1017 for(
i = pos + 1;
i < c->
n;
i++)
◆ lenS_correct()
Definition at line 907 of file tgb.cc.
910 for(
i = 0;
i <= strat->
sl;
i++)
◆ lies_in_last_dp_block()
◆ line_of_extended_prod()
static void line_of_extended_prod |
( |
int |
fixpos, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
static |
Definition at line 1939 of file tgb.cc.
1947 for(
i = 0;
i < fixpos;
i++)
1957 for(
i = fixpos + 1;
i < c->
n;
i++)
◆ make_connections()
static int * make_connections |
( |
int |
from, |
|
|
int |
to, |
|
|
poly |
bound, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
static |
Definition at line 1101 of file tgb.cc.
1104 int *cans = (
int *)
omAlloc (c->
n * sizeof (
int));
1105 int *connected = (
int *)
omAlloc (c->
n * sizeof (
int));
1107 int cans_length = 1;
1108 connected[0] = from;
1109 int last_cans_pos = -1;
1110 int connected_length = 1;
1113 int not_yet_found = cans_length;
1114 int con_checked = 0;
1119 if((con_checked < connected_length) && (not_yet_found > 0))
1121 pos = connected[con_checked];
1122 for(
int i = 0;
i < cans_length;
i++)
1131 connected[connected_length] = cans[
i];
1136 if(connected[connected_length - 1] == to)
1138 if(connected_length < c->n)
1140 connected[connected_length] = -1;
1151 for(last_cans_pos++; last_cans_pos <= c->
n; last_cans_pos++)
1153 if(last_cans_pos == c->
n)
1155 if(connected_length < c->n)
1157 connected[connected_length] = -1;
1162 if((last_cans_pos == from) || (last_cans_pos == to))
1166 neg_bounds_short, c->
r))
1168 cans[cans_length] = last_cans_pos;
1174 for(
int i = 0;
i < con_checked;
i++)
1176 if(
has_t_rep (connected[
i], last_cans_pos, c))
1178 connected[connected_length] = last_cans_pos;
1180 cans[cans_length - 1] = -1;
1182 if(connected[connected_length - 1] == to)
1184 if(connected_length < c->n)
1186 connected[connected_length] = -1;
1196 if(connected_length < c->n)
1198 connected[connected_length] = -1;
◆ mass_add()
static void mass_add |
( |
poly * |
p, |
|
|
int |
pn, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
static |
Definition at line 2145 of file tgb.cc.
2148 int *ibuf = (
int *)
omalloc (pn *
sizeof (
int));
2151 for(
j = 0;
j < pn;
j++)
2157 for(
j = 0;
j < pn;
j++)
2164 for(
j = 0;
j < pn;
j++)
2166 memmove (big_sbuf + partsum, sbuf[
j],
◆ monomial_root()
static BOOLEAN monomial_root |
( |
poly |
m, |
|
|
ring |
r |
|
) |
| |
|
static |
◆ move_backward_in_S()
static void move_backward_in_S |
( |
int |
old_pos, |
|
|
int |
new_pos, |
|
|
kStrategy |
strat |
|
) |
| |
|
static |
Definition at line 1064 of file tgb.cc.
1066 assume (old_pos <= new_pos);
1067 poly
p = strat->
S[old_pos];
1068 int ecart = strat->
ecartS[old_pos];
1069 long sev = strat->
sevS[old_pos];
1070 int s_2_r = strat->
S_2_R[old_pos];
1075 length_w = strat->
lenSw[old_pos];
1077 for(
i = old_pos;
i < new_pos;
i++)
1079 strat->
S[
i] = strat->
S[
i + 1];
1085 for(
i = old_pos;
i < new_pos;
i++)
1088 for(
i = old_pos;
i < new_pos;
i++)
1091 strat->
S[new_pos] =
p;
1092 strat->
ecartS[new_pos] = ecart;
1093 strat->
sevS[new_pos] = sev;
1094 strat->
S_2_R[new_pos] = s_2_r;
1097 strat->
lenSw[new_pos] = length_w;
◆ move_forward_in_S()
static void move_forward_in_S |
( |
int |
old_pos, |
|
|
int |
new_pos, |
|
|
kStrategy |
strat |
|
) |
| |
|
static |
Definition at line 1027 of file tgb.cc.
1029 assume (old_pos >= new_pos);
1030 poly
p = strat->
S[old_pos];
1031 int ecart = strat->
ecartS[old_pos];
1032 long sev = strat->
sevS[old_pos];
1033 int s_2_r = strat->
S_2_R[old_pos];
1038 length_w = strat->
lenSw[old_pos];
1040 for(
i = old_pos;
i > new_pos;
i--)
1042 strat->
S[
i] = strat->
S[
i - 1];
1048 for(
i = old_pos;
i > new_pos;
i--)
1051 for(
i = old_pos;
i > new_pos;
i--)
1054 strat->
S[new_pos] =
p;
1055 strat->
ecartS[new_pos] = ecart;
1056 strat->
sevS[new_pos] = sev;
1057 strat->
S_2_R[new_pos] = s_2_r;
1060 strat->
lenSw[new_pos] = length_w;
◆ multi_reduce_step()
Definition at line 4896 of file tgb.cc.
4936 work_on_copy =
TRUE;
4973 int reducer_deg = 0;
4986 reducer_deg = lm_deg + ecart;
4990 if((!work_on_copy) && (!erg.
fromS))
◆ multi_reduction()
Definition at line 4640 of file tgb.cc.
4642 poly *delay = (poly *)
omAlloc (losl *
sizeof (poly));
4650 for(
i = 0;
i < losl;
i++)
4655 if(los[
i].initial_quality > max_initial_quality)
4662 int curr_pos = losl - 1;
4666 while(curr_pos >= 0)
4671 int pn_noro = curr_pos + 1;
4672 poly *p_noro = (poly *)
omAlloc (pn_noro *
sizeof (poly));
4673 for(
i = 0;
i < pn_noro;
i++)
4696 for(
i = 0;
i < pn_noro;
i++)
4698 los[
i].
p = p_noro[
i];
4707 curr_pos -= deleted;
4733 assume (los[
i].initial_quality > 0);
4734 if(los[
i].guess_quality (c)
4740 if(los[
i].guess_quality (c) >
delay_factor * max_initial_quality)
4746 delay[delay_s] = los[
i].
p;
4761 curr_pos -= deleted;
4773 #ifdef FIND_DETERMINISTIC
◆ multi_reduction_clear_zeroes()
static int multi_reduction_clear_zeroes |
( |
red_object * |
los, |
|
|
int |
losl, |
|
|
int |
l, |
|
|
int |
u |
|
) |
| |
|
static |
Definition at line 4531 of file tgb.cc.
4545 memmove (los + (
int) (
last + 1 - deleted), los + (
last + 1),
4553 if((
last >= 0) && (
last != losl - 1))
4554 memmove (los + (
int) (
last + 1 - deleted), los +
last + 1,
◆ multi_reduction_find()
Definition at line 4457 of file tgb.cc.
4469 assume ((startf == losl - 1)
4470 || (
pLmCmp (los[startf].
p, los[startf + 1].
p) == -1));
4487 int i2 =
fwbw (los,
i);
4502 int i2 =
fwbw (los,
i);
◆ multi_reduction_lls_trick()
Definition at line 4127 of file tgb.cc.
4156 los[best].
p = los[best].
bucket->buckets[b_pos];
4157 qc =
pQuality (los[best].bucket->buckets[b_pos], c);
4187 assume (qc == los[best].guess_quality (c));
4192 los[best].
p = los[best].
bucket->buckets[b_pos];
4193 qc =
pQuality (los[best].bucket->buckets[b_pos], c);
4212 PrintS (
"Wrong wlen_type");
4218 los[best].
p = los[best].
bucket->buckets[b_pos];
4219 qc =
pQuality (los[best].bucket->buckets[b_pos], c);
4231 if(qc < quality_a / 2)
4285 while((il > 0) &&
pLmEqual (los[il - 1].
p, los[il].
p))
4307 clear_into = los[bp].
p;
4319 for(z = c->
n; z; z--)
4321 if(
p == c->
S->m[z - 1])
4332 #ifdef TGB_RESORT_PAIRS
4334 c->replaced[pos_in_c] =
TRUE;
4337 c->
S->m[pos_in_c] = clear_into;
4338 c->
lengths[pos_in_c] = new_length;
4370 #ifdef FIND_DETERMINISTIC
◆ now_t_rep()
◆ p_Init_Special()
static poly p_Init_Special |
( |
const ring |
r | ) |
|
|
inlinestatic |
◆ pair_better()
Definition at line 3924 of file tgb.cc.
3940 if(a->
i + a->
j <
b->i +
b->j)
3942 if(a->
i + a->
j >
b->i +
b->j)
◆ pair_weighted_length()
Definition at line 1373 of file tgb.cc.
1388 res *= el1 + el2 - 2;
◆ pELength() [1/2]
static int pELength |
( |
poly |
p, |
|
|
slimgb_alg * |
c, |
|
|
int |
l |
|
) |
| |
|
inlinestatic |
◆ pELength() [2/2]
◆ pHasNotCFExtended()
static BOOLEAN pHasNotCFExtended |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
poly |
m |
|
) |
| |
|
inlinestatic |
◆ poly_crit()
static int poly_crit |
( |
const void * |
ap1, |
|
|
const void * |
ap2 |
|
) |
| |
|
static |
Definition at line 3084 of file tgb.cc.
3087 p1 = *((poly *) ap1);
3088 p2 = *((poly *) ap2);
◆ polynomial_root()
static BOOLEAN polynomial_root |
( |
poly |
h, |
|
|
ring |
r |
|
) |
| |
|
static |
◆ pOne_Special()
◆ posInPairs()
◆ pQuality()
◆ pSLength()
◆ pTotaldegree_full()
static int pTotaldegree_full |
( |
poly |
p | ) |
|
|
inlinestatic |
◆ quality_of_pos_in_strat_S()
◆ quality_of_pos_in_strat_S_mult_high()
◆ quick_pop_pair()
◆ red_object_better_gen()
static int red_object_better_gen |
( |
const void * |
ap, |
|
|
const void * |
bp |
|
) |
| |
|
static |
◆ redNF2()
static poly redNF2 |
( |
poly |
h, |
|
|
slimgb_alg * |
c, |
|
|
int & |
len, |
|
|
number & |
m, |
|
|
int |
n = 0 |
|
) |
| |
|
static |
Definition at line 1837 of file tgb.cc.
1852 P.SetShortExpVector ();
1867 if((
j >= 0) && ((!n) ||
1868 ((strat->
lenS[
j] <= n) &&
1885 number m2 =
nMult (
m, coef);
1899 P.SetShortExpVector ();
◆ redNFTail()
static poly redNFTail |
( |
poly |
h, |
|
|
const int |
sl, |
|
|
kStrategy |
strat, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 2937 of file tgb.cc.
2964 P.SetShortExpVector ();
3009 P.SetShortExpVector ();
◆ redTailShort()
static poly redTailShort |
( |
poly |
h, |
|
|
kStrategy |
strat |
|
) |
| |
|
static |
Definition at line 1920 of file tgb.cc.
1930 for(
i = 0;
i <= strat->
sl;
i++)
1932 if((strat->
lenS[
i] > 2)
◆ replace_pair()
static void replace_pair |
( |
int & |
i, |
|
|
int & |
j, |
|
|
slimgb_alg * |
c |
|
) |
| |
|
static |
Definition at line 1215 of file tgb.cc.
1228 for(
int n = 0; ((n < c->
n) && (i_con[n] >= 0)); n++)
1259 sugar +=
si_max (t_i, t_j);
1263 for(
int m = 0; ((
m < c->
n) && (i_con[
m] >= 0));
m++)
1274 for(
int m = 0; ((
m < c->
n) && (j_con[
m] >= 0));
m++)
◆ search_red_object_pos()
◆ shorten_tails()
static void shorten_tails |
( |
slimgb_alg * |
c, |
|
|
poly |
monom |
|
) |
| |
|
static |
Definition at line 3677 of file tgb.cc.
3681 for(
int i = 0;
i < c->
n;
i++)
3687 poly tail = c->
S->m[
i]->next;
3688 poly prev = c->
S->m[
i];
3690 while((tail !=
NULL) && (
pLmCmp (tail, monom) >= 0))
3694 did_something =
TRUE;
3695 prev->next = tail->next;
3714 for(
int z = 0; z <= c->
strat->
sl; z++)
3723 for(
int z = new_pos - 1; z >= 0; z--)
3732 assume (new_pos <= old_pos);
3737 if(new_pos < old_pos)
◆ simple_posInS()
◆ simplify_poly()
static void simplify_poly |
( |
poly |
p, |
|
|
ring |
r |
|
) |
| |
|
static |
◆ slim_nsize()
int slim_nsize |
( |
number |
n, |
|
|
ring |
r |
|
) |
| |
◆ sort_region_down()
Definition at line 4584 of file tgb.cc.
4586 int r_size = u -
l + 1;
4589 int *new_indices = (
int *)
omalloc ((r_size) *
sizeof (int));
4592 for(
i =
l;
i <= u;
i++)
4603 new_indices[
i -
l] =
l;
4608 for(
int i = 0;
i < r_size;
i++)
4610 new_indices[
i] +=
i;
4611 los_region[
i] = los[
l +
i];
4612 assume ((
i == 0) || (new_indices[
i] > new_indices[
i - 1]));
4620 if(new_indices[
i] ==
j)
4622 los[
j] = los_region[
i];
◆ spn_merge()
Definition at line 751 of file tgb.cc.
755 int *a = (
int *)
omalloc (qn *
sizeof (
int));
770 for(
i = 0;
i < qn;
i++)
785 for(
i = qn - 1;
i >= 0;
i--)
792 memmove (
p + a[
i] + (1 +
i),
p + a[
i],
size);
◆ state_is()
Definition at line 3897 of file tgb.cc.
3910 return (c->
states[arg_i][arg_j] == state);
3913 return (c->
states[arg_j][arg_i] == state);
◆ super_clean_top_of_pair_list()
static void super_clean_top_of_pair_list |
( |
slimgb_alg * |
c | ) |
|
|
static |
◆ t_rep_gb()
ideal t_rep_gb |
( |
const ring |
r, |
|
|
ideal |
arg_I, |
|
|
int |
syz_comp, |
|
|
BOOLEAN |
F4_mode |
|
) |
| |
Definition at line 3520 of file tgb.cc.
3527 if(orig_ring != new_ring)
3544 s_h =
id_Copy (arg_I, orig_ring);
3548 ideal s_result =
do_t_rep_gb (new_ring, s_h, syz_comp, F4_mode, pos);
3550 if(orig_ring != new_ring)
◆ terms_sort_crit()
int terms_sort_crit |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
Definition at line 2030 of file tgb.cc.
2032 return -
pLmCmp (*((poly *) a), *((poly *)
b));
◆ tgb_pair_better_gen()
static int tgb_pair_better_gen |
( |
const void * |
ap, |
|
|
const void * |
bp |
|
) |
| |
|
static |
Definition at line 3951 of file tgb.cc.
3972 if(a->
i + a->
j <
b->i +
b->j)
3974 if(a->
i + a->
j >
b->i +
b->j)
◆ tgb_pair_better_gen2()
int tgb_pair_better_gen2 |
( |
const void * |
ap, |
|
|
const void * |
bp |
|
) |
| |
◆ top_pair()
◆ trivial_syzygie()
Definition at line 800 of file tgb.cc.
802 poly p1 = c->
S->m[pos1];
803 poly p2 = c->
S->m[pos2];
812 if((gcd1 !=
NULL) && (gcd2 !=
NULL))
◆ bundle_size
const int bundle_size = 100 |
|
static |
◆ bundle_size_noro
const int bundle_size_noro = 10000 |
|
static |
◆ delay_factor
const int delay_factor = 3 |
|
static |
◆ lm_bin
static int si_min(const int a, const int b)
BOOLEAN rRing_has_CompLastBlock(ring r)
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
unsigned long pTotaldegree(poly p)
int kFindDivisibleByInS_easy(kStrategy strat, const red_object &obj)
#define pGetComp(p)
Component.
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 void simplify_poly(poly p, ring r)
void pNorm(poly p, const ring R=currRing)
void introduceDelayedPairs(poly *pa, int s)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
#define pHasNotCF(p1, p2)
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
static BOOLEAN elength_is_normal_length(poly p, slimgb_alg *c)
sorted_pair_node ** apairs
void free_sorted_pair_node(sorted_pair_node *s, const ring r)
template void noro_step< tgb_uint16 >(poly *p, int &pn, slimgb_alg *c)
static poly pOne_Special(const ring r=currRing)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
void bit_reduce(poly &f, ring r)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
static BOOLEAN polynomial_root(poly h, ring r)
#define pGetExp(p, i)
Exponent.
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
void pEnlargeSet(poly **p, int l, int increment)
sorted_pair_node ** tmp_spn
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
static wlen_type pair_weighted_length(int i, int j, slimgb_alg *c)
BOOLEAN use_noro_last_block
wlen_type * weighted_lengths
static void replace_pair(int &i, int &j, slimgb_alg *c)
static BOOLEAN length(leftv result, leftv arg)
static BOOLEAN lies_in_last_dp_block(poly p, slimgb_alg *c)
static FORCE_INLINE int nlQlogSize(number n, const coeffs r)
only used by slimgb (tgb.cc)
void now_t_rep(const int &arg_i, const int &arg_j, slimgb_alg *c)
int pTotaldegree_full(poly p)
#define __p_GetComp(p, r)
void clean_top_of_pair_list(slimgb_alg *c)
static wlen_type do_pELength(poly p, slimgb_alg *c, int dlm=-1)
static int tgb_pair_better_gen(const void *ap, const void *bp)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
static BOOLEAN has_t_rep(const int &arg_i, const int &arg_j, slimgb_alg *state)
const poly kBucketGetLm(kBucket_pt bucket)
static poly redNFTail(poly h, const int sl, kStrategy strat, int len)
const CanonicalForm CFMap CFMap & N
static int * make_connections(int from, int to, poly bound, slimgb_alg *c)
static BOOLEAN pHasNotCFExtended(poly p1, poly p2, poly m)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
int_pair_node * soon_free
static void multi_reduction(red_object *los, int &losl, slimgb_alg *c)
int search_red_object_pos(red_object *a, int top, red_object *key)
#define __p_Mult_nn(p, n, r)
static int red_object_better_gen(const void *ap, const void *bp)
sorted_pair_node * top_pair(slimgb_alg *c)
int find_best(red_object *r, int l, int u, wlen_type &w, slimgb_alg *c)
returns position sets w as weight
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
void cleanDegs(int lower, int upper)
static long pTotaldegree(poly p)
#define p_LmEqual(p1, p2, 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
ideal do_t_rep_gb(ring, ideal arg_I, int syz_comp, BOOLEAN F4_mode, int deg_pos)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
static poly p_Copy(poly p, const ring r)
returns a copy of p
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static short rVar(const ring r)
#define rVar(r) (r->N)
poly kBucketExtractLm(kBucket_pt bucket)
static wlen_type quality_of_pos_in_strat_S_mult_high(int pos, poly high, slimgb_alg *c)
#define TEST_OPT_INTSTRATEGY
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
static void add_later(poly p, const char *prot, slimgb_alg *c)
int tgb_pair_better_gen2(const void *ap, const void *bp)
void kBucketDestroy(kBucket_pt *bucket_pt)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
static BOOLEAN monomial_root(poly m, ring r)
int status int void * buf
void PrintS(const char *s)
wlen_type pELength(poly p, slimgb_alg *c, ring)
static poly redNF2(poly h, slimgb_alg *c, int &len, number &m, int n=0)
static void length_one_crit(slimgb_alg *c, int pos, int len)
#define pExpVectorDiff(pr, p1, p2)
static void multi_reduction_lls_trick(red_object *los, int, slimgb_alg *c, find_erg &erg)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
static short scaFirstAltVar(ring r)
static void super_clean_top_of_pair_list(slimgb_alg *c)
static wlen_type coeff_mult_size_estimate(int s1, int s2, ring r)
static int posInPairs(sorted_pair_node **p, int pn, sorted_pair_node *qe, slimgb_alg *c, int an=0)
#define omrealloc(addr, size)
ring rAssure_TDeg(ring r, int &pos)
BOOLEAN is_valid_ro(red_object &ro)
int pos_helper(kStrategy strat, poly p, len_type len, set_type setL, polyset set)
poly p_Cleardenom(poly p, const ring r)
int extended_product_crit
static const int delay_factor
static int multi_reduction_clear_zeroes(red_object *los, int losl, int l, int u)
static BOOLEAN trivial_syzygie(int pos1, int pos2, poly bound, slimgb_alg *c)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static void c_S_element_changed_hook(int pos, slimgb_alg *c)
static poly p_Init(const ring r, omBin bin)
static void go_on(slimgb_alg *c)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
static int rBlocks(ring r)
#define pExpVectorSub(p1, p2)
#define ENLARGE(pointer, type)
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
static wlen_type quality_of_pos_in_strat_S(int pos, slimgb_alg *c)
static void mass_add(poly *p, int pn, slimgb_alg *c)
static void cleanS(kStrategy strat, slimgb_alg *c)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
static int simple_posInS(kStrategy strat, poly p, int len, wlen_type wlen)
gmp_float exp(const gmp_float &a)
void rDelete(ring r)
unconditionally deletes fields in r
BOOLEAN good_has_t_rep(int i, int j, slimgb_alg *c)
static void p_Delete(poly *p, const ring r)
sorted_pair_node ** spn_merge(sorted_pair_node **p, int pn, sorted_pair_node **q, int qn, slimgb_alg *c)
sorted_pair_node * quick_pop_pair(slimgb_alg *c)
static BOOLEAN state_is(calc_state state, const int &i, const int &j, slimgb_alg *c)
static const int bundle_size
#define TEST_V_MODPSOLVSB
wlen_type initial_quality
virtual void reduce(red_object *r, int l, int u)
we assume hat all occuring red_objects have same lm, and all occ. lm's in r[l...u] are the same,...
wlen_type guess_quality(slimgb_alg *c)
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
static wlen_type pSLength(poly p, int l)
static void line_of_extended_prod(int fixpos, slimgb_alg *c)
static wlen_type pQuality(poly p, slimgb_alg *c, int l=-1)
sorted_pair_node ** add_to_basis_ideal_quotient(poly h, slimgb_alg *c, int *ip)
static short scaLastAltVar(ring r)
static void multi_reduction_find(red_object *los, int, slimgb_alg *c, int startf, find_erg &erg)
static int add_to_reductors(slimgb_alg *c, poly h, int len, int ecart, BOOLEAN simplified=FALSE)
static int poly_crit(const void *ap1, const void *ap2)
static int bucket_guess(kBucket *bucket)
#define ENLARGE_ALIGN(pointer, type)
static int fwbw(red_object *los, int i)
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
static int iq_crit(const void *ap, const void *bp)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
BOOLEAN lenS_correct(kStrategy strat)
static void canonicalize_region(red_object *los, int l, int u, slimgb_alg *)
int slim_nsize(number n, ring r)
static void sort_region_down(red_object *los, int l, int u, slimgb_alg *)
static void p_Setm(poly p, const ring r)
static BOOLEAN pair_better(sorted_pair_node *a, sorted_pair_node *b, slimgb_alg *c=NULL)
const Variable & v
< [in] a sqrfree bivariate poly
#define TEST_OPT_REDTHROUGH
BOOLEAN eliminationProblem
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
const CanonicalForm int s
static poly p_Init_Special(const ring r)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
template void noro_step< tgb_uint8 >(poly *p, int &pn, slimgb_alg *c)
int syz_comp
array_lengths should be greater equal n;
#define pCopy(p)
return a copy of the poly
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
ideal id_Copy(ideal h1, const ring r)
copy an ideal
void deleteInS(int i, kStrategy strat)
void id_Compactify(ideal id, const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
CFArray copy(const CFList &list)
write elements of list into an array
wlen_type expected_length
static FORCE_INLINE int n_Size(number n, const coeffs r)
return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used fo...
ideal kInterRed(ideal F, ideal Q)
static bool rIsSCA(const ring r)
static void multi_reduce_step(find_erg &erg, red_object *r, slimgb_alg *c)
unsigned long p_GetShortExpVector(const poly p, const ring r)
static BOOLEAN rField_is_Zp(const ring r)
static void shorten_tails(slimgb_alg *c, poly monom)
static poly gcd_of_terms(poly p, ring r)
#define TEST_V_UPTORADICAL
static poly redTailShort(poly h, kStrategy strat)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
static void nc_kBucketPolyRed_Z(kBucket_pt b, poly p, number *c)
template void noro_step< tgb_uint32 >(poly *p, int &pn, slimgb_alg *c)
static void move_forward_in_S(int old_pos, int new_pos, kStrategy strat)
static const int bundle_size_noro
static BOOLEAN ascending(int *i, int top)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
static BOOLEAN rField_is_Q(const ring r)
static BOOLEAN extended_product_criterion(poly p1, poly gcd1, poly p2, poly gcd2, slimgb_alg *c)