My Project  UNKNOWN_GIT_VERSION
syzextra.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 /*****************************************************************************\
3  * Computer Algebra System SINGULAR
4 \*****************************************************************************/
5 /** @file syzextra.h
6  *
7  * Computation of Syzygies
8  *
9  * ABSTRACT: Computation of Syzygies due to Schreyer
10  *
11  * @author Oleksandr Motsak
12  *
13  **/
14 /*****************************************************************************/
15 
16 #ifndef SYZEXTRA_H
17 #define SYZEXTRA_H
18 
19 #include <vector>
20 #include <map>
21 #include <string.h>
22 #include <stack>
23 
24 // include basic definitions
25 #include "singularxx_defs.h"
26 #include "kernel/ideals.h"
27 
28 class idrec; typedef idrec * idhdl;
29 
30 class kBucket; typedef kBucket* kBucket_pt;
31 
32 #ifndef NOPRODUCT
33 # define NOPRODUCT 1
34 #endif
35 
36 // set to 1 if all leading coeffs are assumed to be all =1...
37 // note the use of simplify on input in SSinit!
38 #ifndef NODIVISION
39 # define NODIVISION 1
40 #endif
41 
42 poly leadmonom(const poly p, const ring r, const bool bSetZeroComp = true);
43 
44 /// return the tail of a given polynomial or vector
45 /// returns NULL if input is NULL, otherwise
46 /// the result is a new polynomial/vector in the ring r
47 poly p_Tail(const poly p, const ring r);
48 
49 
50 /// return the tail of a given ideal or module
51 /// returns NULL if input is NULL, otherwise
52 /// the result is a new ideal/module in the ring r
53 /// NOTE: the resulting rank is autocorrected
54 ideal id_Tail(const ideal id, const ring r);
55 
56 /// inplace sorting of the module (ideal) id wrt <_(c,ds)
57 void Sort_c_ds(const ideal id, const ring r);
58 
59 
60 class sBucket; typedef sBucket* sBucket_pt;
61 
62 /** @class SBucketFactory syzextra.h
63  *
64  * sBucket Factory
65  *
66  * Cleate/store/reuse buckets
67  *
68  */
69 class SBucketFactory: private std::stack <sBucket_pt>
70 {
71  private:
72  typedef std::stack <sBucket_pt> Base;
73 
74  public:
75  typedef Base::value_type Bucket;
76 
77  SBucketFactory(const ring r)
78  {
79  push ( _CreateBucket(r) ); // start with at least one sBucket...?
80  assume( top() != NULL );
81  };
82 
84  {
85  while( !empty() )
86  {
87  _DestroyBucket( top() );
88  pop();
89  }
90  }
91 
92  Bucket getBucket(const ring r, const bool remove = true)
93  {
94  Bucket bt = NULL;
95 
96  if( !empty() )
97  {
98  bt = top();
99 
100  if( remove )
101  pop();
102  }
103  else
104  {
105  bt = _CreateBucket(r);
106 
107  if( !remove )
108  {
109  push(bt);
110  assume( bt == top() );
111  }
112  }
113 
114  assume( bt != NULL );
115 
116  return bt;
117  }
118 
119  // TODO: this may be spared if we give-out a smart Bucket (which returns here upon its destructor!)
120  void putBucket(const Bucket & bt, const bool replace = false)
121  {
122  assume( bt != NULL );
123 
124  if( empty() )
125  push( bt );
126  else
127  {
128  if( replace )
129  top() = bt;
130  else
131  {
132  if( bt != top() )
133  push( bt );
134  }
135  }
136 
137  assume( bt == top() );
138  }
139 
140  private:
141  /// inital allocation for new buckets
142  static Bucket _CreateBucket(const ring r);
143 
144  /// we only expect empty buckets to be left at the end for destructor
145  /// bt will be set to NULL
146  static void _DestroyBucket(Bucket & bt);
147 
148  private:
149  SBucketFactory();
151  void operator=(const SBucketFactory&);
152 
153 };
154 
155 /// Computation attribute storage
157 {
159 
168  {}
169 
170  /// output all the intermediate states
171  const int OPT__DEBUG; // DebugOutput;
172 
173  /// ?
174  const int OPT__LEAD2SYZ; // TwoLeadingSyzygyTerms;
175 
176  /// Reduce syzygy tails wrt the leading syzygy terms
177  const int OPT__TAILREDSYZ; // TailReducedSyzygies;
178 
179  /// Use the usual NF's S-poly reduction while dropping lower order terms
180  /// 2 means - smart selection!
181  const int OPT__HYBRIDNF; // UseHybridNF
182 
183 
184  /// ignore tails and compute the pure Schreyer frame
185  const int OPT__IGNORETAILS; // @IGNORETAILS
186 
187  /// Syzygy level (within a resolution)
188  mutable int OPT__SYZNUMBER;
189 
190  inline void nextSyzygyLayer() const
191  {
192  OPT__SYZNUMBER++;
193  }
194 
195  /// output lifting tree
196  const int OPT__TREEOUTPUT;
197 
198  /// CheckSyzygyProperty: TODO
199  const int OPT__SYZCHECK;
200 
201  /// TEST_OPT_PROT
202  const bool OPT__PROT;
203 
204  /// no caching/stores/lookups
205  const int OPT__NOCACHING;
206 
207  /// global base ring
208  const ring m_rBaseRing;
209 };
210 
212 
213 class CLCM: public SchreyerSyzygyComputationFlags, public std::vector<bool>
214 {
215  public:
216  CLCM(const ideal& L, const SchreyerSyzygyComputationFlags& flags);
217 
218  bool Check(const poly m) const;
219 
220  private:
221  bool m_compute;
222 
223  const unsigned int m_N; ///< number of ring variables
224 };
225 
226 
228 {
229  public:
230  CLeadingTerm(unsigned int label, const poly lt, const ring);
231 
232 #if NOPRODUCT
233  bool DivisibilityCheck(const poly multiplier, const poly t, const unsigned long not_sev, const ring r) const;
234 #endif
235  bool DivisibilityCheck(const poly product, const unsigned long not_sev, const ring r) const;
236 
237  bool CheckLT( const ideal & L ) const;
238 
239  inline poly lt() const { return m_lt; };
240  inline unsigned long sev() const { return m_sev; };
241  inline unsigned int label() const { return m_label; };
242  private:
243  const unsigned long m_sev; ///< not short exp. vector
244 
245  // NOTE/TODO: either of the following should be enough:
246  const unsigned int m_label; ///< index in the main L[] + 1
247 
248  const poly m_lt; ///< the leading term itself L[label-1]
249 
250  // disable the following:
251  CLeadingTerm();
252  CLeadingTerm(const CLeadingTerm&);
253  void operator=(const CLeadingTerm&);
254 };
255 
256 
257 // TODO: needs a specialized variant without a component (hash!)
259 {
260 #if NOPRODUCT
261  friend class CDivisorEnumerator2;
262 #endif
263  friend class CDivisorEnumerator;
264 
265  public:
266  typedef long TComponentKey;
267  typedef std::vector<const CLeadingTerm*> TReducers;
268 
269  private:
270  typedef std::map< TComponentKey, TReducers> CReducersHash;
271 
272  public:
273  /// goes over all leading terms
274  CReducerFinder(const ideal L, const SchreyerSyzygyComputationFlags& flags);
275 
276  void Initialize(const ideal L);
277 
278  ~CReducerFinder();
279 
280 
281 #if NOPRODUCT
282  poly
283  FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder& checker) const;
284 
285 #endif
286  // TODO: save shortcut (syz: |-.->) LM(LM(m) * "t") -> syz?
287  poly // const_iterator // TODO: return const_iterator it, s.th: it->m_lt is the needed
288  FindReducer(const poly product, const poly syzterm, const CReducerFinder& checker) const;
289 
290  bool IsDivisible(const poly q) const;
291 
292 
293  inline bool IsNonempty() const { return !m_hash.empty(); }
294 
295  /// is the term to be "preprocessed" as lower order term or lead to only reducible syzygies...
296  int PreProcessTerm(const poly t, CReducerFinder& syzChecker) const;
297 
298  private:
299  ideal m_L; ///< only for debug
300 
301  CReducersHash m_hash; // can also be replaced with a vector indexed by components
302 
303  private:
305  void operator=(const CReducerFinder&);
306 };
307 
308 bool my_p_LmCmp (poly, poly, const ring);
309 
310 typedef poly TCacheKey;
311 typedef poly TCacheValue;
312 
314 {
315  const ring & m_ring;
316 
317  CCacheCompare();
318 
319  CCacheCompare(const ring& r): m_ring(r) { assume(r != NULL); }
320 
322  CCacheCompare& operator=(const CCacheCompare& lhs) { assume(lhs.m_ring != NULL); return (const_cast<CCacheCompare&>(lhs)); }
323 
324  inline bool operator() (const TCacheKey& l, const TCacheKey& r) const { assume(m_ring != NULL); return my_p_LmCmp(l, r, m_ring); }
325 };
326 
327 typedef std::map<TCacheKey, TCacheValue, CCacheCompare> TP2PCache; // deallocation??? !!!
328 typedef std::map<int, TP2PCache> TCache;
329 
330 
331 /** @class SchreyerSyzygyComputation syzextra.h
332  *
333  * Computing syzygies after Schreyer
334  *
335  * Storing/accumulating data during the computation requires some global
336  * object, like this class. Ideally the above global functions should not
337  * be used in favour of this class.
338  *
339  * @sa Schreyer Syzygy Computation Paper & Talk & Python prototype
340  */
342 {
343  friend class CLCM;
344  friend class CReducerFinder;
345 
346  public:
347  /// Construct a global object for given input data (separated into leads & tails)
348  SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting):
350  m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
352  m_LS(NULL), m_lcm(m_idLeads, setting),
353  m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
356  {
357  if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
358  }
359 
360  /// Construct a global object for given input data (separated into leads & tails)
361  SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const SchreyerSyzygyComputationFlags setting):
363  m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
364  m_syzLeads(syzLeads), m_syzTails(NULL),
365  m_LS(syzLeads), m_lcm(m_idLeads, setting),
366  m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
369  {
370  if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
371 
373  {
374  if (syzLeads != NULL)
375  m_checker.Initialize(syzLeads);
376 // if( idTails != NULL )
377 // SetUpTailTerms();
378  }
379  }
380 
381  /// Destructor should not destruct the resulting m_syzLeads, m_syzTails.
383 
384  /// Convert the given ideal of tails into the internal representation (with reducers!)
385  /// Preprocess m_idTails as well...?
386  void SetUpTailTerms();
387 
388  /// print statistics about the used heuristics
389  void PrintStats() const;
390 
391  /// Read off the results while detaching them from this object
392  /// NOTE: no copy!
393  inline void ReadOffResult(ideal& syzL, ideal& syzT)
394  {
395  syzL = m_syzLeads; syzT = m_syzTails;
396 
397  m_syzLeads = m_syzTails = NULL; // m_LS ?
398 
399  if ( UNLIKELY(OPT__PROT) )
400  PrintStats();
401  }
402 
403 
404  /// The main driver function: computes
405  void ComputeSyzygy();
406 
407  /// Computes Syz(leads) or only LEAD of it.
408  /// The result is stored into m_syzLeads
409  void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms = true);
410 
411 
412 
413  /// Main HybridNF == 1: poly reduce + LOT + LCM?
414  poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2 = NULL) const;
415 
416 
417  // Main (HybridNF == 0) Tree Travers + LOT + LCM?
418  poly TraverseNF(const poly syz_lead, const poly syz_2 = NULL) const;
419 
420  /// High level caching function!!!
421  poly TraverseTail(poly multiplier, const int tail) const;
422 
423  // REMOVE?
424  /// called only from above and from outside (for testing)
425  poly TraverseTail(poly multiplier, poly tail) const;
426 
427  /// TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
428  poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const;
429 
430  /// low level computation...
431  poly ComputeImage(poly multiplier, const int tail) const;
432 
433  public:
434  /// just for testing via the wrapper below
435  inline poly _FindReducer(const poly product, const poly syzterm) const
436  { return m_div.FindReducer(product, syzterm, m_checker); }
437  private:
438  void CleanUp();
439  protected:
440 
441 
442  /// just leading terms
444 
445  /// leading + second terms
447 
448 
449 
450  private:
451  /// input leading terms
452  const ideal m_idLeads;
453 
454  /// input tails
455  const ideal m_idTails;
456 
457  /// output (syzygy) leading terms (+2nd terms?)
458  ideal m_syzLeads;
459 
460  /// output (syzygy) tails
461  ideal m_syzTails;
462 
463  /*mutable?*/ ideal m_LS; ///< leading syzygy terms used for reducing syzygy tails
464 
465 
466  /// Bitmask for variables occuring in leading terms
467  const CLCM m_lcm;
468 
469  /// Divisor finder
471 
472  /// for checking tail-terms and makeing them irreducible (wrt m_LS!)
474 
475  mutable TCache m_cache; // cacher comp + poly -> poly! // mutable???
476 
477  /// used for simple summing up
478  mutable SBucketFactory m_sum_bucket_factory; // sBucket_pt
479 
480  /// for S-Polynomial reductions
481  mutable kBucket_pt m_spoly_bucket; // only used inside of SchreyerSyzygyNF! destruction by CleanUp()!
482 
483 
484  /// Statistics:
485  /// 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!??
486  /// 4: number of terms discarded due to LOT heuristics
487  /// 5: number of terms discarded due to LCM heuristics
488  /// 6, 7: lookups without & with rescale, 8: stores
489  mutable unsigned long m_stat[9];
490 };
491 
492 // The following wrappers are just for testing separate functions on highest level (within schreyer.lib)
493 
494 static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const SchreyerSyzygyComputationFlags A)
495 {
496  SchreyerSyzygyComputation syz(L, T, A);
497  syz.ComputeSyzygy();
498  syz.ReadOffResult(LL, TT);
499 }
500 
501 static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
502 {
504  syz.ComputeLeadingSyzygyTerms(false);
505  ideal LL, TT;
506  syz.ReadOffResult(LL, TT);
507  return LL; // assume TT is NULL!
508 }
509 
510 static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
511 {
513  syz.ComputeLeadingSyzygyTerms(true);
514  ideal LL, TT;
515  syz.ReadOffResult(LL, TT);
516  return LL; // assume TT is NULL!
517 }
518 
519 static inline poly FindReducer(poly product, poly syzterm,
520  ideal L, ideal LS, const SchreyerSyzygyComputationFlags A)
521 {
522  SchreyerSyzygyComputation syz(L, NULL, LS, A);
523  return syz._FindReducer(product, syzterm);
524 }
525 
526 static inline poly TraverseTail(poly multiplier, poly tail,
527  ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
528 {
529  SchreyerSyzygyComputation syz(L, T, LS, A);
530  return syz.TraverseTail(multiplier, tail);
531 }
532 
533 static inline poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck,
534  ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
535 {
536  SchreyerSyzygyComputation syz(L, T, LS, A);
537  return syz.ReduceTerm(multiplier, term4reduction, syztermCheck);
538 }
539 
540 
541 static inline poly SchreyerSyzygyNF(poly syz_lead, poly syz_2,
542  ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
543 {
544  SchreyerSyzygyComputation syz(L, T, LS, A);
545  return syz.SchreyerSyzygyNF(syz_lead, syz_2);
546 }
547 
548 #endif
549 /* #ifndef SYZEXTRA_H */
550 
551 // Vi-modeline: vim: filetype=c:syntax:shiftwidth=2:tabstop=8:textwidth=0:expandtab
552 
friend class CDivisorEnumerator2
Definition: syzextra.h:261
Computation attribute storage.
Definition: syzextra.h:156
sBucket * sBucket_pt
Definition: syzextra.h:60
static ideal Compute2LeadingSyzygyTerms(const ideal &L, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:510
CCacheCompare(const ring &r)
Definition: syzextra.h:319
SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const SchreyerSyzygyComputationFlags setting)
Construct a global object for given input data (separated into leads & tails)
Definition: syzextra.h:361
const unsigned int m_label
index in the main L[] + 1
Definition: syzextra.h:246
const ring & m_ring
Definition: syzextra.h:315
bool m_compute
Definition: syzextra.h:221
int OPT__SYZNUMBER
Syzygy level (within a resolution)
Definition: syzextra.h:188
static poly TraverseTail(poly multiplier, poly tail, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:526
poly TCacheValue
Definition: syzextra.h:311
std::stack< sBucket_pt > Base
Definition: syzextra.h:72
CCacheCompare(const CCacheCompare &lhs)
Definition: syzextra.h:321
static void ComputeSyzygy(const ideal L, const ideal T, ideal &LL, ideal &TT, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:494
Definition: attrib.h:17
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:458
#define LIKELY(X)
Definition: auxiliary.h:417
poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2=NULL) const
Main HybridNF == 1: poly reduce + LOT + LCM?
const int OPT__HYBRIDNF
Use the usual NF's S-poly reduction while dropping lower order terms 2 means - smart selection!
Definition: syzextra.h:181
const int OPT__SYZCHECK
CheckSyzygyProperty: TODO.
Definition: syzextra.h:199
const ideal m_idLeads
input leading terms
Definition: syzextra.h:452
SBucketFactory(const ring r)
Definition: syzextra.h:77
ideal id_Copy(ideal h1, const ring r)
copy an ideal
poly lt() const
Definition: syzextra.h:239
const poly m_lt
the leading term itself L[label-1]
Definition: syzextra.h:248
CReducerFinder(const ideal L, const SchreyerSyzygyComputationFlags &flags)
goes over all leading terms
std::vector< const CLeadingTerm * > TReducers
Definition: syzextra.h:267
friend class CDivisorEnumerator
Definition: syzextra.h:263
void Sort_c_ds(const ideal id, const ring r)
inplace sorting of the module (ideal) id wrt <_(c,ds)
poly leadmonom(const poly p, const ring r, const bool bSetZeroComp=true)
static poly SchreyerSyzygyNF(poly syz_lead, poly syz_2, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:541
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:463
unsigned long sev() const
Definition: syzextra.h:240
void PrintStats() const
print statistics about the used heuristics
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:461
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:481
long TComponentKey
Definition: syzextra.h:266
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:171
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:473
~SchreyerSyzygyComputation()
Destructor should not destruct the resulting m_syzLeads, m_syzTails.
Definition: syzextra.h:382
Bucket getBucket(const ring r, const bool remove=true)
Definition: syzextra.h:92
ideal Compute2LeadingSyzygyTerms()
leading + second terms
#define UNLIKELY(X)
Definition: auxiliary.h:418
Definition: idrec.h:34
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:177
CReducersHash m_hash
Definition: syzextra.h:301
void ComputeSyzygy()
The main driver function: computes.
poly TraverseNF(const poly syz_lead, const poly syz_2=NULL) const
static poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:533
kBucket * kBucket_pt
Definition: syzextra.h:30
CLCM(const ideal &L, const SchreyerSyzygyComputationFlags &flags)
#define assume(x)
Definition: mod2.h:390
bool CheckLT(const ideal &L) const
poly TCacheKey
Definition: syzextra.h:310
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:202
#define A
Definition: sirandom.c:23
bool DivisibilityCheck(const poly multiplier, const poly t, const unsigned long not_sev, const ring r) const
void operator=(const CLeadingTerm &)
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
void operator=(const CReducerFinder &)
void SetUpTailTerms()
Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTai...
void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms=true)
Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.
bool operator()(const TCacheKey &l, const TCacheKey &r) const
Definition: syzextra.h:324
int m
Definition: cfEzgcd.cc:121
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:470
ideal Compute1LeadingSyzygyTerms()
just leading terms
static poly FindReducer(poly product, poly syzterm, ideal L, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:519
void ReadOffResult(ideal &syzL, ideal &syzT)
Read off the results while detaching them from this object NOTE: no copy!
Definition: syzextra.h:393
void Initialize(const ideal L)
const unsigned int m_N
number of ring variables
Definition: syzextra.h:223
const unsigned long m_sev
not short exp. vector
Definition: syzextra.h:241
static void _DestroyBucket(Bucket &bt)
we only expect empty buckets to be left at the end for destructor bt will be set to NULL
std::map< int, TP2PCache > TCache
Definition: syzextra.h:328
poly p_Tail(const poly p, const ring r)
return the tail of a given polynomial or vector returns NULL if input is NULL, otherwise the result i...
Definition: syzextra.cc:42
bool Check(const poly m) const
Definition: syzextra.h:213
static Bucket _CreateBucket(const ring r)
inital allocation for new buckets
poly _FindReducer(const poly product, const poly syzterm) const
just for testing via the wrapper below
Definition: syzextra.h:435
sBucket Factory
Definition: syzextra.h:69
std::map< TComponentKey, TReducers > CReducersHash
Definition: syzextra.h:270
idrec * idhdl
Definition: syzextra.h:28
void operator=(const SBucketFactory &)
#define NULL
Definition: omList.c:10
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:196
poly ComputeImage(poly multiplier, const int tail) const
low level computation...
Base::value_type Bucket
Definition: syzextra.h:75
const ring m_rBaseRing
global base ring
Definition: syzextra.h:208
SBucketFactory m_sum_bucket_factory
used for simple summing up
Definition: syzextra.h:478
void putBucket(const Bucket &bt, const bool replace=false)
Definition: syzextra.h:120
ideal m_L
only for debug
Definition: syzextra.h:299
unsigned int label() const
Definition: syzextra.h:241
ideal id_Tail(const ideal id, const ring r)
return the tail of a given ideal or module returns NULL if input is NULL, otherwise the result is a n...
Definition: syzextra.cc:50
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:489
bool IsDivisible(const poly q) const
SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting)
Construct a global object for given input data (separated into leads & tails)
Definition: syzextra.h:348
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:185
CCacheCompare & operator=(const CCacheCompare &lhs)
Definition: syzextra.h:322
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:467
SchreyerSyzygyComputationFlags(const SchreyerSyzygyComputationFlags &attr)
Definition: syzextra.h:160
int p
Definition: cfModGcd.cc:4019
Computing syzygies after Schreyer.
Definition: syzextra.h:341
const ideal m_idTails
input tails
Definition: syzextra.h:455
static jList * T
Definition: janet.cc:31
int status int void size_t count int const void size_t count const char int flags
Definition: si_signals.h:73
int PreProcessTerm(const poly t, CReducerFinder &syzChecker) const
is the term to be "preprocessed" as lower order term or lead to only reducible syzygies....
bool my_p_LmCmp(poly, poly, const ring)
int l
Definition: cfEzgcd.cc:93
const int OPT__NOCACHING
no caching/stores/lookups
Definition: syzextra.h:205
bool IsNonempty() const
Definition: syzextra.h:293
static ideal ComputeLeadingSyzygyTerms(const ideal &L, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:501
std::map< TCacheKey, TCacheValue, CCacheCompare > TP2PCache
Definition: syzextra.h:327