My Project
Loading...
Searching...
No Matches
Functions
customstd.cc File Reference
#include "Singular/libsingular.h"

Go to the source code of this file.

Functions

static BOOLEAN satstd (leftv res, leftv args)
 
static BOOLEAN abort_if_monomial_sp (kStrategy strat)
 
BOOLEAN monomialabortstd (leftv res, leftv args)
 
int SI_MOD_INIT() customstd (SModulFunctions *p)
 

Function Documentation

◆ abort_if_monomial_sp()

static BOOLEAN abort_if_monomial_sp ( kStrategy  strat)
static

Definition at line 91 of file customstd.cc.

92{
93 BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
94 // let it remain FALSE otherwise
95 if (strat->P.t_p==NULL)
96 {
97 poly p=strat->P.p;
98 if (pNext(p)==NULL)
99 {
100 while ((strat->Ll >= 0))
101 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
102 return FALSE;
103 }
104 }
105 else
106 {
107 poly p=strat->P.t_p;
108 if (pNext(p)==NULL)
109 {
110 while ((strat->Ll >= 0))
111 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
112 return FALSE;
113 }
114 }
115 return b; // return TRUE if sp was changed, FALSE if not
116}
int BOOLEAN
Definition: auxiliary.h:87
#define FALSE
Definition: auxiliary.h:96
int p
Definition: cfModGcd.cc:4078
CanonicalForm b
Definition: cfModGcd.cc:4103
int Ll
Definition: kutil.h:351
LObject P
Definition: kutil.h:302
LSet L
Definition: kutil.h:327
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition: kutil.cc:1215
#define pNext(p)
Definition: monomials.h:36
#define NULL
Definition: omList.c:12

◆ customstd()

int SI_MOD_INIT() customstd ( SModulFunctions p)

Definition at line 316 of file customstd.cc.

317{
318 // p->iiAddCproc("std_demo","std_with_display",FALSE,std_with_display);
319 p->iiAddCproc("customstd.lib","satstd",FALSE,satstd);
320 // p->iiAddCproc("std_demo","satstdWithInitialCheck",FALSE,satstdWithInitialCheck);
321 p->iiAddCproc("customstd.lib","monomialabortstd",FALSE,monomialabortstd);
322 // PrintS("init of std_demo - type `listvar(Std_demo);` to its contents\n");
323 return (MAX_TOK);
324}
static BOOLEAN satstd(leftv res, leftv args)
Definition: customstd.cc:39
BOOLEAN monomialabortstd(leftv res, leftv args)
Definition: customstd.cc:118
@ MAX_TOK
Definition: tok.h:218

◆ monomialabortstd()

BOOLEAN monomialabortstd ( leftv  res,
leftv  args 
)

Definition at line 118 of file customstd.cc.

119{
120 if (args!=NULL)
121 {
122 if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
123 {
124 ideal I=(ideal)args->Data();
126 idSkipZeroes(I);
127 res->rtyp=IDEAL_CMD;
128 res->data=(char*)I;
129 return FALSE;
130 }
131 }
132 WerrorS("monomialabortstd: unexpected parameters");
133 return TRUE;
134}
#define TRUE
Definition: auxiliary.h:100
int Typ()
Definition: subexpr.cc:1019
void * Data()
Definition: subexpr.cc:1162
leftv next
Definition: subexpr.h:86
static BOOLEAN abort_if_monomial_sp(kStrategy strat)
Definition: customstd.cc:91
CanonicalForm res
Definition: facAbsFact.cc:60
void WerrorS(const char *s)
Definition: feFopen.cc:24
@ IDEAL_CMD
Definition: grammar.cc:284
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
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
@ testHomog
Definition: structs.h:38

◆ satstd()

static BOOLEAN satstd ( leftv  res,
leftv  args 
)
static

Definition at line 39 of file customstd.cc.

40{
41 leftv u = args;
42 if ((u!=NULL)
43 && ((u->Typ()==IDEAL_CMD)||(u->Typ()==MODUL_CMD)))
44 {
45 ideal I=(ideal)u->Data();
46 leftv v = u->next;
47
48 res->rtyp=IDEAL_CMD;
49 ideal J;
50 if (v==NULL)
51 {
53 }
54 else
55 {
56 if (v->Typ()==IDEAL_CMD)
57 {
58 J = (ideal) v->Data();
59 }
60 else
61 {
62 args->CleanUp();
63 WerrorS("satstd: unexpected parameters");
64 return TRUE;
65 }
66 }
67 I=id_Satstd(I,J,currRing);
68
69#if 0 /* unused */
70 if (idealCache)
71 {
73 res->data = (char*) idealCache;
74 idealCache = NULL;
75 }
76 else
77#endif
78 {
79 idSkipZeroes(I);
80 res->data=(char*)I;
81 }
82 if (v==NULL) id_Delete(&J,currRing);
83 args->CleanUp();
85 return (res->data==NULL);
86 }
87 WerrorS("satstd: unexpected parameters");
88 return TRUE;
89}
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
void CleanUp(ring r=currRing)
Definition: subexpr.cc:348
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:39
@ MODUL_CMD
Definition: grammar.cc:287
ideal id_Satstd(const ideal I, ideal J, const ring r)
Definition: ideals.cc:3108
#define setFlag(A, F)
Definition: ipid.h:113
#define FLAG_STD
Definition: ipid.h:106
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
ideal id_MaxIdeal(const ring r)
initialise the maximal ideal (at 0)
Definition: simpleideals.cc:98