source: git/Singular/tgb.h @ 634b60

spielwiese
Last change on this file since 634b60 was 634b60, checked in by Michael Brickenstein <bricken@…>, 21 years ago
* bricken: adding additional reductors feature to multired git-svn-id: file:///usr/local/Singular/svn/trunk@6518 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.2 KB
Line 
1#ifndef TGB_H
2#define TGB_H
3
4#include "mod2.h"
5#include <omalloc.h>
6#include "p_polys.h"
7
8#include "ideals.h"
9#include "ring.h"
10#include "febase.h"
11#include "structs.h"
12#include "polys.h"
13#include "stdlib.h"
14
15
16#include "kutil.h"
17#include "kInline.cc"
18#include "kstd1.h"
19#include "kbuckets.h"
20
21#define FULLREDUCTIONS
22//#define HALFREDUCTIONS
23//#define HEAD_BIN
24//#define HOMOGENEOUS_EXAMPLE
25#define REDTAIL_S
26
27//#define REDTAIL_PROT
28//#define QUICK_SPOLY_TEST
29
30
31struct int_pair_node{
32  int_pair_node* next;
33  int a;
34  int b;
35};
36struct red_object{
37  kBucket_pt bucket;
38  poly p;
39  unsigned long sev;
40};
41struct sorted_pair_node{
42  //criterium, which is stable 0. small lcm 1. small i 2. small j
43  int i;
44  int j;
45  int deg;
46  int expected_length;
47  poly lcm_of_lm;
48};
49
50
51enum calc_state
52  {
53    UNCALCULATED,
54    HASTREP,
55    UNIMPORTANT,
56    SOONTREP
57  };
58struct calc_dat
59{
60  int* rep;
61  char** states;
62  ideal S;
63  ring r;
64  int* lengths;
65  long* short_Exps;
66  kStrategy strat;
67  int* T_deg;
68  poly* gcd_of_terms;
69  int_pair_node* soon_free;
70  sorted_pair_node** apairs;
71#ifdef HEAD_BIN
72  struct omBin_s*   HeadBin;
73#endif
74  unsigned int reduction_steps;
75  int n;
76  int normal_forms;
77  int current_degree;
78  int Rcounter;
79  int last_index;
80  int max_pairs;
81  int pair_top;
82  int easy_product_crit;
83  int extended_product_crit;
84  BOOLEAN is_char0;
85};
86static int add_to_reductors(calc_dat* c, poly h, int len);
87static int bucket_guess(kBucket* bucket);
88static poly redNFTail (poly h,const int sl,kStrategy strat, int len);
89static poly redNF2 (poly h,calc_dat* c , int &len);
90static void free_sorted_pair_node(sorted_pair_node* s, ring r);
91static void shorten_tails(calc_dat* c, poly monom);
92static void replace_pair(int & i, int & j, calc_dat* c);
93static sorted_pair_node** add_to_basis(poly h, int i, int j,calc_dat* c, int* ip=NULL);
94static void do_this_spoly_stuff(int i,int j,calc_dat* c);
95ideal t_rep_gb(ring r,ideal arg_I);
96static BOOLEAN has_t_rep(const int & arg_i, const int & arg_j, calc_dat* state);
97static int* make_connections(int from, poly bound, calc_dat* c);
98static int* make_connections(int from, int to, poly bound, calc_dat* c);
99static void now_t_rep(const int & arg_i, const int & arg_j, calc_dat* c);
100static void soon_t_rep(const int & arg_i, const int & arg_j, calc_dat* c);
101static int pLcmDeg(poly a, poly b);
102static int simple_posInS (kStrategy strat, poly p,int len, BOOLEAN is_char0);
103static BOOLEAN find_next_pair(calc_dat* c, BOOLEAN go_higher=TRUE);
104
105static sorted_pair_node* pop_pair(calc_dat* c);
106static BOOLEAN no_pairs(calc_dat* c);
107static void clean_top_of_pair_list(calc_dat* c);
108static void super_clean_top_of_pair_list(calc_dat* c);
109static BOOLEAN state_is(calc_state state, const int & i, const int & j, calc_dat* c);
110static BOOLEAN pair_better(sorted_pair_node* a,sorted_pair_node* b, calc_dat* c);
111static int pair_better_gen(const void* ap,const void* bp);
112static poly redTailShort(poly h, kStrategy strat);
113static poly gcd_of_terms(poly p, ring r);
114static BOOLEAN extended_product_criterion(poly p1, poly gcd1, poly p2, poly gcd2, calc_dat* c);
115static poly kBucketGcd(kBucket* b, ring r);
116static void multi_reduction(red_object* los, int & losl, calc_dat* c);
117static sorted_pair_node* quick_pop_pair(calc_dat* c);
118static sorted_pair_node* top_pair(calc_dat* c);
119#endif
Note: See TracBrowser for help on using the repository browser.