My Project
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
SchreyerSyzygyComputation Class Reference

Computing syzygies after Schreyer. More...

#include <syzextra.h>

Public Member Functions

 SchreyerSyzygyComputation (const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting)
 Construct a global object for given input data (separated into leads & tails) More...
 
 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) More...
 
 ~SchreyerSyzygyComputation ()
 Destructor should not destruct the resulting m_syzLeads, m_syzTails. More...
 
void SetUpTailTerms ()
 Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTails as well...? More...
 
void PrintStats () const
 print statistics about the used heuristics More...
 
void ReadOffResult (ideal &syzL, ideal &syzT)
 Read off the results while detaching them from this object NOTE: no copy! More...
 
void ComputeSyzygy ()
 The main driver function: computes. More...
 
void ComputeLeadingSyzygyTerms (bool bComputeSecondTerms=true)
 Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads. More...
 
poly SchreyerSyzygyNF (const poly syz_lead, poly syz_2=NULL) const
 Main HybridNF == 1: poly reduce + LOT + LCM? More...
 
poly TraverseNF (const poly syz_lead, const poly syz_2=NULL) const
 
poly TraverseTail (poly multiplier, const int tail) const
 High level caching function!!! More...
 
poly TraverseTail (poly multiplier, poly tail) const
 called only from above and from outside (for testing) More...
 
poly ReduceTerm (poly multiplier, poly term4reduction, poly syztermCheck) const
 TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ??? More...
 
poly ComputeImage (poly multiplier, const int tail) const
 low level computation... More...
 
poly _FindReducer (const poly product, const poly syzterm) const
 just for testing via the wrapper below More...
 
- Public Member Functions inherited from SchreyerSyzygyComputationFlags
 SchreyerSyzygyComputationFlags (idhdl rootRingHdl)
 
 SchreyerSyzygyComputationFlags (const SchreyerSyzygyComputationFlags &attr)
 
void nextSyzygyLayer () const
 

Protected Member Functions

ideal Compute1LeadingSyzygyTerms ()
 just leading terms More...
 
ideal Compute2LeadingSyzygyTerms ()
 leading + second terms More...
 

Private Member Functions

void CleanUp ()
 

Private Attributes

const ideal m_idLeads
 input leading terms More...
 
const ideal m_idTails
 input tails More...
 
ideal m_syzLeads
 output (syzygy) leading terms (+2nd terms?) More...
 
ideal m_syzTails
 output (syzygy) tails More...
 
ideal m_LS
 leading syzygy terms used for reducing syzygy tails More...
 
const CLCM m_lcm
 Bitmask for variables occuring in leading terms. More...
 
const CReducerFinder m_div
 Divisor finder. More...
 
CReducerFinder m_checker
 for checking tail-terms and makeing them irreducible (wrt m_LS!) More...
 
TCache m_cache
 
SBucketFactory m_sum_bucket_factory
 used for simple summing up More...
 
kBucket_pt m_spoly_bucket
 for S-Polynomial reductions More...
 
unsigned long m_stat [9]
 Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded due to LOT heuristics 5: number of terms discarded due to LCM heuristics 6, 7: lookups without & with rescale, 8: stores. More...
 

Friends

class CLCM
 
class CReducerFinder
 

Additional Inherited Members

- Data Fields inherited from SchreyerSyzygyComputationFlags
const int OPT__DEBUG
 output all the intermediate states More...
 
const int OPT__LEAD2SYZ
 ? More...
 
const int OPT__TAILREDSYZ
 Reduce syzygy tails wrt the leading syzygy terms. More...
 
const int OPT__HYBRIDNF
 Use the usual NF's S-poly reduction while dropping lower order terms 2 means - smart selection! More...
 
const int OPT__IGNORETAILS
 ignore tails and compute the pure Schreyer frame More...
 
int OPT__SYZNUMBER
 Syzygy level (within a resolution) More...
 
const int OPT__TREEOUTPUT
 output lifting tree More...
 
const int OPT__SYZCHECK
 CheckSyzygyProperty: TODO. More...
 
const bool OPT__PROT
 TEST_OPT_PROT. More...
 
const int OPT__NOCACHING
 no caching/stores/lookups More...
 
const ring m_rBaseRing
 global base ring More...
 

Detailed Description

Computing syzygies after Schreyer.

Storing/accumulating data during the computation requires some global object, like this class. Ideally the above global functions should not be used in favour of this class.

See also
Schreyer Syzygy Computation Paper & Talk & Python prototype

Definition at line 328 of file syzextra.h.

Constructor & Destructor Documentation

◆ SchreyerSyzygyComputation() [1/2]

SchreyerSyzygyComputation::SchreyerSyzygyComputation ( const ideal  idLeads,
const ideal  idTails,
const SchreyerSyzygyComputationFlags  setting 
)
inline

Construct a global object for given input data (separated into leads & tails)

Definition at line 335 of file syzextra.h.

335 :
337 m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
339 m_LS(NULL), m_lcm(m_idLeads, setting),
340 m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
343 {
344 if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
345 }
#define UNLIKELY(X)
Definition: auxiliary.h:404
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:454
const ideal m_idLeads
input leading terms
Definition: syzextra.h:439
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:468
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:476
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:448
const ideal m_idTails
input tails
Definition: syzextra.h:442
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:457
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:445
SBucketFactory m_sum_bucket_factory
used for simple summing up
Definition: syzextra.h:465
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:450
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:460
ideal id_Copy(ideal h1, const ring r)
copy an ideal
#define NULL
Definition: omList.c:12
Computation attribute storage.
Definition: syzextra.h:144
const ring m_rBaseRing
global base ring
Definition: syzextra.h:195
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:189

◆ SchreyerSyzygyComputation() [2/2]

SchreyerSyzygyComputation::SchreyerSyzygyComputation ( const ideal  idLeads,
const ideal  idTails,
const ideal  syzLeads,
const SchreyerSyzygyComputationFlags  setting 
)
inline

Construct a global object for given input data (separated into leads & tails)

Definition at line 348 of file syzextra.h.

348 :
350 m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
351 m_syzLeads(syzLeads), m_syzTails(NULL),
352 m_LS(syzLeads), 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
360 {
361 if (syzLeads != NULL)
362 m_checker.Initialize(syzLeads);
363// if( idTails != NULL )
364// SetUpTailTerms();
365 }
366 }
#define LIKELY(X)
Definition: auxiliary.h:403
void Initialize(const ideal L)
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:164
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:172

◆ ~SchreyerSyzygyComputation()

SchreyerSyzygyComputation::~SchreyerSyzygyComputation ( )
inline

Destructor should not destruct the resulting m_syzLeads, m_syzTails.

Definition at line 369 of file syzextra.h.

Member Function Documentation

◆ _FindReducer()

poly SchreyerSyzygyComputation::_FindReducer ( const poly  product,
const poly  syzterm 
) const
inline

just for testing via the wrapper below

Definition at line 422 of file syzextra.h.

423 { return m_div.FindReducer(product, syzterm, m_checker); }
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const

◆ CleanUp()

void SchreyerSyzygyComputation::CleanUp ( )
private

◆ Compute1LeadingSyzygyTerms()

ideal SchreyerSyzygyComputation::Compute1LeadingSyzygyTerms ( )
protected

just leading terms

◆ Compute2LeadingSyzygyTerms()

ideal SchreyerSyzygyComputation::Compute2LeadingSyzygyTerms ( )
protected

leading + second terms

◆ ComputeImage()

poly SchreyerSyzygyComputation::ComputeImage ( poly  multiplier,
const int  tail 
) const

low level computation...

◆ ComputeLeadingSyzygyTerms()

void SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms ( bool  bComputeSecondTerms = true)

Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.

◆ ComputeSyzygy()

void SchreyerSyzygyComputation::ComputeSyzygy ( )

The main driver function: computes.

◆ PrintStats()

void SchreyerSyzygyComputation::PrintStats ( ) const

print statistics about the used heuristics

◆ ReadOffResult()

void SchreyerSyzygyComputation::ReadOffResult ( ideal &  syzL,
ideal &  syzT 
)
inline

Read off the results while detaching them from this object NOTE: no copy!

Definition at line 380 of file syzextra.h.

381 {
382 syzL = m_syzLeads; syzT = m_syzTails;
383
384 m_syzLeads = m_syzTails = NULL; // m_LS ?
385
386 if ( UNLIKELY(OPT__PROT) )
387 PrintStats();
388 }
void PrintStats() const
print statistics about the used heuristics

◆ ReduceTerm()

poly SchreyerSyzygyComputation::ReduceTerm ( poly  multiplier,
poly  term4reduction,
poly  syztermCheck 
) const

TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???

◆ SchreyerSyzygyNF()

poly SchreyerSyzygyComputation::SchreyerSyzygyNF ( const poly  syz_lead,
poly  syz_2 = NULL 
) const

Main HybridNF == 1: poly reduce + LOT + LCM?

◆ SetUpTailTerms()

void SchreyerSyzygyComputation::SetUpTailTerms ( )

Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTails as well...?

◆ TraverseNF()

poly SchreyerSyzygyComputation::TraverseNF ( const poly  syz_lead,
const poly  syz_2 = NULL 
) const

◆ TraverseTail() [1/2]

poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
const int  tail 
) const

High level caching function!!!

◆ TraverseTail() [2/2]

poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
poly  tail 
) const

called only from above and from outside (for testing)

Friends And Related Function Documentation

◆ CLCM

friend class CLCM
friend

Definition at line 330 of file syzextra.h.

◆ CReducerFinder

friend class CReducerFinder
friend

Definition at line 331 of file syzextra.h.

Field Documentation

◆ m_cache

TCache SchreyerSyzygyComputation::m_cache
mutableprivate

Definition at line 462 of file syzextra.h.

◆ m_checker

CReducerFinder SchreyerSyzygyComputation::m_checker
private

for checking tail-terms and makeing them irreducible (wrt m_LS!)

Definition at line 460 of file syzextra.h.

◆ m_div

const CReducerFinder SchreyerSyzygyComputation::m_div
private

Divisor finder.

Definition at line 457 of file syzextra.h.

◆ m_idLeads

const ideal SchreyerSyzygyComputation::m_idLeads
private

input leading terms

Definition at line 439 of file syzextra.h.

◆ m_idTails

const ideal SchreyerSyzygyComputation::m_idTails
private

input tails

Definition at line 442 of file syzextra.h.

◆ m_lcm

const CLCM SchreyerSyzygyComputation::m_lcm
private

Bitmask for variables occuring in leading terms.

Definition at line 454 of file syzextra.h.

◆ m_LS

ideal SchreyerSyzygyComputation::m_LS
private

leading syzygy terms used for reducing syzygy tails

Definition at line 450 of file syzextra.h.

◆ m_spoly_bucket

kBucket_pt SchreyerSyzygyComputation::m_spoly_bucket
mutableprivate

for S-Polynomial reductions

Definition at line 468 of file syzextra.h.

◆ m_stat

unsigned long SchreyerSyzygyComputation::m_stat[9]
mutableprivate

Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded due to LOT heuristics 5: number of terms discarded due to LCM heuristics 6, 7: lookups without & with rescale, 8: stores.

Definition at line 476 of file syzextra.h.

◆ m_sum_bucket_factory

SBucketFactory SchreyerSyzygyComputation::m_sum_bucket_factory
mutableprivate

used for simple summing up

Definition at line 465 of file syzextra.h.

◆ m_syzLeads

ideal SchreyerSyzygyComputation::m_syzLeads
private

output (syzygy) leading terms (+2nd terms?)

Definition at line 445 of file syzextra.h.

◆ m_syzTails

ideal SchreyerSyzygyComputation::m_syzTails
private

output (syzygy) tails

Definition at line 448 of file syzextra.h.


The documentation for this class was generated from the following file: