Functions
freegb.cc File Reference
#include "Singular/libsingular.h"

Go to the source code of this file.

Functions

static BOOLEAN freegb (leftv res, leftv args)
 
int SI_MOD_INIT() freegb (SModulFunctions *p)
 

Function Documentation

◆ freegb() [1/2]

static BOOLEAN freegb ( leftv  res,
leftv  args 
)
static

Definition at line 4 of file freegb.cc.

5 {
6  const short t1[]={2,RING_CMD,INT_CMD};
7  if (iiCheckTypes(args,t1,1))
8  {
9  ring r=(ring)args->Data();
10  int d=(int)(long)args->next->Data();
11  if (d<2)
12  {
13  WerrorS("degree must be >=2");
14  return TRUE;
15  }
16  int i=0;
17  while(r->order[i]!=0)
18  {
19  if ((r->order[i]==ringorder_c) ||(r->order[i]==ringorder_C)) i++;
20  else if ((r->block0[i]==1)&&(r->block1[i]==r->N)) i++;
21  else
22  {
23  WerrorS("only for rings with a global ordering of one block");
24  return TRUE;
25  }
26  }
27  if ((r->order[i]!=0)
29  {
30  //WerrorS("only for rings with a global ordering of one block");
31  Werror("only for rings with a global ordering of one block,i=%d, o=%d",i,r->order[i]);
32  return TRUE;
33  }
34  ring R=freeAlgebra(r,d);
35  res->rtyp=RING_CMD;
36  res->data=R;
37  return R==NULL;
38  }
39  return TRUE;
40 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:755
Definition: tok.h:96
#define TRUE
Definition: auxiliary.h:98
void WerrorS(const char *s)
Definition: feFopen.cc:24
void * data
Definition: subexpr.h:88
int i
Definition: cfEzgcd.cc:125
leftv next
Definition: subexpr.h:86
#define NULL
Definition: omList.c:12
BOOLEAN iiCheckTypes(leftv args, const short *type_list, int report)
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (...
Definition: ipshell.cc:6551
#define R
Definition: sirandom.c:26
int rtyp
Definition: subexpr.h:91
void * Data()
Definition: subexpr.cc:1176
ring freeAlgebra(ring r, int d)
create the letterplace ring corresponding to r up to degree d
Definition: shiftop.cc:775
void Werror(const char *fmt,...)
Definition: reporter.cc:189

◆ freegb() [2/2]

int SI_MOD_INIT() freegb ( SModulFunctions p)

Definition at line 45 of file freegb.cc.

46 {
47 #ifdef HAVE_SHIFTBBA
48  p->iiAddCproc("freegb.so","freeAlgebra",FALSE,freegb);
49 #endif
50  return (MAX_TOK);
51 }
#define FALSE
Definition: auxiliary.h:94
Definition: tok.h:216
int(* iiAddCproc)(const char *libname, const char *procname, BOOLEAN pstatic, BOOLEAN(*func)(leftv res, leftv v))
Definition: ipid.h:69
static BOOLEAN freegb(leftv res, leftv args)
Definition: freegb.cc:4