 |
My Project
debian-1:4.1.2-p1+ds-2
|
#include <stdio.h>
#include "kernel/ideals.h"
#include "Singular/lists.h"
#include "Singular/fevoices.h"
Go to the source code of this file.
|
BOOLEAN | spectrumProc (leftv, leftv) |
|
BOOLEAN | spectrumfProc (leftv, leftv) |
|
BOOLEAN | spaddProc (leftv, leftv, leftv) |
|
BOOLEAN | spmulProc (leftv, leftv, leftv) |
|
BOOLEAN | semicProc (leftv, leftv, leftv) |
|
BOOLEAN | semicProc3 (leftv, leftv, leftv, leftv) |
|
BOOLEAN | iiAssignCR (leftv, leftv) |
|
BOOLEAN | iiARROW (leftv, char *, char *) |
|
int | IsCmd (const char *n, int &tok) |
|
BOOLEAN | iiPStart (idhdl pn, leftv sl) |
|
BOOLEAN | iiEStart (char *example, procinfo *pi) |
|
BOOLEAN | iiAllStart (procinfov pi, char *p, feBufferTypes t, int l) |
|
void | type_cmd (leftv v) |
|
void | test_cmd (int i) |
|
void | list_cmd (int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname=FALSE) |
|
void | killlocals (int v) |
|
int | exprlist_length (leftv v) |
|
const char * | Tok2Cmdname (int i) |
|
const char * | iiTwoOps (int t) |
|
int | iiOpsTwoChar (const char *s) |
|
BOOLEAN | iiWRITE (leftv res, leftv exprlist) |
|
BOOLEAN | iiExport (leftv v, int toLev) |
|
BOOLEAN | iiExport (leftv v, int toLev, package pack) |
|
BOOLEAN | iiInternalExport (leftv v, int toLev, package pack) |
|
static char * | iiGetLibName (const procinfov pi) |
| find the library of an proc More...
|
|
char * | iiGetLibProcBuffer (procinfov pi, int part=1) |
|
char * | iiProcName (char *buf, char &ct, char *&e) |
|
char * | iiProcArgs (char *e, BOOLEAN withParenth) |
|
BOOLEAN | iiLibCmd (char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force) |
|
BOOLEAN | jjLOAD (const char *s, BOOLEAN autoexport=FALSE) |
| load lib/module given in v More...
|
|
BOOLEAN | jjLOAD_TRY (const char *s) |
|
BOOLEAN | iiLocateLib (const char *lib, char *where) |
|
leftv | iiMap (map theMap, const char *what) |
|
void | iiMakeResolv (resolvente r, int length, int rlen, char *name, int typ0, intvec **weights=NULL) |
|
BOOLEAN | jjMINRES (leftv res, leftv v) |
|
BOOLEAN | jjBETTI (leftv res, leftv v) |
|
BOOLEAN | jjBETTI2 (leftv res, leftv u, leftv v) |
|
BOOLEAN | jjBETTI2_ID (leftv res, leftv u, leftv v) |
|
BOOLEAN | jjIMPORTFROM (leftv res, leftv u, leftv v) |
|
BOOLEAN | jjLIST_PL (leftv res, leftv v) |
|
BOOLEAN | jjVARIABLES_P (leftv res, leftv u) |
|
BOOLEAN | jjVARIABLES_ID (leftv res, leftv u) |
|
int | iiRegularity (lists L) |
|
leftv | singular_system (sleftv h) |
|
BOOLEAN | jjSYSTEM (leftv res, leftv v) |
|
void | iiDebug () |
|
BOOLEAN | iiCheckRing (int i) |
|
poly | iiHighCorner (ideal i, int ak) |
|
char * | iiConvName (const char *libname) |
|
BOOLEAN | iiGetLibStatus (const char *lib) |
|
BOOLEAN | iiLoadLIB (FILE *fp, const char *libnamebuf, const char *newlib, idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror) |
|
lists | syConvRes (syStrategy syzstr, BOOLEAN toDel=FALSE, int add_row_shift=0) |
|
syStrategy | syForceMin (lists li) |
|
syStrategy | syConvList (lists li) |
|
BOOLEAN | syBetti1 (leftv res, leftv u) |
|
BOOLEAN | syBetti2 (leftv res, leftv u, leftv w) |
|
BOOLEAN | iiExprArith1 (leftv res, sleftv *a, int op) |
|
BOOLEAN | iiExprArith2 (leftv res, sleftv *a, int op, sleftv *b, BOOLEAN proccall=FALSE) |
|
BOOLEAN | iiExprArith3 (leftv res, int op, leftv a, leftv b, leftv c) |
|
BOOLEAN | iiExprArithM (leftv res, sleftv *a, int op) |
|
BOOLEAN | iiApply (leftv res, leftv a, int op, leftv proc) |
|
BOOLEAN | iiAssign (leftv left, leftv right, BOOLEAN toplevel=TRUE) |
|
BOOLEAN | iiParameter (leftv p) |
|
BOOLEAN | iiAlias (leftv p) |
|
int | iiTokType (int op) |
|
int | iiDeclCommand (leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring=FALSE, BOOLEAN init_b=TRUE) |
|
BOOLEAN | iiMake_proc (idhdl pn, package pack, leftv sl) |
|
void * | iiCallLibProc1 (const char *n, void *arg, int arg_type, BOOLEAN &err) |
|
void * | iiCallLibProcM (const char *n, void **args, int *arg_types, BOOLEAN &err) |
| args: NULL terminated arry of arguments arg_types: 0 terminated array of corresponding types More...
|
|
char * | showOption () |
|
BOOLEAN | setOption (leftv res, leftv v) |
|
char * | versionString () |
|
void | singular_example (char *str) |
|
BOOLEAN | iiTryLoadLib (leftv v, const char *id) |
|
int | iiAddCproc (const char *libname, const char *procname, BOOLEAN pstatic, BOOLEAN(*func)(leftv res, leftv v)) |
|
void | iiCheckPack (package &p) |
|
void | rSetHdl (idhdl h) |
|
ring | rInit (leftv pn, leftv rv, leftv ord) |
|
idhdl | rDefault (const char *s) |
|
idhdl | rSimpleFindHdl (ring r, idhdl root, idhdl n=NULL) |
|
idhdl | rFindHdl (ring r, idhdl n) |
|
void | rKill (idhdl h) |
|
void | rKill (ring r) |
|
lists | scIndIndset (ideal S, BOOLEAN all, ideal Q) |
|
BOOLEAN | mpKoszul (leftv res, leftv c, leftv b, leftv id) |
|
BOOLEAN | mpJacobi (leftv res, leftv a) |
|
BOOLEAN | jjRESULTANT (leftv res, leftv u, leftv v, leftv w) |
|
BOOLEAN | kQHWeight (leftv res, leftv v) |
|
BOOLEAN | kWeight (leftv res, leftv id) |
|
BOOLEAN | loSimplex (leftv res, leftv args) |
| Implementation of the Simplex Algorithm. More...
|
|
BOOLEAN | loNewtonP (leftv res, leftv arg1) |
| compute Newton Polytopes of input polynomials More...
|
|
BOOLEAN | nuMPResMat (leftv res, leftv arg1, leftv arg2) |
| returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) More...
|
|
BOOLEAN | nuLagSolve (leftv res, leftv arg1, leftv arg2, leftv arg3) |
| find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver. More...
|
|
BOOLEAN | nuVanderSys (leftv res, leftv arg1, leftv arg2, leftv arg3) |
| COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d. More...
|
|
BOOLEAN | nuUResSolve (leftv res, leftv args) |
| solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal). More...
|
|
BOOLEAN | jjCHARSERIES (leftv res, leftv u) |
|
void | paPrint (const char *n, package p) |
|
BOOLEAN | iiTestAssume (leftv a, leftv b) |
|
BOOLEAN | iiExprArith1Tab (leftv res, leftv a, int op, const struct sValCmd1 *dA1, int at, const struct sConvertTypes *dConvertTypes) |
| apply an operation 'op' to an argument a return TRUE on failure More...
|
|
BOOLEAN | iiExprArith2Tab (leftv res, leftv a, int op, const struct sValCmd2 *dA2, int at, const struct sConvertTypes *dConvertTypes) |
| apply an operation 'op' to arguments a and a->next return TRUE on failure More...
|
|
BOOLEAN | iiExprArith3Tab (leftv res, leftv a, int op, const struct sValCmd3 *dA3, int at, const struct sConvertTypes *dConvertTypes) |
| apply an operation 'op' to arguments a, a->next and a->next->next return TRUE on failure More...
|
|
BOOLEAN | iiCheckTypes (leftv args, const short *type_list, int report=0) |
| check a list of arguemys against a given field of types return TRUE if the types match return FALSE (and, if report) report an error via Werror otherwise More...
|
|
BOOLEAN | iiBranchTo (leftv r, leftv args) |
|
lists | rDecompose (const ring r) |
|
lists | rDecompose_list_cf (const ring r) |
|
BOOLEAN | rDecompose_CF (leftv res, const coeffs C) |
|
ring | rCompose (const lists L, const BOOLEAN check_comp=TRUE, const long bitmask=0x7fff, const int isLetterplace=FALSE) |
|
◆ sValCmd1
Definition at line 77 of file gentable.cc.
Data Fields |
short |
arg |
|
short |
cmd |
|
int |
p |
|
proc1 |
p |
|
short |
res |
|
short |
valid_for |
|
◆ sValCmd2
Definition at line 68 of file gentable.cc.
Data Fields |
short |
arg1 |
|
short |
arg2 |
|
short |
cmd |
|
int |
p |
|
proc2 |
p |
|
short |
res |
|
short |
valid_for |
|
◆ sValCmd3
Definition at line 85 of file gentable.cc.
Data Fields |
short |
arg1 |
|
short |
arg2 |
|
short |
arg3 |
|
short |
cmd |
|
int |
p |
|
proc3 |
p |
|
short |
res |
|
short |
valid_for |
|
◆ sValCmdM
Definition at line 95 of file gentable.cc.
Data Fields |
short |
cmd |
|
short |
number_of_args |
|
int |
p |
|
proc1 |
p |
|
short |
res |
|
short |
valid_for |
|
◆ sValAssign_sys
◆ sValAssign
◆ proc1
◆ proc2
◆ proc3
◆ proci
◆ exprlist_length()
int exprlist_length |
( |
leftv |
v | ) |
|
◆ iiAddCproc()
Definition at line 1005 of file iplib.cc.
1014 if (
IsCmd(procname,dummy))
1016 Werror(
">>%s< is a reserved name",procname);
1029 Warn(
"extend `%s`",procname);
1048 pi->is_static = pstatic;
1049 pi->data.o.function = func;
1053 if(
pi->data.o.function == func)
1065 pi->is_static = pstatic;
1066 pi->data.o.function = func;
1070 Warn(
"internal error: unknown procedure type %d",
pi->language);
1076 WarnS(
"iiAddCproc: failed.");
◆ iiAlias()
Definition at line 762 of file ipid.cc.
781 if ((
h->Typ()!=
p->Typ()) &&(
p->Typ()!=
DEF_CMD))
829 Werror(
"unknown type %d",
p->Typ());
834 int eff_typ=
h->Typ();
◆ iiAllStart()
Definition at line 293 of file iplib.cc.
311 (
pi->libname!=
NULL) && (
pi->libname[0]!=
'\0'))
313 if ((
pi->libname!=
NULL) && (
pi->libname[0]!=
'\0'))
314 Warn(
"option changed in proc %s from %s",
pi->procname,
pi->libname);
316 Warn(
"option changed in proc %s",
pi->procname);
◆ iiApply()
Definition at line 6411 of file ipshell.cc.
6430 WerrorS(
"first argument to `apply` must allow an index");
◆ iiARROW()
Definition at line 6460 of file ipshell.cc.
6463 char *ss=(
char*)
omAlloc(strlen(a)+strlen(
s)+30);
6465 int end_s=strlen(
s);
6466 while ((end_s>0) && ((
s[end_s]<=
' ')||(
s[end_s]==
';'))) end_s--;
6469 sprintf(
name,
"%s->%s",a,
s);
6471 int start_s=end_s-1;
6472 while ((start_s>=0) && (
s[start_s]!=
';')) start_s--;
6475 sprintf(ss,
"parameter def %s;return(%s);\n",a,
s);
6480 sprintf(ss,
"parameter def %s;%s;return(%s);\n",a,
s,
s+start_s+1);
6482 memset(r,0,
sizeof(*r));
6487 ((
procinfo *)r->data)->data.s.body=ss;
◆ iiAssign()
Definition at line 1829 of file ipassign.cc.
1833 int ll=
l->listLength();
1840 Werror(
"`%s` is read-only",
l->Name());
1850 else if (
l->attribute!=
NULL)
1878 if(bb->blackbox_CheckAssign(bb,
l,r))
return TRUE;
1881 if((!
b) && (like_lists==2))
1905 #ifdef BLACKBOX_DEVEL
1906 Print(
"bb-assign: bb=%lx\n",bb);
1908 return (bb==
NULL) || bb->blackbox_Assign(
l,r);
1978 if (rt==
NONE) rt=r->Typ();
1980 else if (ll==(rl=r->listLength()))
1987 if (rt==
NONE) rt=r->Typ();
1996 Werror(
"length of lists in assignment does not match (l:%d,r:%d)",
2031 WerrorS(
"expected ring-name");
2037 WerrorS(
"expected image ideal");
2057 char *pr=((
map)olm)->preimage;
2074 Warn(
"expression list length(%d) does not match matrix size(%d)",el,
num);
2130 for(
k=0;
k<
j;
k++,
i++)
2156 if (module_assign) lm->
rank=rk;
2157 else if (map_assign) ((
map)lm)->preimage=pr;
2175 Werror(
"cannot assign to %s",
l->Fullname());
◆ iiAssignCR()
Definition at line 6494 of file ipshell.cc.
6497 char* ring_name=
omStrDup((
char*)r->Name());
6502 memset(&tmp,0,
sizeof(tmp));
6520 memset(&n,0,
sizeof(n));
◆ iiBranchTo()
Definition at line 1181 of file ipshell.cc.
1187 WerrorS(
"branchTo can only occur in a proc");
1195 if (ll!=(
l-1))
return FALSE;
1198 short *t=(
short*)
omAlloc(
l*
sizeof(
short));
1202 for(
i=1;
i<
l;
i++,
h=
h->next)
1207 Werror(
"arg %d is not a string",
i);
1211 b=
IsCmd((
char *)
h->Data(),tt);
1216 Werror(
"arg %d is not a type name",
i);
1223 Werror(
"last(%d.) arg.(%s) is not a proc(but %s(%d)), nesting=%d",
1235 if(
pi->data.s.body==
NULL )
◆ iiCallLibProc1()
void* iiCallLibProc1 |
( |
const char * |
n, |
|
|
void * |
arg, |
|
|
int |
arg_type, |
|
|
BOOLEAN & |
err |
|
) |
| |
◆ iiCallLibProcM()
void* iiCallLibProcM |
( |
const char * |
n, |
|
|
void ** |
args, |
|
|
int * |
arg_types, |
|
|
BOOLEAN & |
err |
|
) |
| |
args: NULL terminated arry of arguments arg_types: 0 terminated array of corresponding types
Definition at line 647 of file iplib.cc.
669 tmp.
rtyp=arg_types[0];
670 while(arg_types[
i]!=0)
674 tt->
rtyp=arg_types[
i];
◆ iiCheckPack()
◆ iiCheckRing()
◆ iiCheckTypes()
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (and, if report) report an error via Werror otherwise
- Parameters
-
type_list | < [in] argument list (may be NULL) [in] field of types len, t1,t2,... |
report | ;in] report error? |
Definition at line 6550 of file ipshell.cc.
6556 if (type_list[0]==0)
return TRUE;
6559 if (
l!=(
int)type_list[0])
6564 for(
int i=1;
i<=
l;
i++,args=args->
next)
6566 short t=type_list[
i];
6570 || (t!=args->Typ()))
◆ iiConvName()
char* iiConvName |
( |
const char * |
libname | ) |
|
Definition at line 1373 of file iplib.cc.
1377 char *
p = strrchr(tmpname,
DIR_SEP);
1379 if(
p==
NULL)
p = tmpname;
else p++;
1382 while(isalnum(*r)||(*r==
'_')) r++;
◆ iiDebug()
Definition at line 986 of file ipshell.cc.
1013 else if(strncmp(
s,
"cont;",5)==0)
1020 strcat(
s,
"\n;~\n");
◆ iiDeclCommand()
Definition at line 1124 of file ipshell.cc.
1128 const char *
id =
name->name;
1130 memset(sy,0,
sizeof(
sleftv));
1133 WerrorS(
"object to declare is not a name");
◆ iiEStart()
Definition at line 699 of file iplib.cc.
711 printf(
"entering example (level %d)\n",
myynest);
723 printf(
"leaving -example- (level %d)\n",
myynest);
◆ iiExport() [1/2]
◆ iiExport() [2/2]
◆ iiExprArith1()
◆ iiExprArith1Tab()
apply an operation 'op' to an argument a return TRUE on failure
- Parameters
-
[out] | res | pre-allocated result |
[in] | a | argument |
[in] | op | operation |
[in] | dA1 | table of possible proc assumes dArith1[0].cmd==op |
[in] | at | a->Typ() |
[in] | dConvertTypes | table of type conversions |
Definition at line 8465 of file iparith.cc.
8475 while (dA1[
i].cmd==op)
8494 if ((call_failed=dA1[
i].
p(
res,a)))
8514 while (dA1[
i].cmd==op)
8538 || (call_failed=dA1[
i].
p(
res,an)));
8579 while (dA1[
i].cmd==op)
8583 Werror(
"expected %s(`%s`)"
◆ iiExprArith2()
◆ iiExprArith2Tab()
apply an operation 'op' to arguments a and a->next return TRUE on failure
- Parameters
-
[out] | res | pre-allocated result |
[in] | a | 2 arguments |
[in] | op | operation |
[in] | dA2 | table of possible proc assumes dA2[0].cmd==op |
[in] | at | a->Typ() |
[in] | dConvertTypes | table of type conversions |
Definition at line 8393 of file iparith.cc.
◆ iiExprArith3()
Definition at line 8808 of file iparith.cc.
8819 memcpy(&d->arg1,a,
sizeof(
sleftv));
8821 memcpy(&d->arg2,
b,
sizeof(
sleftv));
8823 memcpy(&d->arg3,c,
sizeof(
sleftv));
8827 res->data=(
char *)d;
8839 if(!bb->blackbox_Op3(op,
res,a,
b,c))
return FALSE;
◆ iiExprArith3Tab()
apply an operation 'op' to arguments a, a->next and a->next->next return TRUE on failure
- Parameters
-
[out] | res | pre-allocated result |
[in] | a | 3 arguments |
[in] | op | operation |
[in] | dA3 | table of possible proc assumes dA3[0].cmd==op |
[in] | at | a->Typ() |
[in] | dConvertTypes | table of type conversions |
Definition at line 8860 of file iparith.cc.
◆ iiExprArithM()
◆ iiGetLibName()
find the library of an proc
Definition at line 65 of file ipshell.h.
66 {
return pi->libname; }
◆ iiGetLibProcBuffer()
char* iiGetLibProcBuffer |
( |
procinfov |
pi, |
|
|
int |
part = 1 |
|
) |
| |
◆ iiGetLibStatus()
◆ iiHighCorner()
poly iiHighCorner |
( |
ideal |
i, |
|
|
int |
ak |
|
) |
| |
◆ iiInternalExport()
Definition at line 1370 of file ipshell.cc.
1376 Warn(
"'%s': no such identifier\n",
v->
name);
1379 package frompack=v->req_packhdl;
1393 v->req_packhdl=rootpack;
1394 if (
h==frompack->idroot)
1396 frompack->idroot=
h->next;
1400 idhdl hh=frompack->idroot;
1407 Werror(
"`%s` not found",
v->Name());
1411 h->next=rootpack->idroot;
◆ iiLibCmd()
Definition at line 826 of file iplib.cc.
856 WarnS(
"not of type package.");
860 if (!force)
return FALSE;
◆ iiLoadLIB()
Definition at line 915 of file iplib.cc.
945 WerrorS(
"Cannot load library,... aborting.");
955 Warn(
"library %s has old format. This format is still accepted,", newlib);
956 WarnS(
"but for functionality you may wish to change to the new");
957 WarnS(
"format. Please refer to the manual for further information.");
972 ls = ls->
pop(newlib);
976 PrintS(
"--------------------\n");
979 Print(
"%s: LIB-stack:(%d), %s %s\n", newlib, ls->
cnt, ls->
get(),
982 PrintS(
"--------------------\n");
◆ iiLocateLib()
◆ iiMake_proc()
Definition at line 485 of file iplib.cc.
492 Werror(
"'%s::%s()' is a local procedure and cannot be accessed by an user.",
493 pi->libname,
pi->procname);
510 switch (
pi->language)
537 err = (
pi->data.o.function)(
res, sl);
561 if (!err)
Warn(
"too many arguments for %s",
IDID(pn));
◆ iiMakeResolv()
void iiMakeResolv |
( |
resolvente |
r, |
|
|
int |
length, |
|
|
int |
rlen, |
|
|
char * |
name, |
|
|
int |
typ0, |
|
|
intvec ** |
weights = NULL |
|
) |
| |
Definition at line 768 of file ipshell.cc.
779 sprintf(
s,
"%s(%d)",
name,
i+1);
786 h->data.uideal=(ideal)L->
m[
i].
data;
789 Print(
"//defining: %s as %d-th syzygy module\n",
s,
i+1);
794 Warn(
"cannot define %s",
s);
◆ iiMap()
Definition at line 609 of file ipshell.cc.
631 Werror(
"can not map from ground field of %s to current ground field",
635 if (
IDELEMS(theMap)<src_ring->N)
639 (src_ring->N)*
sizeof(poly));
646 WerrorS(
"argument of a map must have a name");
653 memset(&tmpW,0,
sizeof(
sleftv));
658 save_r=
IDMAP(
w)->preimage;
668 ideal
id=(ideal)tmpW.
data;
676 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
678 if (theMap->m[
j]!=
NULL)
685 if ((
p!=
NULL) && (degs[
i]!=0) &&
686 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)degs[
i])/2)))
698 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
700 if (theMap->m[
j]!=
NULL)
703 poly
p=(poly)tmpW.
data;
706 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)deg)/2)))
715 Warn(
"possible OVERFLOW in map, max exponent is %ld",
currRing->bitmask/2);
731 char *tmp = theMap->preimage;
732 theMap->preimage=(
char*)1L;
735 theMap->preimage=tmp;
750 IDMAP(
w)->preimage=save_r;
758 Werror(
"%s undefined in %s",what,theMap->preimage);
763 Werror(
"cannot find preimage %s",theMap->preimage);
◆ iiOpsTwoChar()
int iiOpsTwoChar |
( |
const char * |
s | ) |
|
Definition at line 116 of file ipshell.cc.
120 if (
s[1]==
'\0')
return s[0];
121 else if (
s[2]!=
'\0')
return 0;
124 case '.':
if (
s[1]==
'.')
return DOTDOT;
130 case '+':
if (
s[1]==
'+')
return PLUSPLUS;
134 case '<':
if (
s[1]==
'=')
return LE;
137 case '>':
if (
s[1]==
'=')
return GE;
139 case '!':
if (
s[1]==
'=')
return NOTEQUAL;
◆ iiParameter()
Definition at line 1282 of file ipshell.cc.
1287 if (strcmp(
p->name,
"#")==0)
1296 if (strcmp(
p->name,
"#")==0)
1298 is_default_list=
TRUE;
1306 if (is_default_list)
◆ iiProcArgs()
char* iiProcArgs |
( |
char * |
e, |
|
|
BOOLEAN |
withParenth |
|
) |
| |
Definition at line 109 of file iplib.cc.
112 while ((*e==
' ') || (*e==
'\t') || (*e==
'(')) e++;
118 return omStrDup(
"parameter list #;");
129 char *argstr=(
char *)
omAlloc(127);
141 if ((*
s==
' ')||(*
s==
'\t'))
143 else if ((*
s==
'\n')&&(*(
s+1)==
' '))
150 &&((par!=0) || (*e!=
')'))
154 else if (*e==
')') par--;
155 args_found=args_found || (*e>
' ');
163 if ((
int)strlen(argstr)+12 +(int)strlen(
s)>= argstrlen)
166 char *a=(
char *)
omAlloc( argstrlen);
172 if(strncmp(
s,
"alias ",6)!=0)
174 strcat(argstr,
"parameter ");
◆ iiProcName()
char* iiProcName |
( |
char * |
buf, |
|
|
char & |
ct, |
|
|
char *& |
e |
|
) |
| |
Definition at line 95 of file iplib.cc.
101 while ((*e>
' ') && (*e!=
'(')) e++;
◆ iiPStart()
Definition at line 353 of file iplib.cc.
368 save_flags=
pi->trace_flag;
369 if(
pi->data.s.body==
NULL )
415 if (oh!=
NULL) o=oh->id;
421 Werror(
"ring change during procedure call %s: %s -> %s (level %d)",
pi->procname,o,n,
myynest);
448 pi->trace_flag=save_flags;
◆ iiRegularity()
int iiRegularity |
( |
lists |
L | ) |
|
Definition at line 958 of file ipshell.cc.
973 add_row_shift = ww->
min_in();
974 (*weights) -= add_row_shift;
979 if (weights!=
NULL)
delete weights;
982 return reg+1+add_row_shift;
◆ iiTestAssume()
Definition at line 6433 of file ipshell.cc.
6440 char assume_yylinebuf[80];
6442 int lev=(long)a->
Data();
6449 if (bo) {
WerrorS(
"syntax error in ASSUME");
return TRUE;}
6451 if (
b->Data()==
NULL) {
Werror(
"ASSUME failed:%s",assume_yylinebuf);
return TRUE;}
◆ iiTokType()
◆ iiTryLoadLib()
Definition at line 764 of file iplib.cc.
769 char *libname = (
char *)
omAlloc(strlen(
id)+5);
770 const char *suffix[] = {
"",
".lib",
".so",
".sl",
NULL };
776 for(
i=0; suffix[
i] !=
NULL;
i++)
778 sprintf(libname,
"%s%s",
id, suffix[
i]);
783 #ifdef HAVE_DYNAMIC_LOADING
789 #ifdef HAVE_DYNAMIC_LOADING
◆ iiTwoOps()
const char* iiTwoOps |
( |
int |
t | ) |
|
Definition at line 261 of file gentable.cc.
287 case LE:
return "<=";
288 case GE:
return ">=";
◆ iiWRITE()
◆ IsCmd()
int IsCmd |
( |
const char * |
n, |
|
|
int & |
tok |
|
) |
| |
Definition at line 9007 of file iparith.cc.
9065 Warn(
"outdated identifier `%s` used - please change your code",
◆ jjBETTI()
Definition at line 888 of file ipshell.cc.
892 memset(&tmp,0,
sizeof(tmp));
◆ jjBETTI2()
Definition at line 922 of file ipshell.cc.
937 add_row_shift = ww->
min_in();
938 (*weights) -= add_row_shift;
945 res->data=(
void*)res_im;
948 for(
int i=1;
i<=res_im->
rows();
i++)
950 if (
IMATELEM(*res_im,1,
i)==0) { add_row_shift--; }
955 if (weights!=
NULL)
delete weights;
◆ jjBETTI2_ID()
Definition at line 901 of file ipshell.cc.
906 l->m[0].rtyp=u->
Typ();
907 l->m[0].data=u->
Data();
910 l->m[0].attribute=*a;
917 l->m[0].attribute=
NULL;
◆ jjCHARSERIES()
◆ jjIMPORTFROM()
Definition at line 2233 of file ipassign.cc.
2238 char *vn=(
char *)
v->Name();
2245 WarnS(
"source and destination packages are identical");
2257 memset(&h_expr,0,
sizeof(h_expr));
2261 return iiAssign(&tmp_expr,&h_expr);
2265 Werror(
"`%s` not found in `%s`",
v->Name(), u->
Name());
◆ jjLIST_PL()
Definition at line 7627 of file iparith.cc.
7630 if (
v!=
NULL) sl =
v->listLength();
7634 int add_row_shift = 0;
7636 if (weights!=
NULL) add_row_shift=weights->
min_in();
7663 Werror(
"`%s` is undefined",
h->Fullname());
7669 ((ring)L->
m[
i].
data)->ref++;
7675 res->data=(
char *)L;
◆ jjLOAD()
load lib/module given in v
Definition at line 5362 of file iparith.cc.
5367 #ifdef HAVE_DYNAMIC_LOADING
5374 Werror(
"%s: unknown type",
s);
5392 Werror(
"can not create package `%s`",plib);
5398 package pa=IDPACKAGE(pl);
5402 Werror(
"can not create package `%s` - binaries exists",plib);
5408 package savepack=currPack;
5424 #ifdef HAVE_DYNAMIC_LOADING
5427 WerrorS(
"Dynamic modules are not supported by this version of Singular");
◆ jjLOAD_TRY()
◆ jjMINRES()
Definition at line 867 of file ipshell.cc.
874 int add_row_shift = 0;
877 if (weights!=
NULL) add_row_shift=weights->
min_in();
◆ jjRESULTANT()
◆ jjSYSTEM()
Definition at line 231 of file extra.cc.
235 const char *sys_cmd=(
char *)(args->Data());
240 if (strcmp(sys_cmd,
"nblocks") == 0)
262 r = (ring)
h->Data();
269 if(strcmp(sys_cmd,
"version")==0)
277 if(strcmp(sys_cmd,
"alarm")==0)
284 struct itimerval t,o;
285 memset(&t,0,
sizeof(t));
286 t.it_value.tv_sec =(unsigned)((
unsigned long)
h->Data());
287 setitimer(ITIMER_VIRTUAL,&t,&o);
295 if(strcmp(sys_cmd,
"cpu")==0)
298 #ifdef _SC_NPROCESSORS_ONLN
299 cpu=sysconf(_SC_NPROCESSORS_ONLN);
300 #elif defined(_SC_NPROCESSORS_CONF)
301 cpu=sysconf(_SC_NPROCESSORS_CONF);
303 res->data=(
void *)cpu;
309 if(strcmp(sys_cmd,
"executable")==0)
324 if(strcmp(sys_cmd,
"flatten")==0)
337 if(strcmp(sys_cmd,
"unflatten")==0)
350 if(strcmp(sys_cmd,
"neworder")==0)
364 if(strcmp(sys_cmd,
"nc_hilb") == 0)
372 i = (ideal)
h->Data();
375 WerrorS(
"nc_Hilb:ideal expected");
380 lV = (int)(
long)
h->Data();
383 WerrorS(
"nc_Hilb:int expected");
389 if((
int)(
long)
h->Data() == 1)
391 else if((
int)(long)
h->Data() == 2)
396 trunDegHs = (
int)(long)
h->Data();
401 WerrorS(
"nc_Hilb:int 1,2, total degree for the truncation, and a string for printing the details are expected");
410 if(strcmp(sys_cmd,
"rcolon") == 0)
415 ideal
i = (ideal)
h->Data();
417 poly
w=(poly)
h->Data();
419 int lV = (int)(
long)
h->Data();
430 if(strcmp(sys_cmd,
"sh")==0)
434 WerrorS(
"shell execution is disallowed in restricted mode");
440 res->data = (
void*)(long)
system((
char*)(
h->Data()));
447 if(strcmp(sys_cmd,
"reduce_bound")==0)
457 p = (poly)
h->CopyD();
461 pid = (ideal)
h->CopyD();
466 ideal q = (ideal)
h->next->CopyD();
467 int bound = (int)(
long)
h->next->next->Data();
476 if(strcmp(sys_cmd,
"uname")==0)
484 if(strcmp(sys_cmd,
"with")==0)
494 #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
495 char *
s=(
char *)
h->Data();
508 #ifdef TEST_MAC_ORDER
513 #ifdef HAVE_DYNAMIC_LOADING
536 if (strcmp(sys_cmd,
"browsers")==0)
546 if (strcmp(sys_cmd,
"pid")==0)
549 res->data=(
void *)(
long) getpid();
554 if (strcmp(sys_cmd,
"getenv")==0)
559 const char *r=
getenv((
char *)
h->Data());
572 if (strcmp(sys_cmd,
"setenv")==0)
579 setenv((
char *)
h->Data(), (
char *)
h->next->Data(), 1);
589 WerrorS(
"setenv not supported on this platform");
595 if (strcmp(sys_cmd,
"Singular") == 0)
604 if (strcmp(sys_cmd,
"SingularLib") == 0)
614 if (strstr(sys_cmd,
"--") == sys_cmd)
616 if (strcmp(sys_cmd,
"--") == 0)
624 Werror(
"Unknown option %s", sys_cmd);
625 WerrorS(
"Use 'system(\"--\");' for listing of available options");
640 const char *r=(
const char*)
feOptSpec[opt].value;
654 WerrorS(
"Need string or int argument to set option value");
657 const char* errormsg;
662 Werror(
"Need string argument to set value of option %s", sys_cmd);
666 if (errormsg !=
NULL)
667 Werror(
"Option '--%s=%d' %s", sys_cmd, (
int) ((
long)
h->Data()), errormsg);
672 if (errormsg !=
NULL)
673 Werror(
"Option '--%s=%s' %s", sys_cmd, (
char*)
h->Data(), errormsg);
680 if (strcmp(sys_cmd,
"HC")==0)
688 if(strcmp(sys_cmd,
"random")==0)
711 if (strcmp(sys_cmd,
"std_syz") == 0)
717 i1=(ideal)
h->CopyD();
723 i2=(int)((
long)
h->Data());
732 if (strcmp(sys_cmd,
"denom_list")==0)
741 if(strcmp(sys_cmd,
"complexNearZero")==0)
748 WerrorS(
"unsupported ground field!");
755 (int)((
long)(
h->next->Data())));
766 if(strcmp(sys_cmd,
"getPrecDigits")==0)
771 WerrorS(
"unsupported ground field!");
782 if(strcmp(sys_cmd,
"lduDecomp")==0)
789 poly
l; poly u; poly prodLU;
790 lduDecomp(aMat, pMat, lMat, dMat, uMat,
l, u, prodLU);
801 res->data = (
char *)L;
811 if(strcmp(sys_cmd,
"lduSolve")==0)
845 poly
l = (poly)
h->next->next->next->next->Data();
846 poly u = (poly)
h->next->next->next->next->next->Data();
847 poly lTimesU = (poly)
h->next->next->next->next->next->next->Data();
848 matrix bVec = (
matrix)
h->next->next->next->next->next->next->next->Data();
852 Werror(
"first matrix (%d x %d) is not quadratic",
858 Werror(
"second matrix (%d x %d) is not quadratic",
864 Werror(
"third matrix (%d x %d) is not quadratic",
870 Werror(
"third matrix (%d x %d) and fourth matrix (%d x %d) %s",
877 Werror(
"fourth matrix (%d x %d) and vector (%d x 1) do not fit",
882 bVec, xVec, homogSolSpace);
905 if (strcmp(sys_cmd,
"shared") == 0)
907 #ifndef SI_COUNTEDREF_AUTOLOAD
914 else if (strcmp(sys_cmd,
"reference") == 0)
916 #ifndef SI_COUNTEDREF_AUTOLOAD
925 #ifdef HAVE_SIMPLEIPC
926 if (strcmp(sys_cmd,
"semaphore")==0)
932 v=(int)(
long)
h->next->next->Data();
939 WerrorS(
"Usage: system(\"semaphore\",<cmd>,int)");
946 if (strcmp(sys_cmd,
"reserve")==0)
954 res->data=(
void*)(
long)
p;
961 if (strcmp(sys_cmd,
"reservedLink")==0)
970 if (strcmp(sys_cmd,
"install")==0)
976 (int)(
long)
h->next->next->next->Data(),
983 if (strcmp(sys_cmd,
"newstruct")==0)
989 char *n=(
char*)
h->Data();
996 newstruct_desc desc=(newstruct_desc)bb->data;
1000 else Werror(
"'%s' is not a newstruct",n);
1002 else Werror(
"'%s' is not a blackbox object",n);
1008 if (strcmp(sys_cmd,
"blackbox")==0)
1016 if (strcmp(sys_cmd,
"absFact") == 0)
1033 l->m[0].data=(
void *)
f;
1035 l->m[1].data=(
void *)
v;
1037 l->m[2].data=(
void*) mipos;
1039 l->m[3].data=(
void*) (
long) n;
1040 res->data=(
void *)
l;
1049 if (strcmp(sys_cmd,
"LLL") == 0)
1072 #if __FLINT_RELEASE >= 20500
1073 if (strcmp(sys_cmd,
"LLL_Flint") == 0)
1094 WerrorS(
"matrix,int or bigint,int expected");
1099 if(((
int)((
long)(
h->next->Data())) != 0) && (
int)((long)(
h->next->Data()) != 1))
1101 WerrorS(
"int is different from 0, 1");
1105 if((
long)(
h->next->Data()) == 0)
1120 if((
long)(
h->next->Data()) == 1)
1126 for(
int i = 1;
i<=
m->rows();
i++)
1131 m = singflint_LLL(
m,
T);
1144 for(
int i = 1;
i<=
m->rows();
i++)
1146 m = singflint_LLL(
m,
T);
1167 if(strcmp(sys_cmd,
"pcvLAddL")==0)
1172 if(strcmp(sys_cmd,
"pcvPMulL")==0)
1177 if(strcmp(sys_cmd,
"pcvMinDeg")==0)
1182 if(strcmp(sys_cmd,
"pcvP2CV")==0)
1187 if(strcmp(sys_cmd,
"pcvCV2P")==0)
1192 if(strcmp(sys_cmd,
"pcvDim")==0)
1197 if(strcmp(sys_cmd,
"pcvBasis")==0)
1204 #ifdef HAVE_EIGENVAL
1205 if(strcmp(sys_cmd,
"hessenberg")==0)
1212 #ifdef HAVE_EIGENVAL
1213 if(strcmp(sys_cmd,
"eigenvals")==0)
1220 #ifdef HAVE_EIGENVAL
1221 if(strcmp(sys_cmd,
"rowelim")==0)
1228 #ifdef HAVE_EIGENVAL
1229 if(strcmp(sys_cmd,
"rowcolswap")==0)
1237 if(strcmp(sys_cmd,
"gmsnf")==0)
1244 if(strcmp(sys_cmd,
"contributors") == 0)
1248 "Olaf Bachmann, Michael Brickenstein, Hubert Grassmann, Kai Krueger, Victor Levandovskyy, Wolfgang Neumann, Thomas Nuessler, Wilfred Pohl, Jens Schmidt, Mathias Schulze, Thomas Siebert, Ruediger Stobbe, Moritz Wenk, Tim Wichmann");
1253 #ifdef HAVE_SPECTRUM
1254 if(strcmp(sys_cmd,
"spectrum") == 0)
1268 if(((
long)
h->next->Data())==1L)
1274 if(strcmp(sys_cmd,
"semic") == 0)
1280 if (
h->next->next==
NULL)
1282 else if (
h->next->next->Typ()==
INT_CMD)
1289 if(strcmp(sys_cmd,
"spadd") == 0)
1300 if(strcmp(sys_cmd,
"spmul") == 0)
1312 #define HAVE_SHEAFCOH_TRICKS 1
1314 #ifdef HAVE_SHEAFCOH_TRICKS
1315 if(strcmp(sys_cmd,
"tensorModuleMult")==0)
1321 int m = (int)( (
long)
h->Data() );
1322 ideal
M = (ideal)
h->next->Data();
1333 if (strcmp(sys_cmd,
"twostd") == 0)
1338 I=(ideal)
h->CopyD();
1352 if (strcmp(sys_cmd,
"bracket") == 0)
1357 poly
p=(poly)
h->CopyD();
1359 poly q=(poly)
h->Data();
1370 if (strcmp(sys_cmd,
"env")==0)
1374 ring r = (ring)
h->Data();
1381 WerrorS(
"`system(\"env\",<ring>)` expected");
1389 if (strcmp(sys_cmd,
"opp")==0)
1393 ring r=(ring)
h->Data();
1400 WerrorS(
"`system(\"opp\",<ring>)` expected");
1408 if (strcmp(sys_cmd,
"oppose")==0)
1411 && (
h->next!=
NULL))
1413 ring Rop = (ring)
h->Data();
1426 WerrorS(
"`system(\"oppose\",<ring>,<poly>)` expected");
1436 if (strcmp(sys_cmd,
"walkNextWeight") == 0)
1443 Werror(
"system(\"walkNextWeight\" ...) intvecs not of length %d\n",
1447 res->data = (
void*) walkNextWeight(((
intvec*)
h->Data()),
1449 (ideal)
h->next->next->Data());
1450 if (
res->data ==
NULL ||
res->data == (
void*) 1L)
1466 if (strcmp(sys_cmd,
"walkInitials") == 0)
1470 WerrorS(
"system(\"walkInitials\", ideal) expected");
1473 res->data = (
void*) walkInitials((ideal)
h->Data());
1483 if (strcmp(sys_cmd,
"walkAddIntVec") == 0)
1489 res->data = (
intvec*) walkAddIntVec(arg1, arg2);
1498 #ifdef MwaklNextWeight
1499 if (strcmp(sys_cmd,
"MwalkNextWeight") == 0)
1506 Werror(
"system(\"MwalkNextWeight\" ...) intvecs not of length %d\n",
1512 ideal arg3 = (ideal)
h->next->next->Data();
1519 #endif //MWalkNextWeight
1523 if(strcmp(sys_cmd,
"Mivdp") == 0)
1527 WerrorS(
"system(\"Mivdp\", int) expected");
1530 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1532 Werror(
"system(\"Mivdp\" ...) intvecs not of length %d\n",
1536 int arg1 = (int) ((
long)(
h->Data()));
1546 if(strcmp(sys_cmd,
"Mivlp") == 0)
1550 WerrorS(
"system(\"Mivlp\", int) expected");
1553 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1555 Werror(
"system(\"Mivlp\" ...) intvecs not of length %d\n",
1559 int arg1 = (int) ((
long)(
h->Data()));
1570 if(strcmp(sys_cmd,
"MpDiv") == 0)
1574 poly arg1 = (poly)
h->Data();
1575 poly arg2 = (poly)
h->next->Data();
1576 poly
result = MpDiv(arg1, arg2);
1587 if(strcmp(sys_cmd,
"MpMult") == 0)
1591 poly arg1 = (poly)
h->Data();
1592 poly arg2 = (poly)
h->next->Data();
1593 poly
result = MpMult(arg1, arg2);
1603 if (strcmp(sys_cmd,
"MivSame") == 0)
1624 res->data = (
void*)(
long)
MivSame(arg1, arg2);
1631 if (strcmp(sys_cmd,
"M3ivSame") == 0)
1654 res->data = (
void*)(
long)
M3ivSame(arg1, arg2, arg3);
1661 if(strcmp(sys_cmd,
"MwalkInitialForm") == 0)
1667 Werror(
"system \"MwalkInitialForm\"...) intvec not of length %d\n",
1671 ideal
id = (ideal)
h->Data();
1683 if(strcmp(sys_cmd,
"MivMatrixOrder") == 0)
1687 WerrorS(
"system(\"MivMatrixOrder\",intvec) expected");
1700 if(strcmp(sys_cmd,
"MivMatrixOrderdp") == 0)
1704 WerrorS(
"system(\"MivMatrixOrderdp\",intvec) expected");
1707 int arg1 = (int) ((
long)(
h->Data()));
1717 if(strcmp(sys_cmd,
"MPertVectors") == 0)
1721 ideal arg1 = (ideal)
h->Data();
1723 int arg3 = (int) ((
long)(
h->next->next->Data()));
1733 if(strcmp(sys_cmd,
"MPertVectorslp") == 0)
1737 ideal arg1 = (ideal)
h->Data();
1739 int arg3 = (int) ((
long)(
h->next->next->Data()));
1749 if(strcmp(sys_cmd,
"Mfpertvector") == 0)
1753 ideal arg1 = (ideal)
h->Data();
1764 if(strcmp(sys_cmd,
"MivUnit") == 0)
1768 int arg1 = (int) ((
long)(
h->Data()));
1778 if(strcmp(sys_cmd,
"MivWeightOrderlp") == 0)
1792 if(strcmp(sys_cmd,
"MivWeightOrderdp") == 0)
1796 WerrorS(
"system(\"MivWeightOrderdp\",intvec) expected");
1810 if(strcmp(sys_cmd,
"MivMatrixOrderlp") == 0)
1814 WerrorS(
"system(\"MivMatrixOrderlp\",int) expected");
1817 int arg1 = (int) ((
long)(
h->Data()));
1827 if (strcmp(sys_cmd,
"MkInterRedNextWeight") == 0)
1834 Werror(
"system(\"MkInterRedNextWeight\" ...) intvecs not of length %d\n",
1840 ideal arg3 = (ideal)
h->next->next->Data();
1850 #ifdef MPertNextWeight
1851 if (strcmp(sys_cmd,
"MPertNextWeight") == 0)
1857 Werror(
"system(\"MPertNextWeight\" ...) intvecs not of length %d\n",
1862 ideal arg2 = (ideal)
h->next->Data();
1863 int arg3 = (int)
h->next->next->Data();
1870 #endif //MPertNextWeight
1874 #ifdef Mivperttarget
1875 if (strcmp(sys_cmd,
"Mivperttarget") == 0)
1879 ideal arg1 = (ideal)
h->Data();
1880 int arg2 = (int)
h->next->Data();
1887 #endif //Mivperttarget
1891 if (strcmp(sys_cmd,
"Mwalk") == 0)
1898 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d\n",
1902 ideal arg1 = (ideal)
h->CopyD();
1905 ring arg4 = (ring)
h->next->next->next->Data();
1906 int arg5 = (int) (
long)
h->next->next->next->next->Data();
1907 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
1908 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3, arg4, arg5, arg6);
1918 if (strcmp(sys_cmd,
"Mwalk") == 0)
1927 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d or %d\n",
1931 ideal arg1 = (ideal)
h->Data();
1934 ring arg4 = (ring)
h->next->next->next->Data();
1935 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3,arg4);
1942 if (strcmp(sys_cmd,
"Mpwalk") == 0)
1949 Werror(
"system(\"Mpwalk\" ...) intvecs not of length %d\n",
currRing->N);
1952 ideal arg1 = (ideal)
h->Data();
1953 int arg2 = (int) (
long)
h->next->Data();
1954 int arg3 = (int) (
long)
h->next->next->Data();
1957 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
1958 int arg7 = (int) (
long)
h->next->next->next->next->next->next->Data();
1959 int arg8 = (int) (
long)
h->next->next->next->next->next->next->next->Data();
1960 ideal
result = (ideal)
Mpwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1970 if (strcmp(sys_cmd,
"Mrwalk") == 0)
1979 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
1983 ideal arg1 = (ideal)
h->Data();
1986 int arg4 = (int)(
long)
h->next->next->next->Data();
1987 int arg5 = (int)(
long)
h->next->next->next->next->Data();
1988 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
1989 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
1990 ideal
result = (ideal)
Mrwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1999 if (strcmp(sys_cmd,
"MAltwalk1") == 0)
2006 Werror(
"system(\"MAltwalk1\" ...) intvecs not of length %d\n",
2010 ideal arg1 = (ideal)
h->Data();
2011 int arg2 = (int) ((
long)(
h->next->Data()));
2012 int arg3 = (int) ((
long)(
h->next->next->Data()));
2025 if (strcmp(sys_cmd,
"Mfwalk_alt") == 0)
2032 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2036 ideal arg1 = (ideal)
h->Data();
2039 int arg4 = (int)
h->next->next->next->Data();
2040 ideal
result = (ideal) Mfwalk_alt(arg1, arg2, arg3, arg4);
2050 if (strcmp(sys_cmd,
"Mfwalk") == 0)
2057 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2061 ideal arg1 = (ideal)
h->Data();
2064 int arg4 = (int)(
long)
h->next->next->next->Data();
2065 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2066 ideal
result = (ideal)
Mfwalk(arg1, arg2, arg3, arg4, arg5);
2075 if (strcmp(sys_cmd,
"Mfrwalk") == 0)
2092 Werror(
"system(\"Mfrwalk\" ...) intvecs not of length %d or %d\n",
2097 ideal arg1 = (ideal)
h->Data();
2100 int arg4 = (int)(
long)
h->next->next->next->Data();
2101 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2102 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2103 ideal
result = (ideal)
Mfrwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2110 if (strcmp(sys_cmd,
"Mprwalk") == 0)
2119 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2123 ideal arg1 = (ideal)
h->Data();
2126 int arg4 = (int)(
long)
h->next->next->next->Data();
2127 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2128 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2129 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2130 int arg8 = (int)(
long)
h->next->next->next->next->next->next->next->Data();
2131 int arg9 = (int)(
long)
h->next->next->next->next->next->next->next->next->Data();
2132 ideal
result = (ideal)
Mprwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2142 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2149 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2153 ideal arg1 = (ideal)
h->Data();
2166 if (strcmp(sys_cmd,
"MAltwalk2") == 0)
2173 Werror(
"system(\"MAltwalk2\" ...) intvecs not of length %d\n",
2177 ideal arg1 = (ideal)
h->Data();
2189 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2196 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2200 ideal arg1 = (ideal)
h->Data();
2203 int arg4 = (int) ((
long)(
h->next->next->next->Data()));
2214 if (strcmp(sys_cmd,
"TranMrImprovwalk") == 0)
2219 h->next->next->next ==
NULL ||
h->next->next->next->Typ() !=
INT_CMD ||
2220 h->next->next->next ==
NULL ||
h->next->next->next->next->Typ() !=
INT_CMD ||
2221 h->next->next->next ==
NULL ||
h->next->next->next->next->next->Typ() !=
INT_CMD)
2223 WerrorS(
"system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
2229 Werror(
"system(\"TranMrImprovwalk\" ...) intvecs not of length %d\n",
currRing->N);
2232 ideal arg1 = (ideal)
h->Data();
2235 int arg4 = (int)(
long)
h->next->next->next->Data();
2236 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2237 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2238 ideal
result = (ideal) TranMrImprovwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2248 #ifndef MAKE_DISTRIBUTION
◆ jjVARIABLES_ID()
Definition at line 6305 of file ipshell.cc.
6309 ideal I=(ideal)u->
Data();
6312 for(
i=I->nrows*I->ncols-1;
i>=0;
i--)
◆ jjVARIABLES_P()
◆ killlocals()
◆ kQHWeight()
◆ kWeight()
Definition at line 3274 of file ipshell.cc.
3277 ideal F=(ideal)id->
Data();
3283 res->data=(
char *)iv;
3287 double wNsqr = (double)2.0 / (
double)n;
3289 x = (
int * )
omAlloc(2 * (n + 1) *
sizeof(int));
3291 for (
i = n;
i!=0;
i--)
3292 (*iv)[
i-1] =
x[
i + n + 1];
◆ list_cmd()
Definition at line 419 of file ipshell.cc.
422 package savePack=currPack;
429 if (strcmp(what,
"all")==0)
464 Werror(
"%s is undefined",what);
498 package save_p=currPack;
◆ loNewtonP()
compute Newton Polytopes of input polynomials
Definition at line 4536 of file ipshell.cc.
◆ loSimplex()
Implementation of the Simplex Algorithm.
For args, see class simplex.
Definition at line 4542 of file ipshell.cc.
4547 WerrorS(
"Ground field not implemented!");
4567 LP->
m= (int)(
long)(
v->Data());
4573 LP->
n= (int)(
long)(
v->Data());
4579 LP->
m1= (int)(
long)(
v->Data());
4585 LP->
m2= (int)(
long)(
v->Data());
4591 LP->
m3= (int)(
long)(
v->Data());
4593 #ifdef mprDEBUG_PROT
4594 Print(
"m (constraints) %d\n",LP->
m);
4595 Print(
"n (columns) %d\n",LP->
n);
4619 lres->
m[4].
data=(
void*)(
long)LP->
m;
4622 lres->
m[5].
data=(
void*)(
long)LP->
n;
4624 res->data= (
void*)lres;
◆ mpJacobi()
◆ mpKoszul()
Definition at line 3066 of file ipshell.cc.
3069 int n=(int)(
long)
b->Data();
3070 int d=(int)(
long)c->
Data();
3077 if ((d>n) || (d<1) || (n<1))
3082 int *choise = (
int*)
omAlloc(d*
sizeof(
int));
3086 temp=(ideal)id->
Data();
3101 p =
pCopy(temp->m[choise[
l-1]-1]);
◆ nuLagSolve()
find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial using Laguerres' root-solver.
Good for polynomials with low and middle degree (<40). Arguments 3: poly arg1 , int arg2 , int arg3 arg2>0: defines precision of fractional part if ground field is Q arg3: number of iterations for approximation of roots (default=2) Returns a list of all (complex) roots of the polynomial arg1
Definition at line 4651 of file ipshell.cc.
4656 gls= (poly)(arg1->
Data());
4657 int howclean= (int)(
long)arg3->
Data();
4664 WerrorS(
"Ground field not implemented!");
4671 unsigned long int ii = (
unsigned long int)arg2->
Data();
4677 WerrorS(
"Input polynomial is constant!");
4703 if ( (vpos !=
i) && (
pGetExp( piter,
i ) != 0) )
4705 WerrorS(
"The input polynomial must be univariate!");
4713 number * pcoeffs= (number *)
omAlloc( (deg+1) *
sizeof( number ) );
4715 for (
i= deg;
i >= 0;
i-- )
4729 #ifdef mprDEBUG_PROT
4730 for (
i=deg;
i >= 0;
i--)
4738 roots->
solver( howclean );
4745 rlist->
Init( elem );
4749 for (
j= 0;
j < elem;
j++ )
4758 for (
j= 0;
j < elem;
j++ )
4762 rlist->
m[
j].
data=(
void *)dummy;
4776 res->data= (
void*)rlist;
◆ nuMPResMat()
returns module representing the multipolynomial resultant matrix Arguments 2: ideal i, int k k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default)
Definition at line 4628 of file ipshell.cc.
4631 ideal gls = (ideal)(arg1->
Data());
4632 int imtype= (int)(
long)arg2->
Data();
◆ nuUResSolve()
solve a multipolynomial system using the u-resultant Input ideal must be 0-dimensional and (currRing->N) == IDELEMS(ideal).
Resultant method can be MPR_DENSE, which uses Macaulay Resultant (good for dense homogeneous polynoms) or MPR_SPARSE, which uses Sparse Resultant (Gelfand, Kapranov, Zelevinsky). Arguments 4: ideal i, int k, int l, int m k=0: use sparse resultant matrix of Gelfand, Kapranov and Zelevinsky k=1: use resultant matrix of Macaulay (k=0 is default) l>0: defines precision of fractional part if ground field is Q m=0,1,2: number of iterations for approximation of roots (default=2) Returns a list containing the roots of the system.
Definition at line 4881 of file ipshell.cc.
4893 else gls= (ideal)(
v->Data());
4899 else imtype= (int)(
long)
v->Data();
4904 ideal test_id=
idInit(1,1);
4908 if (gls->m[
j]!=
NULL)
4910 test_id->m[0]=gls->m[
j];
4914 WerrorS(
"Newton polytope not of expected dimension");
4928 unsigned long int ii=(
unsigned long int)
v->Data();
4936 else howclean= (int)(
long)
v->Data();
4965 WerrorS(
"Error occurred during matrix setup!");
4973 #ifdef mprDEBUG_PROT
4978 WerrorS(
"Unsuitable input ideal: Minor of resultant matrix is singular!");
4984 if ( interpolate_det )
4990 if ( interpolate_det )
4995 #ifdef mprDEBUG_PROT
4997 for (
i=0;
i < c;
i++)
pWrite(iproots[
i]->getPoly());
4999 for (
i=0;
i < c;
i++)
pWrite(muiproots[
i]->getPoly());
5003 arranger=
new rootArranger( iproots, muiproots, howclean );
5014 WerrorS(
"Solver was unable to find any roots!");
5020 for (
i=0;
i <
count;
i++)
delete iproots[
i];
5023 for (
i=0;
i <
count;
i++)
delete muiproots[
i];
5030 res->data= (
void *)listofroots;
◆ nuVanderSys()
COMPUTE: polynomial p with values given by v at points p1,..,pN derived from p; more precisely: consider p as point in K^n and v as N elements in K, let p1,..,pN be the points in K^n obtained by evaluating all monomials of degree 0,1,...,N at p in lexicographical order, then the procedure computes the polynomial f satisfying f(pi) = v[i] RETURN: polynomial f of degree d.
Definition at line 4780 of file ipshell.cc.
4785 p= (ideal)arg1->
Data();
4786 w= (ideal)arg2->
Data();
4797 int tdg= (int)(
long)arg3->
Data();
4804 WerrorS(
"Last input parameter must be > 0!");
4812 if (
m != (
int)
pow((
double)tdg+1,(
double)n) )
4814 Werror(
"Size of second input ideal must be equal to %d!",
4815 (
int)
pow((
double)tdg+1,(
double)n));
4822 WerrorS(
"Ground field not implemented!");
4827 number *pevpoint= (number *)
omAlloc( n *
sizeof( number ) );
4828 for (
i= 0;
i < n;
i++ )
4837 WerrorS(
"Elements of first input ideal must not be equal to -1, 0, 1!");
4846 WerrorS(
"Elements of first input ideal must be numbers!");
4849 pevpoint[
i]=
nCopy( tmp );
4853 number *wresults= (number *)
omAlloc(
m *
sizeof( number ) );
4854 for (
i= 0;
i <
m;
i++ )
4863 WerrorS(
"Elements of second input ideal must be numbers!");
4871 number *ncpoly= vm.interpolateDense( wresults );
4873 poly rpoly= vm.numvec2poly( ncpoly );
4878 res->data= (
void*)rpoly;
◆ paPrint()
◆ rCompose()
Definition at line 2757 of file ipshell.cc.
2786 int ch = (int)(
long)L->
m[0].
Data();
2796 Warn(
"%d is invalid characteristic of ground field. %d is used.", ch,
l);
2799 #ifndef TEST_ZN_AS_ZP
2803 mpz_init_set_ui(modBase,(
long) ch);
2810 R->cf->has_simple_Inverse=1;
2831 int ch = (int)(
long)LL->
m[0].
Data();
2832 while ((ch!=
fftable[is_gf_char]) && (
fftable[is_gf_char])) is_gf_char++;
2833 if (
fftable[is_gf_char]==0) is_gf_char=-1;
2854 WerrorS(
"could not create the specified coefficient field");
2858 if( extRing->qideal !=
NULL )
2862 extParam.
r = extRing;
2869 extParam.
r = extRing;
2879 WerrorS(
"coefficient field must be described by `int` or `list`");
2885 WerrorS(
"could not create coefficient field described by the input!");
2897 #ifdef HAVE_SHIFTBBA
2900 R->isLPring=isLetterplace;
2905 if (bitmask!=0x7fff)
R->bitmask=bitmask*2;
2912 ideal q=(ideal)L->
m[3].
Data();
2918 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2925 int par_perm_size=0;
2945 par_perm_size=
rPar(orig_ring);
2955 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2959 perm=(
int *)
omAlloc0((orig_ring->N+1)*
sizeof(int));
2960 if (par_perm_size!=0)
2961 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
2965 maFindPerm(orig_ring->names,orig_ring->N,orig_ring->parameter,orig_ring->P,
2974 else if (par_perm_size!=0)
2982 par_perm,par_perm_size);
3000 WerrorS(
"q-ideal must be given as `ideal`");
◆ rDecompose()
Definition at line 2055 of file ipshell.cc.
2065 || (r->qideal !=
NULL)
2072 WerrorS(
"ring with polynomial data must be the base ring or compatible");
2097 else if ( r->cf->extRing!=
NULL )
2107 Lc->m[0].data=(
void*)(
long)r->cf->m_nfCharQ;
2114 Lc->m[1].data=(
void*)Lv;
2125 Loo->
m[1].
data=(
void *)iv;
2128 Lo->
m[0].
data=(
void*)Loo;
2131 Lc->m[2].data=(
void*)Lo;
2142 L->
m[0].
data=(
void *)(
long)r->cf->ch;
2149 for(
i=0;
i<r->N;
i++)
2155 L->
m[1].
data=(
void *)LL;
2176 assume( r->block0[
i] == r->block1[
i] );
2177 const int s = r->block0[
i];
2183 else if (r->block1[
i]-r->block0[
i] >=0 )
2185 int bl=
j=r->block1[
i]-r->block0[
i];
2193 j+=r->wvhdl[
i][bl+1];
2196 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2198 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
2200 else switch (r->order[
i])
2207 for(;
j>=0;
j--) (*iv)[
j]=1;
2217 LLL->
m[1].
data=(
void *)iv;
2218 LL->
m[
i].
data=(
void *)LLL;
2221 L->
m[2].
data=(
void *)LL;
2225 if (r->qideal==
NULL)
2230 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDecompose_CF()
Definition at line 1853 of file ipshell.cc.
1861 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1874 else if ( C->extRing!=
NULL )
1884 Lc->m[0].data=(
void*)(
long)C->m_nfCharQ;
1891 Lc->m[1].data=(
void*)Lv;
1902 Loo->
m[1].
data=(
void *)iv;
1905 Lo->
m[0].
data=(
void*)Loo;
1908 Lc->m[2].data=(
void*)Lo;
1914 res->data=(
void*)
Lc;
1919 res->data=(
void *)(
long)C->ch;
◆ rDecompose_list_cf()
Definition at line 1924 of file ipshell.cc.
1940 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1958 L->
m[0].
data=(
char*)r->cf; r->cf->ref++;
1964 for(
i=0;
i<r->N;
i++)
1970 L->
m[1].
data=(
void *)LL;
1990 assume( r->block0[
i] == r->block1[
i] );
1991 const int s = r->block0[
i];
1997 else if (r->block1[
i]-r->block0[
i] >=0 )
1999 int bl=
j=r->block1[
i]-r->block0[
i];
2007 j+=r->wvhdl[
i][bl+1];
2010 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2012 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
2014 else switch (r->order[
i])
2021 for(;
j>=0;
j--) (*iv)[
j]=1;
2031 LLL->
m[1].
data=(
void *)iv;
2032 LL->m[
i].data=(
void *)LLL;
2035 L->
m[2].
data=(
void *)LL;
2039 if (r->qideal==
NULL)
2044 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDefault()
Definition at line 1552 of file ipshell.cc.
1569 #ifndef TEST_ZN_AS_ZP
1573 mpz_init_set_ui(modBase, (
long)32003);
1580 r->cf->has_simple_Inverse=1;
1593 r->block0 = (
int *)
omAlloc0(3 *
sizeof(
int *));
1594 r->block1 = (
int *)
omAlloc0(3 *
sizeof(
int *));
◆ rFindHdl()
◆ rInit()
Definition at line 5578 of file ipshell.cc.
5610 WerrorS(
"parameter expected");
5617 for(
int i=pars-1;
i>=0;
i--)
5629 int ch = (int)(
long)pn->
Data();
5640 if ((ch<2)||(ch!=ch2))
5642 Warn(
"%d is invalid as characteristic of the ground field. 32003 is used.", ch);
5645 #ifndef TEST_ZN_AS_ZP
5649 mpz_init_set_ui(modBase, (
long)ch);
5656 cf->has_simple_Inverse=1;
5669 if ((ch!=0) && (ch!=
IsPrime(ch)) && (pars == 1))
5681 if ((ch!=0) && (ch!=
IsPrime(ch)))
5683 WerrorS(
"too many parameters");
5691 WerrorS(
"parameter expected");
5697 extParam.
r =
rDefault( ch, pars, names);
5698 for(
int i=pars-1;
i>=0;
i--)
5711 && ((strcmp(pn->
name,
"real")==0) || (strcmp(pn->
name,
"complex")==0)))
5714 BOOLEAN complex_flag=(strcmp(pn->
name,
"complex")==0);
5717 float_len=(int)(
long)pnn->
Data();
5718 float_len2=float_len;
5722 float_len2=(int)(
long)pnn->
Data();
5757 else if ((pn->
name !=
NULL) && (strcmp(pn->
name,
"integer") == 0))
5761 unsigned int modExponent = 1;
5762 mpz_init_set_si(modBase, 0);
5769 mpz_set_ui(modBase, (
long) pnn->
Data());
5773 modExponent = (long) pnn->
Data();
5778 mpz_mul_ui(modBase, modBase, (
int)(
long) pnn->
Data());
5791 if ((mpz_cmp_ui(modBase, 1) == 0) && (
mpz_sgn1(modBase) < 0))
5793 WerrorS(
"Wrong ground ring specification (module is 1)");
5796 if (modExponent < 1)
5798 WerrorS(
"Wrong ground ring specification (exponent smaller than 1");
5803 if (modExponent > 1 &&
cf ==
NULL)
5805 if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
5816 WerrorS(
"modulus must not be 0 or parameter not allowed");
5822 info.exp= modExponent;
5831 WerrorS(
"modulus must not be 0 or parameter not allowed");
5837 info.exp= modExponent;
5848 extParam.
r = (ring)pn->
Data();
5860 WerrorS(
"Wrong or unknown ground field specification");
5866 Print(
"pn[%p]: type: %d [%s]: %p, name: %s", (
void*)
p,
p->Typ(),
Tok2Cmdname(
p->Typ()),
p->Data(), (
p->name ==
NULL?
"NULL" :
p->name) );
5888 WerrorS(
"Invalid ground field specification");
5912 WerrorS(
"name of ring variable expected");
◆ rKill() [1/2]
◆ rKill() [2/2]
Definition at line 6123 of file ipshell.cc.
6126 if ((r->ref<=0)&&(r->order!=
NULL))
6136 if (
j==0)
WarnS(
"killing the basering for level 0");
6141 while (r->idroot!=
NULL)
6144 killhdl2(r->idroot,&(r->idroot),r);
◆ rSetHdl()
Definition at line 5085 of file ipshell.cc.
5093 if (rg==
NULL)
return;
5118 Warn(
"deleting denom_list for ring change to %s",
IDID(
h));
5132 if ((rg!=
NULL) && (rg->idroot==
NULL))
◆ rSimpleFindHdl()
◆ scIndIndset()
Definition at line 1024 of file ipshell.cc.
1091 res->m[
i].data = (
void *)save->set;
1103 res->m[
i].data = (
void *)save->set;
◆ semicProc()
Definition at line 4524 of file ipshell.cc.
4528 memset(&tmp,0,
sizeof(tmp));
◆ semicProc3()
Definition at line 4484 of file ipshell.cc.
4488 BOOLEAN qh=(((int)(
long)
w->Data())==1);
4499 WerrorS(
"first argument is not a spectrum" );
4504 WerrorS(
"second argument is not a spectrum" );
◆ setOption()
Definition at line 581 of file misc_ip.cc.
607 if(strcmp(n,
"get")==0)
616 if(strcmp(n,
"set")==0)
636 if(strcmp(n,
"none")==0)
654 WarnS(
"cannot set option");
665 else if ((strncmp(n,
"no",2)==0)
673 WarnS(
"cannot clear option");
692 else if ((strncmp(n,
"no",2)==0)
707 Werror(
"unknown option `%s`",n);
◆ showOption()
◆ singular_example()
void singular_example |
( |
char * |
str | ) |
|
Definition at line 444 of file misc_ip.cc.
450 while (*ss!=
'\0') ss++;
460 if((lib!=
NULL)&&(*lib!=
'\0'))
462 Print(
"// proc %s from lib %s\n",
s,lib);
483 sprintf(sing_file,
"%s/%s.sing", res_m,
s);
497 got = fread(
s,
sizeof(
char),
length,
fd);
501 Werror(
"Error while reading file %s", sing_file);
506 strcat(
s,
"\n;return();\n\n");
515 Werror(
"no example for %s", str);
◆ singular_system()
◆ spaddProc()
Definition at line 4401 of file ipshell.cc.
4415 WerrorS(
"first argument is not a spectrum:" );
4420 WerrorS(
"second argument is not a spectrum:" );
◆ spectrumfProc()
Definition at line 4157 of file ipshell.cc.
4173 WerrorS(
"only works for local orderings" );
4178 WerrorS(
"does not work in quotient rings" );
◆ spectrumProc()
Definition at line 4106 of file ipshell.cc.
4119 WerrorS(
"only works for local orderings" );
4127 WerrorS(
"does not work in quotient rings" );
◆ spmulProc()
Definition at line 4443 of file ipshell.cc.
4453 int k = (int)(
long)second->Data( );
4457 WerrorS(
"first argument is not a spectrum" );
4462 WerrorS(
"second argument should be positive" );
◆ syBetti1()
Definition at line 3145 of file ipshell.cc.
3149 memset(&tmp,0,
sizeof(tmp));
◆ syBetti2()
Definition at line 3122 of file ipshell.cc.
3127 BOOLEAN minim=(int)(
long)
w->Data();
3129 int add_row_shift=0;
3135 add_row_shift = ww->
min_in();
3136 (*weights) -= add_row_shift;
◆ syConvList()
◆ syConvRes()
◆ syForceMin()
◆ test_cmd()
◆ Tok2Cmdname()
const char* Tok2Cmdname |
( |
int |
i | ) |
|
Definition at line 140 of file gentable.cc.
146 if (tok==
COMMAND)
return "command";
147 if (tok==
ANY_TYPE)
return "any_type";
148 if (tok==
NONE)
return "nothing";
155 if (tok==
IDHDL)
return "identifier";
159 while (
cmds[
i].tokval!=0)
161 if ((
cmds[
i].tokval == tok)&&(
cmds[
i].alias==0))
168 while (
cmds[
i].tokval!=0)
170 if (
cmds[
i].tokval == tok)
178 sprintf(
s,
"(%d)",tok);
◆ type_cmd()
◆ versionString()
Definition at line 784 of file misc_ip.cc.
787 StringAppend(
"Singular for %s version %s (%d, %d bit) %s #%s",
791 VERSION_DATE, GIT_VERSION);
793 singular_date, GIT_VERSION);
797 #if defined(mpir_version)
798 StringAppend(
"MPIR(%s)~GMP(%s),", mpir_version, gmp_version);
799 #elif defined(gmp_version)
817 #if defined(HAVE_DYN_RL)
831 #if defined(HAVE_READLINE) && !defined(FEREAD)
849 #ifdef HAVE_DYNAMIC_LOADING
881 #ifdef __OPTIMIZE_SIZE__
887 #ifdef HAVE_GENERIC_ADD
892 #ifdef HAVE_GENERIC_MULT
914 #define SI_SHOW_BUILTIN_MODULE(name) StringAppend(" %s", #name);
918 #undef SI_SHOW_BUILTIN_MODULE
921 "CC = %s,FLAGS : %s,\n"
922 "CXX = %s,FLAGS : %s,\n"
923 "DEFS : %s,CPPFLAGS : %s,\n"
924 "LDFLAGS : %s,LIBS : %s "
926 "(ver: " __VERSION__
")"
928 "\n",AC_CONFIGURE_ARGS, CC,CFLAGS
" " PTHREAD_CFLAGS,
929 CXX,CXXFLAGS
" " PTHREAD_CFLAGS, DEFS,CPPFLAGS, LDFLAGS,
930 LIBS
" " PTHREAD_LIBS);
◆ currid
◆ dArith1
◆ dArith2
◆ dArith3
◆ dArithM
◆ iiCurrArgs
◆ iiCurrProc
◆ iiLocalRing
◆ iiOp
◆ iiRETURNEXPR
◆ iiRETURNEXPR_len
◆ lastreserved
◆ myynest
◆ printlevel
◆ si_echo
◆ yyInRingConstruction
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
static int si_min(const int a, const int b)
char * fe_fgets_dummy(const char *, char *, int)
static void rDecomposeC(leftv h, const ring R)
void rComposeRing(lists L, ring R)
short float_len2
additional char-flags, rInit
#define omCheckAddrSize(addr, size)
void hIndMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
only used if HAVE_RINGS is defined
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
const BOOLEAN p_procs_dynamic
static BOOLEAN rField_is_Zn(const ring r)
static BOOLEAN jiAssign_1(leftv l, leftv r, BOOLEAN toplevel)
static char * iiGetLibName(const procinfov pi)
find the library of an proc
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
void countedref_shared_load()
static BOOLEAN rField_is_long_R(const ring r)
BOOLEAN jjBETTI2_ID(leftv res, leftv u, leftv v)
void iiCheckPack(package &p)
ideal twostd(ideal I)
Compute two-sided GB:
#define pIsConstant(p)
like above, except that Comp must be 0
EXTERN_VAR size_t gmp_output_digits
ideal TranMImprovwalk(ideal G, intvec *curr_weight, intvec *target_tmp, int nP)
STATIC_VAR int WerrorS_dummy_cnt
struct for passing initialization parameters to naInitChar
void StringAppendS(const char *st)
void syMinimizeResolvente(resolvente res, int length, int first)
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
ideal Mwalk(ideal Go, intvec *orig_M, intvec *target_M, ring baseRing, int reduction, int printout)
BOOLEAN spectrumfProc(leftv result, leftv first)
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
virtual IStateType initState() const
static void iiCallLibProcBegin()
static BOOLEAN jiA_INTVEC_L(leftv l, leftv r)
#define idDelete(H)
delete an ideal
void scComputeHC(ideal S, ideal Q, int ak, poly &hEdge, ring tailRing)
BOOLEAN iiEStart(char *example, procinfo *pi)
BOOLEAN iiApplyLIST(leftv res, leftv a, int op, leftv proc)
SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT0) }
lists gmsNF(ideal p, ideal g, matrix B, int D, int K)
#define MATELEM(mat, i, j)
1-based access to matrix
VAR libstackv library_stack
const char * lastreserved
void rChangeCurrRing(ring r)
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
#define SHORT_REAL_LENGTH
Creation data needed for finite fields.
complex floating point (GMP) numbers
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv sl)
BOOLEAN syBetti2(leftv res, leftv u, leftv w)
#define pGetExp(p, i)
Exponent.
matrix evRowElim(matrix M, int i, int j, int k)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
void hRadical(scfmon rad, int *Nrad, int Nvar)
intvec * MwalkNextWeight(intvec *curr_weight, intvec *target_weight, ideal G)
virtual number getSubDet()
BOOLEAN jjBETTI2(leftv res, leftv u, leftv v)
intvec * MPertVectorslp(ideal G, intvec *ivtarget, int pdeg)
bool solver(const int polishmode=PM_NONE)
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
int M3ivSame(intvec *temp, intvec *u, intvec *v)
feOptIndex feGetOptIndex(const char *name)
only used if HAVE_RINGS is defined
rootContainer ** interpolateDenseSP(BOOLEAN matchUp=false, const number subDetVal=NULL)
static BOOLEAN iiExprArith3TabIntern(leftv res, int op, leftv a, leftv b, leftv c, const struct sValCmd3 *dA3, int at, int bt, int ct, const struct sConvertTypes *dConvertTypes)
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
ideal loNewtonPolytope(const ideal id)
int yylplex(const char *libname, const char *libfile, lib_style_types *lib_style, idhdl pl, BOOLEAN autoexport=FALSE, lp_modes=LOAD_LIB)
#define BREAK_LINE_LENGTH
intvec * id_QHomWeight(ideal id, const ring r)
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
static BOOLEAN rComposeVar(const lists L, ring R)
vandermonde system solver for interpolating polynomials from their values
static BOOLEAN length(leftv result, leftv arg)
idhdl rDefault(const char *s)
#define MAKE_DISTRIBUTION
idhdl get(const char *s, int lev)
ideal Mpwalk(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight, int nP, int reduction, int printout)
const struct soptionStruct optionStruct[]
BOOLEAN iiAllStart(procinfov pi, char *p, feBufferTypes t, int l)
static BOOLEAN jjA_L_STRING(leftv l, leftv r)
static BOOLEAN jjA_L_INTVEC(leftv l, leftv r, intvec *iv)
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
BOOLEAN spmulProc(leftv result, leftv first, leftv second)
static void list1(const char *s, idhdl h, BOOLEAN c, BOOLEAN fullname)
const char * feSetOptValue(feOptIndex opt, char *optarg)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
static resolvente iiCopyRes(resolvente r, int l)
void feStringAppendBrowsers(int warn)
semicState list_is_spectrum(lists l)
BOOLEAN semicProc3(leftv res, leftv u, leftv v, leftv w)
only used if HAVE_RINGS is defined
void hDimSolve(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
static BOOLEAN rField_is_Zp_a(const ring r)
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
char *(* fe_fgets_stdin)(const char *pr, char *s, int size)
EXTERN_VAR int yylp_errno
int pcvBasis(lists b, int i, poly m, int d, int n)
void printBlackboxTypes()
list all defined type (for debugging)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
poly kNFBound(ideal F, ideal Q, poly p, int bound, int syzComp, int lazyReduce)
const struct soptionStruct verboseStruct[]
Class used for (list of) interpreter objects.
BOOLEAN rSleftvOrdering2Ordering(sleftv *ord, ring R)
static BOOLEAN jiA_VECTOR_L(leftv l, leftv r)
mprState mprIdealCheck(const ideal theIdeal, const char *name, uResultant::resMatType mtype, BOOLEAN rmatrix=false)
matrix evSwap(matrix M, int i, int j)
const unsigned short fftable[]
poly pOppose(ring Rop_src, poly p, const ring Rop_dst)
opposes a vector p from Rop to currRing (dst!)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
SModulFunc_t iiGetBuiltinModInit(const char *libname)
const char * iiTwoOps(int t)
static long pTotaldegree(poly p)
spectrum spectrumFromList(lists l)
void feStringAppendResources(int warn)
real floating point (GMP) numbers
void factoryseed(int s)
random seed initializer
static void iiCleanProcs(idhdl &root)
STATIC_VAR SArithBase sArithBase
Base entry for arithmetic.
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
void HilbertSeries_OrbitData(ideal S, int lV, bool IG_CASE, bool mgrad, bool odp, int trunDegHs)
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
poly singclap_resultant(poly f, poly g, poly x, const ring r)
EXTERN_VAR BOOLEAN expected_parms
char * fe_fgets(const char *pr, char *s, int size)
static BOOLEAN rComposeOrder(const lists L, const BOOLEAN check_comp, ring R)
idhdl packFindHdl(package r)
int ssiReservePort(int clients)
VAR void(* WerrorS_callback)(const char *s)
EXTERN_VAR omBin sleftv_bin
static BOOLEAN check_valid(const int p, const int op)
ideal MAltwalk2(ideal Go, intvec *curr_weight, intvec *target_weight)
static short rVar(const ring r)
#define rVar(r) (r->N)
#define TEST_OPT_INTSTRATEGY
intvec * ivCopy(const intvec *o)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
struct for passing initialization parameters to naInitChar
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
void countedref_reference_load()
Initialize blackbox types 'reference' and 'shared', or both.
VAR denominator_list DENOMINATOR_LIST
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static BOOLEAN idIsZeroDim(ideal i)
static BOOLEAN rField_is_Q_a(const ring r)
ideal Mprwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int op_deg, int tp_deg, int nP, int reduction, int printout)
static BOOLEAN jiAssign_list(leftv l, leftv r)
BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char *newlib, idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror)
int status int void * buf
void setGMPFloatDigits(size_t digits, size_t rest)
Set size of mantissa digits - the number of output digits (basis 10) the size of mantissa consists of...
VAR omBin sip_command_bin
void killlocals_rec(idhdl *root, int v, ring r)
void PrintS(const char *s)
lists pcvPMulL(poly p, lists l1)
bool luSolveViaLDUDecomp(const matrix pMat, const matrix lMat, const matrix dMat, const matrix uMat, const poly l, const poly u, const poly lTimesU, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LDU-decomposit...
#define omFreeSize(addr, size)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
intvec * Mivperttarget(ideal G, int ndeg)
void killhdl2(idhdl h, idhdl *ih, ring r)
#define SI_SHOW_BUILTIN_MODULE(name)
void lduDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &dMat, matrix &uMat, poly &l, poly &u, poly &lTimesU)
LU-decomposition of a given (m x n)-matrix with performing only those divisions that yield zero remai...
BOOLEAN iiGetLibStatus(const char *lib)
void rComposeC(lists L, ring R)
static BOOLEAN iiAssign_sys(leftv l, leftv r)
int MivSame(intvec *u, intvec *v)
BOOLEAN iiApplyIDEAL(leftv, leftv, int, leftv)
const struct sConvertTypes dConvertTypes[]
gmp_complex * getRoot(const int i)
void * malloc(size_t size)
ideal maMapIdeal(const ideal map_id, const ring preimage_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for ideals/module/matrix map_id: the ideal to map map_r: the base ring for map_id imag...
#define nPrint(a)
only for debug, over any initalized currRing
const struct sValCmd3 dArith3[]
ideal Mfwalk(ideal G, intvec *ivstart, intvec *ivtarget, int reduction, int printout)
#define TRACE_SHOW_LINENO
char * iiGetLibProcBuffer(procinfo *pi, int part)
static BOOLEAN rField_is_Ring(const ring r)
char * iiConvName(const char *libname)
BOOLEAN slWrite(si_link l, leftv v)
BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
ideal RightColonOperation(ideal S, poly w, int lV)
poly pcvCV2P(poly cv, int d0, int d1)
BOOLEAN lRingDependend(lists L)
BOOLEAN semicProc(leftv res, leftv u, leftv v)
ideal sm_Flatten(ideal a, const ring R)
void hKill(monf xmem, int Nvar)
intvec * MivMatrixOrderdp(int nV)
void atSet(idhdl root, char *name, void *data, int typ)
matrix singclap_irrCharSeries(ideal I, const ring r)
int(* SModulFunc_t)(SModulFunctions *)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
only used if HAVE_RINGS is defined
BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
load lib/module given in v
void list_cmd(int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname)
unsigned nLastIdentifier
valid indentifieres are slot 1..nLastIdentifier
static void rRenameVars(ring R)
BOOLEAN spaddProc(leftv result, leftv first, leftv second)
static BOOLEAN jiA_STRING_L(leftv l, leftv r)
static int rPar(const ring r)
(r->cf->P)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
void hDelete(scfmon ev, int ev_length)
void killhdl(idhdl h, package proot)
void ipMoveId(idhdl tomove)
resMatrixBase * accessResMat()
short float_len
additional char-flags, rInit
intvec * syBettiOfComputation(syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
static BOOLEAN rField_is_R(const ring r)
static int ipSwapId(idhdl tomove, idhdl &root1, idhdl &root2)
intvec * MivMatrixOrder(intvec *iv)
THREAD_VAR double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
static void WerrorS_dummy(const char *)
lib_types type_of_LIB(const char *newlib, char *libnamebuf)
static int rBlocks(ring r)
int iiTestConvert(int inputType, int outputType)
ring rCompose(const lists L, const BOOLEAN check_comp, const long bitmask, const int isLetterplace)
void CleanUp(ring r=currRing)
idhdl rSimpleFindHdl(ring r, idhdl root, idhdl n)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
int idGetNumberOfChoise(int t, int d, int begin, int end, int *choise)
void hIndAllMult(scmon pure, int Npure, scfmon rad, int Nrad, varset var, int Nvar)
char * omFindExec(const char *name, char *exec)
intvec * MivWeightOrderdp(intvec *ivstart)
matrix mpNew(int r, int c)
create a r x c zero-matrix
void fillContainer(number *_coeffs, number *_ievpoint, const int _var, const int _tdg, const rootType _rt, const int _anz)
char * complexToStr(gmp_complex &c, const unsigned int oprec, const coeffs src)
ideal MwalkInitialForm(ideal G, intvec *ivw)
libstackv pop(const char *p)
used for all transcendental extensions, i.e., the top-most extension in an extension tower is transce...
const char * Tok2Cmdname(int tok)
BOOLEAN iiDefaultParameter(leftv p)
intvec * MPertVectors(ideal G, intvec *ivtarget, int pdeg)
VAR BOOLEAN iiDebugMarker
Linear Programming / Linear Optimization using Simplex - Algorithm.
int exprlist_length(leftv v)
static BOOLEAN iiInternalExport(leftv v, int toLev)
single prescision (6,6) real numbers
static FORCE_INLINE const char ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Base class for solving 0-dim poly systems using u-resultant.
INST_VAR sleftv iiRETURNEXPR
void hPure(scfmon stc, int a, int *Nstc, varset var, int Nvar, scmon pure, int *Npure)
cmdnames * sCmds
array of existing commands
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights)
void rDelete(ring r)
unconditionally deletes fields in r
char * fe_fgets_stdin_drl(const char *pr, char *s, int size)
uResultant::resMatType determineMType(int imtype)
ideal MAltwalk1(ideal Go, int op_deg, int tp_deg, intvec *curr_weight, intvec *target_weight)
const char * yylp_errlist[]
intvec * MivMatrixOrderlp(int nV)
static void iiCallLibProcEnd(idhdl save_ringhdl, ring save_ring)
static void iiReportTypes(int nr, int t, const short *T)
idhdl rFindHdl(ring r, idhdl n)
VAR proclevel * procstack
#define IMATELEM(M, I, J)
static void iiShowLevRings()
static char * feResource(feResourceConfig config, int warn)
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
scfmon hInit(ideal S, ideal Q, int *Nexist, ring tailRing)
int IsCmd(const char *n, int &tok)
static BOOLEAN rField_is_numeric(const ring r)
BOOLEAN newstruct_set_proc(const char *bbname, const char *func, int args, procinfov pr)
static BOOLEAN rField_is_GF(const ring r)
bool complexNearZero(gmp_complex *c, int digits)
BOOLEAN nc_CallPlural(matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type,...
intvec * MkInterRedNextWeight(intvec *iva, intvec *ivb, ideal G)
void rDecomposeCF(leftv h, const ring r, const ring R)
int pcvDim(int d0, int d1)
void StringSetS(const char *st)
static void iiRunInit(package p)
BOOLEAN spectrumProc(leftv result, leftv first)
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
static BOOLEAN jjA_L_BIGINTMAT(leftv l, leftv r, bigintmat *bim)
void list_error(semicState state)
int mult_spectrum(spectrum &)
BOOLEAN ringIsLocal(const ring r)
poly pcvP2CV(poly p, int d0, int d1)
void spectrumPrintError(spectrumState state)
EXTERN_VAR int yylplineno
BOOLEAN iiApplyINTVEC(leftv res, leftv a, int op, leftv proc)
void hSupp(scfmon stc, int Nstc, varset var, int *Nvar)
Induced (Schreyer) ordering.
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
void Werror(const char *fmt,...)
ideal idXXX(ideal h1, int k)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
ideal idInit(int idsize, int rank)
initialise an ideal / module
char * fe_fgets_stdin_emu(const char *pr, char *s, int size)
const char * rSimpleOrdStr(int ord)
char name(const Variable &v)
Rational pow(const Rational &a, int e)
void WerrorS(const char *s)
static BOOLEAN rField_has_simple_inverse(const ring r)
matrix singntl_LLL(matrix m, const ring s)
virtual ideal getMatrix()
VAR char my_yylinebuf[80]
intvec * MPertNextWeight(intvec *iva, ideal G, int deg)
static BOOLEAN rSleftvList2StringArray(leftv sl, char **p)
int simpleipc_cmd(char *cmd, int id, int v)
#define BIMATELEM(M, I, J)
lists pcvLAddL(lists l1, lists l2)
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
lists evEigenvals(matrix M)
static void jjINT_S_TO_ID(int n, int *e, leftv res)
ideal Mrwalk(ideal Go, intvec *orig_M, intvec *target_M, int weight_rad, int pert_deg, int reduction, int printout)
static void killlocals0(int v, idhdl *localhdl, const ring r)
static BOOLEAN iiExprArith2TabIntern(leftv res, leftv a, int op, leftv b, BOOLEAN proccall, const struct sValCmd2 *dA2, int at, int bt, const struct sConvertTypes *dConvertTypes)
const char feNotImplemented[]
EXTERN_VAR struct fe_option feOptSpec[]
matrix evHessenberg(matrix M)
ring rAssure_HasComp(const ring r)
BOOLEAN pa(leftv res, leftv args)
lists listOfRoots(rootArranger *self, const unsigned int oprec)
BOOLEAN iiPStart(idhdl pn, leftv v)
static BOOLEAN jiA_MATRIX_L(leftv l, leftv r)
const Variable & v
< [in] a sqrfree bivariate poly
#define omCheckAddr(addr)
INLINE_THIS void Init(int l=0)
static BOOLEAN jjWRONG(leftv, leftv)
BOOLEAN mapFromMatrix(matrix m)
static long p_Totaldegree(poly p, const ring r)
unsigned nCmdUsed
number of commands used
static BOOLEAN jjA_L_LIST(leftv l, leftv r)
const char * par_name
parameter name
BOOLEAN iiApplyBIGINTMAT(leftv, leftv, int, leftv)
BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
intvec * MivWeightOrderlp(intvec *ivstart)
int mult_spectrumh(spectrum &)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
idhdl ggetid(const char *n)
const CanonicalForm int s
const struct soptionStruct optionStruct[]
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 (...
intvec * Mfpertvector(ideal G, intvec *ivtarget)
int status int void size_t count
const char * Tok2Cmdname(int tok)
static BOOLEAN jiAssign_rec(leftv l, leftv r)
static void * feOptValue(feOptIndex opt)
#define pCopy(p)
return a copy of the poly
spectrumState spectrumCompute(poly h, lists *L, int fast)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
void rDecomposeRing_41(leftv h, const coeffs C)
ideal Mfrwalk(ideal G, intvec *ivstart, intvec *ivtarget, int weight_rad, int reduction, int printout)
complex root finder for univariate polynomials based on laguers algorithm
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
lists getList(spectrum &spec)
#define TEST_RINGDEP_OPTS
static const char ** rParameter(const ring r)
(r->cf->parameter)
static void iiCheckNest()
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static BOOLEAN rField_is_long_C(const ring r)
BOOLEAN iiLibCmd(char *newlib, BOOLEAN autoexport, BOOLEAN tellerror, BOOLEAN force)
unsigned char * proc[NUM_PROC]
#define omFreeBin(addr, bin)
static BOOLEAN rField_is_Zp(const ring r)
INST_VAR sleftv sLastPrinted
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
STATIC_VAR BOOLEAN iiNoKeepRing
VAR char libnamebuf[1024]
#define pGetVariables(p, e)
void hLexR(scfmon rad, int Nrad, varset var, int Nvar)
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
const ExtensionInfo & info
< [in] sqrfree poly
matrix mapToMatrix(matrix m)
static void rDecomposeC_41(leftv h, const coeffs C)
void newstructShow(newstruct_desc d)
ideal singclap_absFactorize(poly f, ideal &mipos, intvec **exps, int &numFactors, const ring r)
void syKillComputation(syStrategy syzstr, ring r=currRing)
void syKillEmptyEntres(resolvente res, int length)
BOOLEAN killlocals_list(int v, lists L)
void nKillChar(coeffs r)
undo all initialisations
rootContainer ** specializeInU(BOOLEAN matchUp=false, const number subDetVal=NULL)
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
gmp_complex numbers based on
void rDecomposeRing(leftv h, const ring R)
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
char * singclap_neworder(ideal I, const ring r)
ideal sm_UnFlatten(ideal a, int col, const ring R)
static BOOLEAN rField_is_Q(const ring r)
ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing)
static int rInternalChar(const ring r)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
#define omReallocSize(addr, o_size, size)
void nlGMP(number &i, mpz_t n, const coeffs r)
void Clean(ring r=currRing)
const struct soptionStruct verboseStruct[]
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)