My Project
Loading...
Searching...
No Matches
Functions
loctriv.cc File Reference
#include "kernel/ideals.h"
#include "libpolys/polys/monomials/ring.h"
#include "kernel/GBEngine/kstd1.h"
#include "libpolys/polys/prCopy.h"
#include "Singular/tok.h"
#include "Singular/ipshell.h"
#include "Singular/mod_lib.h"
#include "Singular/ipid.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ kstd()

static BOOLEAN kstd ( leftv  res,
leftv  args 
)
static

Definition at line 17 of file loctriv.cc.

18{
19 const short t1[]={2,MODUL_CMD,INT_CMD};
20 if (iiCheckTypes(args,t1,1))
21 {
22 ideal h1=(ideal)args->CopyD();
23 int k=(int)(long)args->next->Data();
24 ideal s_h1;
25 ideal s_h3;
26 ring orig_ring;
27 ring syz_ring;
28 intvec *w=NULL;
29
31 orig_ring=currRing;
32 syz_ring=rAssure_SyzComp(orig_ring);
33 rSetSyzComp(k,syz_ring);
34 rChangeCurrRing(syz_ring);
35
36 if (orig_ring != syz_ring)
37 {
38 s_h1=idrCopyR_NoSort(h1,orig_ring,syz_ring);
39 }
40 else
41 {
42 s_h1 = h1;
43 }
44
45 s_h3=kStd(s_h1,NULL,testHomog,&w,NULL,k);
46
47 if (orig_ring != syz_ring)
48 {
49 idDelete(&s_h1);
50 idSkipZeroes(s_h3);
51 rChangeCurrRing(orig_ring);
52 s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring);
53 rKill(syz_ring);
54 }
55 else
56 {
57 idSkipZeroes(s_h3);
58 }
59 res->data=(void *)s_h3;
60 res->rtyp=MODUL_CMD;
61 return FALSE;
62 }
63 else
64 return TRUE;
65}
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
int k
Definition: cfEzgcd.cc:99
Definition: intvec.h:23
void * CopyD(int t)
Definition: subexpr.cc:710
void * Data()
Definition: subexpr.cc:1162
leftv next
Definition: subexpr.h:86
CanonicalForm res
Definition: facAbsFact.cc:60
const CanonicalForm & w
Definition: facAbsFact.cc:51
@ MODUL_CMD
Definition: grammar.cc:287
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
void rKill(ring r)
Definition: ipshell.cc:6180
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:6572
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
Definition: kstd1.cc:2447
#define assume(x)
Definition: mod2.h:389
#define NULL
Definition: omList.c:12
void rChangeCurrRing(ring r)
Definition: polys.cc:15
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition: prCopy.cc:261
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:205
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition: ring.cc:4435
void rSetSyzComp(int k, const ring r)
Definition: ring.cc:5086
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
@ testHomog
Definition: structs.h:38
@ INT_CMD
Definition: tok.h:96

◆ loctriv()

int SI_MOD_INIT() loctriv ( SModulFunctions p)

Definition at line 69 of file loctriv.cc.

70{
71 p->iiAddCproc("loctriv.so","kstd",FALSE,kstd);
72 return (MAX_TOK);
73}
int p
Definition: cfModGcd.cc:4078
static BOOLEAN kstd(leftv res, leftv args)
Definition: loctriv.cc:17
@ MAX_TOK
Definition: tok.h:218