Loading...
Searching...
No Matches
partialgb.cc File Reference
`#include "kernel/mod2.h"`
`#include "polys/prCopy.h"`
`#include "kernel/ideals.h"`
`#include "kernel/GBEngine/kstd1.h"`
`#include "Singular/ipshell.h"`
`#include "Singular/mod_lib.h"`
`#include "Singular/ipid.h"`

Go to the source code of this file.

## Functions

static ideal | idPartialGB (ideal h1, int k)
static BOOLEAN | partialStd (leftv res, leftv h)
int SI_MOD_INIT | partialgb (SModulFunctions *p)

## Function Documentation

## idPartialGB()

ideal idPartialGB | ( | ideal | h1,
|  | int | k )

static

Definition at line 8 of file partialgb.cc.

{
ideal s_h1;
intvec *w=NULL;
assume(currRing != NULL);
ring orig_ring=currRing;
ring syz_ring=rAssure_SyzComp(orig_ring,TRUE);
rSetSyzComp(k,syz_ring);
rChangeCurrRing(syz_ring);
if (orig_ring != syz_ring)
{
s_h1=idrCopyR_NoSort(h1,orig_ring, syz_ring);
}
else
{
s_h1 = h1;
}
ideal s_h3=kStd2(s_h1,NULL,testHomog,&w,(bigintmat*)NULL,k);
if (s_h3==NULL)
{
return idFreeModule(IDELEMS(h1));
}
if (orig_ring != syz_ring)
{
idDelete(&s_h1);
idSkipZeroes(s_h3);
rChangeCurrRing(orig_ring);
s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring);
rDelete(syz_ring);
idTest(s_h3);
return s_h3;
}
idSkipZeroes(s_h3);
idTest(s_h3);
return s_h3;
}
TRUE
#define TRUE
Definition auxiliary.h:101
k
int k
Definition cfEzgcd.cc:99
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
intvec
Definition intvec.h:24
w
const CanonicalForm & w
Definition facAbsFact.cc:51
idDelete
#define idDelete(H)
delete an ideal
Definition ideals.h:29
idTest
#define idTest(id)
Definition ideals.h:47
idFreeModule
ideal idFreeModule(int i)
Definition ideals.h:111
kStd2
ideal kStd2(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
generic interface to GB/SB computations, large hilbert vectors
Definition kstd1.cc:2607
assume
#define assume(x)
Definition mod2.h:389
NULL
#define NULL
Definition omList.c:12
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition polys.cc:16
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
idrMoveR_NoSort
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:261
idrCopyR_NoSort
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:205
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition ring.cc:4527
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition simpleideals.cc:201
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
testHomog
@ testHomog
Definition structs.h:34

## partialgb()

int SI_MOD_INIT partialgb | ( | SModulFunctions * | p | ) |

Definition at line 66 of file partialgb.cc.

{
p->iiAddCproc("partialgb.so","partialStd",FALSE,partialStd);
return (MAX_TOK);
}
FALSE
#define FALSE
Definition auxiliary.h:97
p
int p
Definition cfModGcd.cc:4086
partialStd
static BOOLEAN partialStd(leftv res, leftv h)
Definition partialgb.cc:51
MAX_TOK
@ MAX_TOK
Definition tok.h:220

## partialStd()

BOOLEAN partialStd | ( | leftv | res,
|  | leftv | h )

static

Definition at line 51 of file partialgb.cc.

{
const short t[]={2,MODUL_CMD,INT_CMD};
if (iiCheckTypes(h,t,1))
{
ideal i1=(ideal)h->CopyD();
int i2=(int)((long)h->next->Data());
res->rtyp=MODUL_CMD;
res->data=idPartialGB(i1,i2);
return FALSE;
}
return TRUE;
}
res
CanonicalForm res
Definition facAbsFact.cc:60
MODUL_CMD
@ MODUL_CMD
Definition grammar.cc:288
iiCheckTypes
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:6576
h
STATIC_VAR Poly * h
Definition janet.cc:971
idPartialGB
static ideal idPartialGB(ideal h1, int k)
Definition partialgb.cc:8
INT_CMD
@ INT_CMD
Definition tok.h:96