My Project  UNKNOWN_GIT_VERSION
Data Structures | Macros | Typedefs | Functions
syzextra.h File Reference
#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
 
struct  SchreyerSyzygyComputationFlags
 Computation attribute storage. More...
 
class  CLCM
 
class  CLeadingTerm
 
class  CReducerFinder
 
struct  CCacheCompare
 
class  SchreyerSyzygyComputation
 

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 }

◆ 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 {
496  SchreyerSyzygyComputation syz(L, T, A);
497  syz.ComputeSyzygy();
498  syz.ReadOffResult(LL, TT);
499 }

◆ 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 50 of file syzextra.cc.

51 {
52  if( UNLIKELY(id == NULL) )
53  return NULL;
54 
55  const ideal newid = idInit(IDELEMS(id),id->rank);
56 
57  for (int i=IDELEMS(id) - 1; i >= 0; i--)
58  newid->m[i] = p_Tail( id->m[i], r );
59 
60  newid->rank = id_RankFreeModule(newid, currRing);
61 
62  return newid;
63 }

◆ 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 42 of file syzextra.cc.

43 {
44  if( UNLIKELY(p == NULL) )
45  return NULL;
46  else
47  return p_Copy( pNext(p), r );
48 }

◆ 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 }
UNLIKELY
#define UNLIKELY(X)
Definition: auxiliary.h:417
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:798
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
i
int i
Definition: cfEzgcd.cc:125
id_RankFreeModule
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
Definition: simpleideals.cc:781
T
static jList * T
Definition: janet.cc:31
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 i...
Definition: syzextra.cc:42
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:36
SchreyerSyzygyComputation
Definition: syzextra.h:341
NULL
#define NULL
Definition: omList.c:9
p
int p
Definition: cfModGcd.cc:4019
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:24
A
#define A
Definition: sirandom.c:23
pNext
#define pNext(p)
Definition: monomials.h:34