My Project  UNKNOWN_GIT_VERSION
Macros | Functions
syzextra.cc File Reference
#include "kernel/mod2.h"
#include <string.h>
#include "syzextra.h"
#include "omalloc/omalloc.h"
#include "misc/intvec.h"
#include "coeffs/coeffs.h"
#include "polys/monomials/p_polys.h"
#include "polys/monomials/ring.h"
#include "polys/simpleideals.h"
#include "kernel/polys.h"
#include "kernel/ideals.h"
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Macros

#define _GNU_SOURCE   /*for qsort_r on cygwin, must be before system includes*/
 

Functions

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...
 

Detailed Description

New implementations for the computation of syzygies and resolutions

ABSTRACT: Computation of Syzygies due to Schreyer

Author
Oleksandr Motsak

Definition in file syzextra.cc.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE   /*for qsort_r on cygwin, must be before system includes*/

Definition at line 18 of file syzextra.cc.

Function Documentation

◆ 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 }

◆ 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 }
UNLIKELY
#define UNLIKELY(X)
Definition: auxiliary.h:418
p_Copy
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:813
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:782
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:37
NULL
#define NULL
Definition: omList.c:10
p
int p
Definition: cfModGcd.cc:4019
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:26
pNext
#define pNext(p)
Definition: monomials.h:37