My Project
Data Structures | Macros | Typedefs | Functions
syzextra.h File Reference

Computation of Syzygies. More...

#include <vector>
#include <map>
#include <string.h>
#include <stack>
#include "singularxx_defs.h"
#include "kernel/ideals.h"

Go to the source code of this file.

Data Structures

class  SBucketFactory
 sBucket Factory More...
 
struct  SchreyerSyzygyComputationFlags
 Computation attribute storage. More...
 
class  CLCM
 
class  CLeadingTerm
 
class  CReducerFinder
 
struct  CCacheCompare
 
class  SchreyerSyzygyComputation
 Computing syzygies after Schreyer. More...
 

Macros

#define NOPRODUCT   1
 
#define NODIVISION   1
 

Typedefs

typedef idrecidhdl
 
typedef kBucketkBucket_pt
 
typedef sBucketsBucket_pt
 
typedef poly TCacheKey
 
typedef poly TCacheValue
 
typedef std::map< TCacheKey, TCacheValue, CCacheCompareTP2PCache
 
typedef std::map< int, TP2PCacheTCache
 

Functions

poly leadmonom (const poly p, const ring r, const bool bSetZeroComp=true)
 
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 is a new polynomial/vector in the ring r More...
 
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 new ideal/module in the ring r NOTE: the resulting rank is autocorrected More...
 
void Sort_c_ds (const ideal id, const ring r)
 inplace sorting of the module (ideal) id wrt <_(c,ds) More...
 
bool my_p_LmCmp (poly, poly, const ring)
 
static void ComputeSyzygy (const ideal L, const ideal T, ideal &LL, ideal &TT, const SchreyerSyzygyComputationFlags A)
 
static ideal ComputeLeadingSyzygyTerms (const ideal &L, const SchreyerSyzygyComputationFlags A)
 
static ideal Compute2LeadingSyzygyTerms (const ideal &L, const SchreyerSyzygyComputationFlags A)
 
static poly FindReducer (poly product, poly syzterm, ideal L, ideal LS, const SchreyerSyzygyComputationFlags A)
 
static poly TraverseTail (poly multiplier, poly tail, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
 
static poly ReduceTerm (poly multiplier, poly term4reduction, poly syztermCheck, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
 
static poly SchreyerSyzygyNF (poly syz_lead, poly syz_2, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
 

Detailed Description

Computation of Syzygies.

ABSTRACT: Computation of Syzygies due to Schreyer

Author
Oleksandr Motsak

Definition in file syzextra.h.

Macro Definition Documentation

◆ NODIVISION

#define NODIVISION   1

Definition at line 39 of file syzextra.h.

◆ NOPRODUCT

#define NOPRODUCT   1

Definition at line 33 of file syzextra.h.

Typedef Documentation

◆ idhdl

typedef idrec* idhdl

Definition at line 28 of file syzextra.h.

◆ kBucket_pt

typedef kBucket* kBucket_pt

Definition at line 30 of file syzextra.h.

◆ sBucket_pt

typedef sBucket* sBucket_pt

Definition at line 60 of file syzextra.h.

◆ TCache

typedef std::map<int, TP2PCache> TCache

Definition at line 328 of file syzextra.h.

◆ TCacheKey

typedef poly TCacheKey

Definition at line 310 of file syzextra.h.

◆ TCacheValue

typedef poly TCacheValue

Definition at line 311 of file syzextra.h.

◆ TP2PCache

Definition at line 327 of file syzextra.h.

Function Documentation

◆ Compute2LeadingSyzygyTerms()

static ideal Compute2LeadingSyzygyTerms ( const ideal &  L,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 510 of file syzextra.h.

511{
513 syz.ComputeLeadingSyzygyTerms(true);
514 ideal LL, TT;
515 syz.ReadOffResult(LL, TT);
516 return LL; // assume TT is NULL!
517}
Computing syzygies after Schreyer.
Definition: syzextra.h:342
#define NULL
Definition: omList.c:12
#define A
Definition: sirandom.c:24

◆ ComputeLeadingSyzygyTerms()

static ideal ComputeLeadingSyzygyTerms ( const ideal &  L,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 501 of file syzextra.h.

502{
504 syz.ComputeLeadingSyzygyTerms(false);
505 ideal LL, TT;
506 syz.ReadOffResult(LL, TT);
507 return LL; // assume TT is NULL!
508}

◆ ComputeSyzygy()

static void ComputeSyzygy ( const ideal  L,
const ideal  T,
ideal &  LL,
ideal &  TT,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 494 of file syzextra.h.

495{
497 syz.ComputeSyzygy();
498 syz.ReadOffResult(LL, TT);
499}
STATIC_VAR jList * T
Definition: janet.cc:30

◆ FindReducer()

static poly FindReducer ( poly  product,
poly  syzterm,
ideal  L,
ideal  LS,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 519 of file syzextra.h.

521{
522 SchreyerSyzygyComputation syz(L, NULL, LS, A);
523 return syz._FindReducer(product, syzterm);
524}

◆ id_Tail()

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 new ideal/module in the ring r NOTE: the resulting rank is autocorrected

Definition at line 48 of file syzextra.cc.

49{
50 if( UNLIKELY(id == NULL) )
51 return NULL;
52
53 const ideal newid = idInit(IDELEMS(id),id->rank);
54
55 for (int i=IDELEMS(id) - 1; i >= 0; i--)
56 newid->m[i] = p_Tail( id->m[i], r );
57
58 newid->rank = id_RankFreeModule(newid, currRing);
59
60 return newid;
61}
#define UNLIKELY(X)
Definition: auxiliary.h:404
int i
Definition: cfEzgcd.cc:132
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:35
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
#define IDELEMS(i)
Definition: simpleideals.h:23
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:40

◆ leadmonom()

poly leadmonom ( const poly  p,
const ring  r,
const bool  bSetZeroComp = true 
)

◆ my_p_LmCmp()

bool my_p_LmCmp ( poly  ,
poly  ,
const  ring 
)

◆ p_Tail()

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 is a new polynomial/vector in the ring r

Definition at line 40 of file syzextra.cc.

41{
42 if( UNLIKELY(p == NULL) )
43 return NULL;
44 else
45 return p_Copy( pNext(p), r );
46}
int p
Definition: cfModGcd.cc:4078
#define pNext(p)
Definition: monomials.h:36
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:846

◆ ReduceTerm()

static poly ReduceTerm ( poly  multiplier,
poly  term4reduction,
poly  syztermCheck,
ideal  L,
ideal  T,
ideal  LS,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 533 of file syzextra.h.

535{
536 SchreyerSyzygyComputation syz(L, T, LS, A);
537 return syz.ReduceTerm(multiplier, term4reduction, syztermCheck);
538}

◆ SchreyerSyzygyNF()

static poly SchreyerSyzygyNF ( poly  syz_lead,
poly  syz_2,
ideal  L,
ideal  T,
ideal  LS,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 541 of file syzextra.h.

543{
544 SchreyerSyzygyComputation syz(L, T, LS, A);
545 return syz.SchreyerSyzygyNF(syz_lead, syz_2);
546}

◆ Sort_c_ds()

void Sort_c_ds ( const ideal  id,
const ring  r 
)

inplace sorting of the module (ideal) id wrt <_(c,ds)

◆ TraverseTail()

static poly TraverseTail ( poly  multiplier,
poly  tail,
ideal  L,
ideal  T,
ideal  LS,
const SchreyerSyzygyComputationFlags  A 
)
inlinestatic

Definition at line 526 of file syzextra.h.

528{
529 SchreyerSyzygyComputation syz(L, T, LS, A);
530 return syz.TraverseTail(multiplier, tail);
531}