42 poly
leadmonom(
const poly
p,
const ring r,
const bool bSetZeroComp =
true);
47 poly
p_Tail(
const poly
p,
const ring r);
54 ideal
id_Tail(
const ideal
id,
const ring r);
57 void Sort_c_ds(
const ideal
id,
const ring r);
72 typedef std::stack <sBucket_pt>
Base;
92 Bucket
getBucket(
const ring r,
const bool remove =
true)
120 void putBucket(
const Bucket & bt,
const bool replace =
false)
161 OPT__DEBUG(attr.OPT__DEBUG),
162 OPT__LEAD2SYZ(attr.OPT__LEAD2SYZ), OPT__TAILREDSYZ(attr.OPT__TAILREDSYZ),
163 OPT__HYBRIDNF(attr.OPT__HYBRIDNF), OPT__IGNORETAILS(attr.OPT__IGNORETAILS),
164 OPT__SYZNUMBER(attr.OPT__SYZNUMBER), OPT__TREEOUTPUT(attr.OPT__TREEOUTPUT),
165 OPT__SYZCHECK(attr.OPT__SYZCHECK), OPT__PROT(attr.OPT__PROT),
166 OPT__NOCACHING(attr.OPT__NOCACHING),
167 m_rBaseRing(attr.m_rBaseRing)
218 bool Check(
const poly
m)
const;
230 CLeadingTerm(
unsigned int label,
const poly lt,
const ring);
233 bool DivisibilityCheck(
const poly multiplier,
const poly t,
const unsigned long not_sev,
const ring r)
const;
235 bool DivisibilityCheck(
const poly product,
const unsigned long not_sev,
const ring r)
const;
237 bool CheckLT(
const ideal & L )
const;
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; };
243 const unsigned long m_sev;
261 friend class CDivisorEnumerator2;
263 friend class CDivisorEnumerator;
276 void Initialize(
const ideal L);
290 bool IsDivisible(
const poly q)
const;
296 int PreProcessTerm(
const poly t,
CReducerFinder& syzChecker)
const;
327 typedef std::map<TCacheKey, TCacheValue, CCacheCompare>
TP2PCache;
352 m_LS(
NULL), m_lcm(m_idLeads, setting),
353 m_div(m_idLeads, setting), m_checker(
NULL, setting), m_cache(),
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(),
374 if (syzLeads !=
NULL)
375 m_checker.Initialize(syzLeads);
386 void SetUpTailTerms();
389 void PrintStats()
const;
395 syzL = m_syzLeads; syzT = m_syzTails;
397 m_syzLeads = m_syzTails =
NULL;
418 poly TraverseNF(
const poly syz_lead,
const poly syz_2 =
NULL)
const;
421 poly
TraverseTail(poly multiplier,
const int tail)
const;
428 poly
ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck)
const;
431 poly ComputeImage(poly multiplier,
const int tail)
const;
436 {
return m_div.FindReducer(product, syzterm, m_checker); }
443 ideal Compute1LeadingSyzygyTerms();
489 mutable unsigned long m_stat[9];
533 static inline poly
ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck,
537 return syz.
ReduceTerm(multiplier, term4reduction, syztermCheck);
Computation attribute storage.
CCacheCompare(const ring &r)
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)
const unsigned int m_label
index in the main L[] + 1
int OPT__SYZNUMBER
Syzygy level (within a resolution)
std::stack< sBucket_pt > Base
CCacheCompare(const CCacheCompare &lhs)
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
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! ...
const int OPT__SYZCHECK
CheckSyzygyProperty: TODO.
const ideal m_idLeads
input leading terms
SBucketFactory(const ring r)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
void nextSyzygyLayer() const
const poly m_lt
the leading term itself L[label-1]
std::vector< const CLeadingTerm * > TReducers
ideal m_LS
leading syzygy terms used for reducing syzygy tails
unsigned long sev() const
ideal m_syzTails
output (syzygy) tails
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
const int OPT__DEBUG
output all the intermediate states
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
~SchreyerSyzygyComputation()
Destructor should not destruct the resulting m_syzLeads, m_syzTails.
Bucket getBucket(const ring r, const bool remove=true)
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.
void ComputeSyzygy()
The main driver function: computes.
const bool OPT__PROT
TEST_OPT_PROT.
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms=true)
Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.
const CReducerFinder m_div
Divisor finder.
void ReadOffResult(ideal &syzL, ideal &syzT)
Read off the results while detaching them from this object NOTE: no copy!
const unsigned int m_N
number of ring variables
const unsigned long m_sev
not short exp. vector
static void _DestroyBucket(Bucket &bt)
we only expect empty buckets to be left at the end for destructor bt will be set to NULL ...
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
std::map< TComponentKey, TReducers > CReducersHash
void operator=(const SBucketFactory &)
const int OPT__TREEOUTPUT
output lifting tree
const ring m_rBaseRing
global base ring
SBucketFactory m_sum_bucket_factory
used for simple summing up
void putBucket(const Bucket &bt, const bool replace=false)
SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting)
Construct a global object for given input data (separated into leads & tails)
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
CCacheCompare & operator=(const CCacheCompare &lhs)
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
SchreyerSyzygyComputationFlags(const SchreyerSyzygyComputationFlags &attr)
Computing syzygies after Schreyer.
const ideal m_idTails
input tails
int status int void size_t count int const void size_t count const char int flags
const int OPT__NOCACHING
no caching/stores/lookups