 |
My Project
UNKNOWN_GIT_VERSION
|
#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 | 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 78 of file gentable.cc.
Data Fields |
short |
arg |
|
short |
cmd |
|
int |
p |
|
proc1 |
p |
|
short |
res |
|
short |
valid_for |
|
◆ sValCmd2
Definition at line 69 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 86 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 96 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.
1013 if (
IsCmd(procname,dummy))
1015 Werror(
">>%s< is a reserved name",procname);
1027 Warn(
"extend `%s`",procname);
1045 pi->is_static = pstatic;
1046 pi->data.o.function = func;
1050 if(
pi->data.o.function == func)
1062 pi->is_static = pstatic;
1063 pi->data.o.function = func;
1067 Warn(
"internal error: unknown procedure type %d",
pi->language);
1073 WarnS(
"iiAddCproc: failed.");
◆ iiAlias()
Definition at line 765 of file ipid.cc.
783 if ((
h->Typ()!=
p->Typ()) &&(
p->Typ()!=
DEF_CMD))
831 Werror(
"unknown type %d",
p->Typ());
836 int eff_typ=
h->Typ();
◆ iiAllStart()
Definition at line 293 of file iplib.cc.
310 (
pi->libname!=
NULL) && (
pi->libname[0]!=
'\0'))
312 if ((
pi->libname!=
NULL) && (
pi->libname[0]!=
'\0'))
313 Warn(
"option changed in proc %s from %s",
pi->procname,
pi->libname);
315 Warn(
"option changed in proc %s",
pi->procname);
◆ iiApply()
Definition at line 6407 of file ipshell.cc.
6425 WerrorS(
"first argument to `apply` must allow an index");
◆ iiARROW()
Definition at line 6456 of file ipshell.cc.
6458 char *ss=(
char*)
omAlloc(strlen(a)+strlen(
s)+30);
6460 int end_s=strlen(
s);
6461 while ((end_s>0) && ((
s[end_s]<=
' ')||(
s[end_s]==
';'))) end_s--;
6464 sprintf(
name,
"%s->%s",a,
s);
6466 int start_s=end_s-1;
6467 while ((start_s>=0) && (
s[start_s]!=
';')) start_s--;
6470 sprintf(ss,
"parameter def %s;return(%s);\n",a,
s);
6475 sprintf(ss,
"parameter def %s;%s;return(%s);\n",a,
s,
s+start_s+1);
6477 memset(r,0,
sizeof(*r));
6482 ((
procinfo *)r->data)->data.s.body=ss;
◆ iiAssign()
Definition at line 1819 of file ipassign.cc.
1822 int ll=
l->listLength();
1829 Werror(
"`%s` is read-only",
l->Name());
1839 else if (
l->attribute!=
NULL)
1867 if(bb->blackbox_CheckAssign(bb,
l,r))
return TRUE;
1870 if((!
b) && (like_lists==2))
1894 #ifdef BLACKBOX_DEVEL
1895 Print(
"bb-assign: bb=%lx\n",bb);
1897 return (bb==
NULL) || bb->blackbox_Assign(
l,r);
1967 if (rt==
NONE) rt=r->Typ();
1969 else if (ll==(rl=r->listLength()))
1976 if (rt==
NONE) rt=r->Typ();
1985 Werror(
"length of lists in assignment does not match (l:%d,r:%d)",
2020 WerrorS(
"expected ring-name");
2026 WerrorS(
"expected image ideal");
2046 char *pr=((
map)olm)->preimage;
2063 Warn(
"expression list length(%d) does not match matrix size(%d)",el,
num);
2113 for(
k=0;
k<
j;
k++,
i++)
2136 if (module_assign) lm->
rank=rk;
2137 else if (map_assign) ((
map)lm)->preimage=pr;
2155 Werror(
"cannot assign to %s",
l->Fullname());
◆ iiAssignCR()
Definition at line 6490 of file ipshell.cc.
6492 char* ring_name=
omStrDup((
char*)r->Name());
6497 memset(&tmp,0,
sizeof(tmp));
6515 memset(&n,0,
sizeof(n));
◆ iiBranchTo()
Definition at line 1184 of file ipshell.cc.
1189 WerrorS(
"branchTo can only occur in a proc");
1197 if (ll!=(
l-1))
return FALSE;
1200 short *t=(
short*)
omAlloc(
l*
sizeof(
short));
1204 for(
i=1;
i<
l;
i++,
h=
h->next)
1209 Werror(
"arg %d is not a string",
i);
1213 b=
IsCmd((
char *)
h->Data(),tt);
1218 Werror(
"arg %d is not a type name",
i);
1225 Werror(
"last(%d.) arg.(%s) is not a proc(but %s(%d)), nesting=%d",
1237 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.
668 tmp.
rtyp=arg_types[0];
669 while(arg_types[
i]!=0)
673 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 6546 of file ipshell.cc.
6551 if (type_list[0]==0)
return TRUE;
6554 if (
l!=(
int)type_list[0])
6559 for(
int i=1;
i<=
l;
i++,args=args->
next)
6561 short t=type_list[
i];
6565 || (t!=args->Typ()))
◆ iiConvName()
char* iiConvName |
( |
const char * |
libname | ) |
|
Definition at line 1331 of file iplib.cc.
1334 char *
p = strrchr(tmpname,
DIR_SEP);
1336 if(
p==
NULL)
p = tmpname;
else p++;
1339 while(isalnum(*r)||(*r==
'_')) r++;
◆ iiDebug()
Definition at line 989 of file ipshell.cc.
1015 else if(strncmp(
s,
"cont;",5)==0)
1022 strcat(
s,
"\n;~\n");
◆ iiDeclCommand()
Definition at line 1127 of file ipshell.cc.
1130 const char *
id =
name->name;
1132 memset(sy,0,
sizeof(
sleftv));
1135 WerrorS(
"object to declare is not a name");
◆ iiEStart()
Definition at line 699 of file iplib.cc.
710 printf(
"entering example (level %d)\n",
myynest);
722 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 | [out] pre-allocated result |
[in] | a | [in] argument |
[in] | op | [in] operation |
[in] | dA1 | [in] table of possible proc assumes dArith1[0].cmd==op |
[in] | at | [in] a->Typ() |
[in] | dConvertTypes | [in] table of type conversions |
Definition at line 8318 of file iparith.cc.
8328 while (dA1[
i].cmd==op)
8347 if ((call_failed=dA1[
i].
p(
res,a)))
8367 while (dA1[
i].cmd==op)
8391 || (call_failed=dA1[
i].
p(
res,an)));
8432 while (dA1[
i].cmd==op)
8436 Werror(
"expected %s(`%s`)"
◆ iiExprArith2()
◆ iiExprArith2Tab()
apply an operation 'op' to arguments a and a->next return TRUE on failure
- Parameters
-
[out] | res | [out] pre-allocated result |
[in] | a | [in] 2 arguments |
[in] | op | [in] operation |
[in] | dA2 | [in] table of possible proc assumes dA2[0].cmd==op |
[in] | at | [in] a->Typ() |
[in] | dConvertTypes | [in] table of type conversions |
Definition at line 8246 of file iparith.cc.
◆ iiExprArith3()
Definition at line 8661 of file iparith.cc.
8672 memcpy(&d->arg1,a,
sizeof(
sleftv));
8674 memcpy(&d->arg2,
b,
sizeof(
sleftv));
8676 memcpy(&d->arg3,c,
sizeof(
sleftv));
8680 res->data=(
char *)d;
8692 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 | [out] pre-allocated result |
[in] | a | [in] 3 arguments |
[in] | op | [in] operation |
[in] | dA3 | [in] table of possible proc assumes dA3[0].cmd==op |
[in] | at | [in] a->Typ() |
[in] | dConvertTypes | [in] table of type conversions |
Definition at line 8713 of file iparith.cc.
◆ iiExprArithM()
◆ iiGetLibName()
find the library of an proc
Definition at line 66 of file ipshell.h.
66 {
return pi->libname; }
◆ iiGetLibProcBuffer()
char* iiGetLibProcBuffer |
( |
procinfov |
pi, |
|
|
int |
part = 1 |
|
) |
| |
◆ iiHighCorner()
poly iiHighCorner |
( |
ideal |
i, |
|
|
int |
ak |
|
) |
| |
◆ iiInternalExport()
Definition at line 1373 of file ipshell.cc.
1378 Warn(
"'%s': no such identifier\n",
v->
name);
1381 package frompack=v->req_packhdl;
1395 v->req_packhdl=rootpack;
1396 if (
h==frompack->idroot)
1398 frompack->idroot=
h->next;
1402 idhdl hh=frompack->idroot;
1409 Werror(
"`%s` not found",
v->Name());
1413 h->next=rootpack->idroot;
◆ iiLibCmd()
Definition at line 826 of file iplib.cc.
855 WarnS(
"not of type package.");
859 if (!force)
return FALSE;
◆ iiLoadLIB()
Definition at line 915 of file iplib.cc.
944 WerrorS(
"Cannot load library,... aborting.");
954 Warn(
"library %s has old format. This format is still accepted,", newlib);
955 WarnS(
"but for functionality you may wish to change to the new");
956 WarnS(
"format. Please refer to the manual for further information.");
971 ls = ls->
pop(newlib);
975 PrintS(
"--------------------\n");
978 Print(
"%s: LIB-stack:(%d), %s %s\n", newlib, ls->
cnt, ls->
get(),
981 PrintS(
"--------------------\n");
◆ iiLocateLib()
◆ iiMake_proc()
Definition at line 485 of file iplib.cc.
491 Werror(
"'%s::%s()' is a local procedure and cannot be accessed by an user.",
492 pi->libname,
pi->procname);
509 switch (
pi->language)
536 err = (
pi->data.o.function)(
res, sl);
560 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 771 of file ipshell.cc.
781 sprintf(
s,
"%s(%d)",
name,
i+1);
788 h->data.uideal=(ideal)L->
m[
i].
data;
791 Print(
"//defining: %s as %d-th syzygy module\n",
s,
i+1);
796 Warn(
"cannot define %s",
s);
◆ iiMap()
Definition at line 612 of file ipshell.cc.
633 Werror(
"can not map from ground field of %s to current ground field",
637 if (
IDELEMS(theMap)<src_ring->N)
641 (src_ring->N)*
sizeof(poly));
648 WerrorS(
"argument of a map must have a name");
655 memset(&tmpW,0,
sizeof(
sleftv));
660 save_r=
IDMAP(
w)->preimage;
670 ideal
id=(ideal)tmpW.
data;
678 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
680 if (theMap->m[
j]!=
NULL)
687 if ((
p!=
NULL) && (degs[
i]!=0) &&
688 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)degs[
i])/2)))
700 for(
int j=
IDELEMS(theMap)-1;
j>=0 && !overflow;
j--)
702 if (theMap->m[
j]!=
NULL)
705 poly
p=(poly)tmpW.
data;
708 ((
unsigned long)deg_monexp > (
currRing->bitmask / ((
unsigned long)deg)/2)))
717 Warn(
"possible OVERFLOW in map, max exponent is %ld",
currRing->bitmask/2);
733 char *tmp = theMap->preimage;
734 theMap->preimage=(
char*)1L;
737 theMap->preimage=tmp;
752 IDMAP(
w)->preimage=save_r;
760 Werror(
"%s undefined in %s",what,theMap->preimage);
765 Werror(
"cannot find preimage %s",theMap->preimage);
◆ iiOpsTwoChar()
int iiOpsTwoChar |
( |
const char * |
s | ) |
|
Definition at line 119 of file ipshell.cc.
122 if (
s[1]==
'\0')
return s[0];
123 else if (
s[2]!=
'\0')
return 0;
126 case '.':
if (
s[1]==
'.')
return DOTDOT;
132 case '+':
if (
s[1]==
'+')
return PLUSPLUS;
136 case '<':
if (
s[1]==
'=')
return LE;
139 case '>':
if (
s[1]==
'=')
return GE;
141 case '!':
if (
s[1]==
'=')
return NOTEQUAL;
◆ iiParameter()
Definition at line 1285 of file ipshell.cc.
1289 if (strcmp(
p->name,
"#")==0)
1298 if (strcmp(
p->name,
"#")==0)
1300 is_default_list=
TRUE;
1308 if (is_default_list)
◆ iiProcArgs()
char* iiProcArgs |
( |
char * |
e, |
|
|
BOOLEAN |
withParenth |
|
) |
| |
Definition at line 109 of file iplib.cc.
111 while ((*e==
' ') || (*e==
'\t') || (*e==
'(')) e++;
117 return omStrDup(
"parameter list #;");
128 char *argstr=(
char *)
omAlloc(127);
140 if ((*
s==
' ')||(*
s==
'\t'))
142 else if ((*
s==
'\n')&&(*(
s+1)==
' '))
149 &&((par!=0) || (*e!=
')'))
153 else if (*e==
')') par--;
154 args_found=args_found || (*e>
' ');
162 if ((
int)strlen(argstr)+12 +(int)strlen(
s)>= argstrlen)
165 char *a=(
char *)
omAlloc( argstrlen);
171 if(strncmp(
s,
"alias ",6)!=0)
173 strcat(argstr,
"parameter ");
◆ iiProcName()
char* iiProcName |
( |
char * |
buf, |
|
|
char & |
ct, |
|
|
char *& |
e |
|
) |
| |
Definition at line 95 of file iplib.cc.
100 while ((*e>
' ') && (*e!=
'(')) e++;
◆ iiPStart()
Definition at line 353 of file iplib.cc.
367 save_flags=
pi->trace_flag;
368 if(
pi->data.s.body==
NULL )
414 if (oh!=
NULL) o=oh->id;
420 Werror(
"ring change during procedure call %s: %s -> %s (level %d)",
pi->procname,o,n,
myynest);
447 pi->trace_flag=save_flags;
◆ iiRegularity()
int iiRegularity |
( |
lists |
L | ) |
|
Definition at line 961 of file ipshell.cc.
975 add_row_shift = ww->
min_in();
976 (*weights) -= add_row_shift;
981 if (weights!=
NULL)
delete weights;
984 return reg+1+add_row_shift;
◆ iiTestAssume()
Definition at line 6429 of file ipshell.cc.
6435 char assume_yylinebuf[80];
6437 int lev=(long)a->
Data();
6444 if (bo) {
WerrorS(
"syntax error in ASSUME");
return TRUE;}
6446 if (
b->Data()==
NULL) {
Werror(
"ASSUME failed:%s",assume_yylinebuf);
return TRUE;}
◆ iiTokType()
◆ iiTryLoadLib()
Definition at line 764 of file iplib.cc.
768 char *libname = (
char *)
omAlloc(strlen(
id)+5);
769 const char *suffix[] = {
"",
".lib",
".so",
".sl",
NULL };
775 for(
i=0; suffix[
i] !=
NULL;
i++)
777 sprintf(libname,
"%s%s",
id, suffix[
i]);
782 #ifdef HAVE_DYNAMIC_LOADING
788 #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 8860 of file iparith.cc.
8918 Warn(
"outdated identifier `%s` used - please change your code",
◆ jjBETTI()
Definition at line 891 of file ipshell.cc.
894 memset(&tmp,0,
sizeof(tmp));
◆ jjBETTI2()
Definition at line 925 of file ipshell.cc.
939 add_row_shift = ww->
min_in();
940 (*weights) -= add_row_shift;
947 res->data=(
void*)res_im;
950 for(
int i=1;
i<=res_im->
rows();
i++)
952 if (
IMATELEM(*res_im,1,
i)==0) { add_row_shift--; }
957 if (weights!=
NULL)
delete weights;
◆ jjBETTI2_ID()
Definition at line 904 of file ipshell.cc.
908 l->m[0].rtyp=u->
Typ();
909 l->m[0].data=u->
Data();
912 l->m[0].attribute=*a;
919 l->m[0].attribute=
NULL;
◆ jjCHARSERIES()
◆ jjIMPORTFROM()
Definition at line 2214 of file ipassign.cc.
2218 char *vn=(
char *)
v->Name();
2225 WarnS(
"source and destination packages are identical");
2237 memset(&h_expr,0,
sizeof(h_expr));
2241 return iiAssign(&tmp_expr,&h_expr);
2245 Werror(
"`%s` not found in `%s`",
v->Name(), u->
Name());
◆ jjLIST_PL()
Definition at line 7480 of file iparith.cc.
7483 if (
v!=
NULL) sl =
v->listLength();
7487 int add_row_shift = 0;
7489 if (weights!=
NULL) add_row_shift=weights->
min_in();
7516 Werror(
"`%s` is undefined",
h->Fullname());
7522 ((ring)L->
m[
i].
data)->ref++;
7528 res->data=(
char *)L;
◆ jjLOAD()
load lib/module given in v
Definition at line 5218 of file iparith.cc.
5223 #ifdef HAVE_DYNAMIC_LOADING
5230 Werror(
"%s: unknown type",
s);
5248 Werror(
"can not create package `%s`",plib);
5254 package pa=IDPACKAGE(pl);
5255 if ((pa->language==
LANG_C)
5258 Werror(
"can not create package `%s` - binaries exists",plib);
5264 package savepack=currPack;
5280 #ifdef HAVE_DYNAMIC_LOADING
5283 WerrorS(
"Dynamic modules are not supported by this version of Singular");
◆ jjLOAD_TRY()
◆ jjMINRES()
Definition at line 870 of file ipshell.cc.
876 int add_row_shift = 0;
879 if (weights!=
NULL) add_row_shift=weights->
min_in();
◆ jjRESULTANT()
◆ jjSYSTEM()
Definition at line 228 of file extra.cc.
232 const char *sys_cmd=(
char *)(args->Data());
237 if (strcmp(sys_cmd,
"nblocks") == 0)
259 r = (ring)
h->Data();
266 if(strcmp(sys_cmd,
"version")==0)
274 if(strcmp(sys_cmd,
"alarm")==0)
281 struct itimerval t,o;
282 memset(&t,0,
sizeof(t));
283 t.it_value.tv_sec =(unsigned)((
unsigned long)
h->Data());
284 setitimer(ITIMER_VIRTUAL,&t,&o);
292 if(strcmp(sys_cmd,
"cpu")==0)
295 #ifdef _SC_NPROCESSORS_ONLN
296 cpu=sysconf(_SC_NPROCESSORS_ONLN);
297 #elif defined(_SC_NPROCESSORS_CONF)
298 cpu=sysconf(_SC_NPROCESSORS_CONF);
300 res->data=(
void *)cpu;
306 if(strcmp(sys_cmd,
"executable")==0)
321 if(strcmp(sys_cmd,
"flatten")==0)
334 if(strcmp(sys_cmd,
"unflatten")==0)
347 if(strcmp(sys_cmd,
"neworder")==0)
361 if(strcmp(sys_cmd,
"nc_hilb") == 0)
369 i = (ideal)
h->Data();
372 WerrorS(
"nc_Hilb:ideal expected");
377 lV = (int)(
long)
h->Data();
380 WerrorS(
"nc_Hilb:int expected");
386 if((
int)(
long)
h->Data() == 1)
388 else if((
int)(
long)
h->Data() == 2)
393 trunDegHs = (int)(
long)
h->Data();
398 WerrorS(
"nc_Hilb:int 1,2, total degree for the truncation, and a string for printing the details are expected");
407 if(strcmp(sys_cmd,
"rcolon") == 0)
412 ideal
i = (ideal)
h->Data();
414 poly
w=(poly)
h->Data();
416 int lV = (int)(
long)
h->Data();
427 if(strcmp(sys_cmd,
"sh")==0)
431 WerrorS(
"shell execution is disallowed in restricted mode");
437 res->data = (
void*)(
long)
system((
char*)(
h->Data()));
444 if(strcmp(sys_cmd,
"reduce_bound")==0)
454 p = (poly)
h->CopyD();
458 pid = (ideal)
h->CopyD();
463 ideal q = (ideal)
h->next->CopyD();
464 int bound = (int)(
long)
h->next->next->Data();
473 if(strcmp(sys_cmd,
"uname")==0)
481 if(strcmp(sys_cmd,
"with")==0)
491 #define TEST_FOR(A) if(strcmp(s,A)==0) res->data=(void *)1; else
492 char *
s=(
char *)
h->Data();
505 #ifdef TEST_MAC_ORDER
510 #ifdef HAVE_DYNAMIC_LOADING
533 if (strcmp(sys_cmd,
"browsers")==0)
543 if (strcmp(sys_cmd,
"pid")==0)
546 res->data=(
void *)(
long) getpid();
551 if (strcmp(sys_cmd,
"getenv")==0)
556 const char *r=
getenv((
char *)
h->Data());
569 if (strcmp(sys_cmd,
"setenv")==0)
576 setenv((
char *)
h->Data(), (
char *)
h->next->Data(), 1);
586 WerrorS(
"setenv not supported on this platform");
592 if (strcmp(sys_cmd,
"Singular") == 0)
601 if (strcmp(sys_cmd,
"SingularLib") == 0)
611 if (strstr(sys_cmd,
"--") == sys_cmd)
613 if (strcmp(sys_cmd,
"--") == 0)
621 Werror(
"Unknown option %s", sys_cmd);
622 WerrorS(
"Use 'system(\"--\");' for listing of available options");
637 const char *r=(
const char*)
feOptSpec[opt].value;
651 WerrorS(
"Need string or int argument to set option value");
654 const char* errormsg;
659 Werror(
"Need string argument to set value of option %s", sys_cmd);
663 if (errormsg !=
NULL)
664 Werror(
"Option '--%s=%d' %s", sys_cmd, (
int) ((
long)
h->Data()), errormsg);
669 if (errormsg !=
NULL)
670 Werror(
"Option '--%s=%s' %s", sys_cmd, (
char*)
h->Data(), errormsg);
677 if (strcmp(sys_cmd,
"HC")==0)
685 if(strcmp(sys_cmd,
"random")==0)
708 if (strcmp(sys_cmd,
"std_syz") == 0)
714 i1=(ideal)
h->CopyD();
720 i2=(int)((
long)
h->Data());
729 if (strcmp(sys_cmd,
"denom_list")==0)
738 if(strcmp(sys_cmd,
"complexNearZero")==0)
745 WerrorS(
"unsupported ground field!");
752 (int)((
long)(
h->next->Data())));
763 if(strcmp(sys_cmd,
"getPrecDigits")==0)
768 WerrorS(
"unsupported ground field!");
779 if(strcmp(sys_cmd,
"lduDecomp")==0)
786 poly
l; poly u; poly prodLU;
787 lduDecomp(aMat, pMat, lMat, dMat, uMat,
l, u, prodLU);
798 res->data = (
char *)L;
808 if(strcmp(sys_cmd,
"lduSolve")==0)
842 poly
l = (poly)
h->next->next->next->next->Data();
843 poly u = (poly)
h->next->next->next->next->next->Data();
844 poly lTimesU = (poly)
h->next->next->next->next->next->next->Data();
845 matrix bVec = (
matrix)
h->next->next->next->next->next->next->next->Data();
849 Werror(
"first matrix (%d x %d) is not quadratic",
855 Werror(
"second matrix (%d x %d) is not quadratic",
861 Werror(
"third matrix (%d x %d) is not quadratic",
867 Werror(
"third matrix (%d x %d) and fourth matrix (%d x %d) %s",
874 Werror(
"fourth matrix (%d x %d) and vector (%d x 1) do not fit",
879 bVec, xVec, homogSolSpace);
902 if (strcmp(sys_cmd,
"shared") == 0)
904 #ifndef SI_COUNTEDREF_AUTOLOAD
911 else if (strcmp(sys_cmd,
"reference") == 0)
913 #ifndef SI_COUNTEDREF_AUTOLOAD
922 #ifdef HAVE_SIMPLEIPC
923 if (strcmp(sys_cmd,
"semaphore")==0)
929 v=(int)(
long)
h->next->next->Data();
936 WerrorS(
"Usage: system(\"semaphore\",<cmd>,int)");
943 if (strcmp(sys_cmd,
"reserve")==0)
951 res->data=(
void*)(
long)
p;
958 if (strcmp(sys_cmd,
"reservedLink")==0)
967 if (strcmp(sys_cmd,
"install")==0)
973 (
int)(
long)
h->next->next->next->Data(),
980 if (strcmp(sys_cmd,
"newstruct")==0)
986 char *n=(
char*)
h->Data();
993 newstruct_desc desc=(newstruct_desc)bb->data;
997 else Werror(
"'%s' is not a newstruct",n);
999 else Werror(
"'%s' is not a blackbox object",n);
1005 if (strcmp(sys_cmd,
"blackbox")==0)
1013 if (strcmp(sys_cmd,
"absFact") == 0)
1030 l->m[0].data=(
void *)
f;
1032 l->m[1].data=(
void *)
v;
1034 l->m[2].data=(
void*) mipos;
1036 l->m[3].data=(
void*) (
long) n;
1037 res->data=(
void *)
l;
1046 if (strcmp(sys_cmd,
"LLL") == 0)
1069 #if __FLINT_RELEASE >= 20500
1070 if (strcmp(sys_cmd,
"LLL_Flint") == 0)
1091 WerrorS(
"matrix,int or bigint,int expected");
1096 if(((
int)((
long)(
h->next->Data())) != 0) && (
int)((
long)(
h->next->Data()) != 1))
1098 WerrorS(
"int is different from 0, 1");
1102 if((
long)(
h->next->Data()) == 0)
1117 if((
long)(
h->next->Data()) == 1)
1123 for(
int i = 1;
i<=
m->rows();
i++)
1128 m = singflint_LLL(
m,
T);
1141 for(
int i = 1;
i<=
m->rows();
i++)
1143 m = singflint_LLL(
m,
T);
1163 #ifdef HAVE_SHIFTBBA
1164 if (strcmp(sys_cmd,
"stest") == 0)
1169 poly
p=(poly)
h->CopyD();
1171 int sh=(int)((
long)(
h->Data()));
1173 int uptodeg=(int)((
long)(
h->Data()));
1175 int lVblock=(int)((
long)(
h->Data()));
1178 WerrorS(
"negative shift for pLPshift");
1184 WerrorS(
"pLPshift: too big shift requested\n");
1196 #ifdef HAVE_SHIFTBBA
1197 if (strcmp(sys_cmd,
"btest") == 0)
1202 poly
p=(poly)
h->CopyD();
1204 int lV=(int)((
long)(
h->Data()));
1214 #ifdef HAVE_SHIFTBBA
1215 if (strcmp(sys_cmd,
"shrinktest") == 0)
1220 poly
p=(poly)
h->Data();
1222 int lV=(int)((
long)(
h->Data()));
1236 if(strcmp(sys_cmd,
"pcvLAddL")==0)
1241 if(strcmp(sys_cmd,
"pcvPMulL")==0)
1246 if(strcmp(sys_cmd,
"pcvMinDeg")==0)
1251 if(strcmp(sys_cmd,
"pcvP2CV")==0)
1256 if(strcmp(sys_cmd,
"pcvCV2P")==0)
1261 if(strcmp(sys_cmd,
"pcvDim")==0)
1266 if(strcmp(sys_cmd,
"pcvBasis")==0)
1273 #ifdef HAVE_EIGENVAL
1274 if(strcmp(sys_cmd,
"hessenberg")==0)
1281 #ifdef HAVE_EIGENVAL
1282 if(strcmp(sys_cmd,
"eigenvals")==0)
1289 #ifdef HAVE_EIGENVAL
1290 if(strcmp(sys_cmd,
"rowelim")==0)
1297 #ifdef HAVE_EIGENVAL
1298 if(strcmp(sys_cmd,
"rowcolswap")==0)
1306 if(strcmp(sys_cmd,
"gmsnf")==0)
1313 if(strcmp(sys_cmd,
"contributors") == 0)
1317 "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");
1322 #ifdef HAVE_SPECTRUM
1323 if(strcmp(sys_cmd,
"spectrum") == 0)
1337 if(((
long)
h->next->Data())==1L)
1343 if(strcmp(sys_cmd,
"semic") == 0)
1349 if (
h->next->next==
NULL)
1351 else if (
h->next->next->Typ()==
INT_CMD)
1358 if(strcmp(sys_cmd,
"spadd") == 0)
1369 if(strcmp(sys_cmd,
"spmul") == 0)
1381 #define HAVE_SHEAFCOH_TRICKS 1
1383 #ifdef HAVE_SHEAFCOH_TRICKS
1384 if(strcmp(sys_cmd,
"tensorModuleMult")==0)
1390 int m = (int)( (
long)
h->Data() );
1391 ideal
M = (ideal)
h->next->Data();
1402 if (strcmp(sys_cmd,
"twostd") == 0)
1407 I=(ideal)
h->CopyD();
1421 if (strcmp(sys_cmd,
"bracket") == 0)
1426 poly
p=(poly)
h->CopyD();
1428 poly q=(poly)
h->Data();
1439 if (strcmp(sys_cmd,
"env")==0)
1443 ring r = (ring)
h->Data();
1450 WerrorS(
"`system(\"env\",<ring>)` expected");
1458 if (strcmp(sys_cmd,
"opp")==0)
1462 ring r=(ring)
h->Data();
1469 WerrorS(
"`system(\"opp\",<ring>)` expected");
1477 if (strcmp(sys_cmd,
"oppose")==0)
1480 && (
h->next!=
NULL))
1482 ring Rop = (ring)
h->Data();
1495 WerrorS(
"`system(\"oppose\",<ring>,<poly>)` expected");
1503 #ifdef HAVE_SHIFTBBA
1504 if (strcmp(sys_cmd,
"freegb") == 0)
1512 ideal I=(ideal)
h->CopyD();
1514 int uptodeg=(int)((
long)(
h->Data()));
1516 int lVblock=(int)((
long)(
h->Data()));
1527 WerrorS(
"system(\"freegb\",`ideal/module`,`int`,`int`) expected");
1538 if (strcmp(sys_cmd,
"walkNextWeight") == 0)
1545 Werror(
"system(\"walkNextWeight\" ...) intvecs not of length %d\n",
1549 res->data = (
void*) walkNextWeight(((
intvec*)
h->Data()),
1551 (ideal)
h->next->next->Data());
1552 if (
res->data ==
NULL ||
res->data == (
void*) 1L)
1568 if (strcmp(sys_cmd,
"walkInitials") == 0)
1572 WerrorS(
"system(\"walkInitials\", ideal) expected");
1575 res->data = (
void*) walkInitials((ideal)
h->Data());
1585 if (strcmp(sys_cmd,
"walkAddIntVec") == 0)
1591 res->data = (
intvec*) walkAddIntVec(arg1, arg2);
1600 #ifdef MwaklNextWeight
1601 if (strcmp(sys_cmd,
"MwalkNextWeight") == 0)
1608 Werror(
"system(\"MwalkNextWeight\" ...) intvecs not of length %d\n",
1614 ideal arg3 = (ideal)
h->next->next->Data();
1621 #endif //MWalkNextWeight
1625 if(strcmp(sys_cmd,
"Mivdp") == 0)
1629 WerrorS(
"system(\"Mivdp\", int) expected");
1632 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1634 Werror(
"system(\"Mivdp\" ...) intvecs not of length %d\n",
1638 int arg1 = (int) ((
long)(
h->Data()));
1648 if(strcmp(sys_cmd,
"Mivlp") == 0)
1652 WerrorS(
"system(\"Mivlp\", int) expected");
1655 if ((
int) ((
long)(
h->Data())) !=
currRing->N)
1657 Werror(
"system(\"Mivlp\" ...) intvecs not of length %d\n",
1661 int arg1 = (int) ((
long)(
h->Data()));
1672 if(strcmp(sys_cmd,
"MpDiv") == 0)
1676 poly arg1 = (poly)
h->Data();
1677 poly arg2 = (poly)
h->next->Data();
1678 poly
result = MpDiv(arg1, arg2);
1689 if(strcmp(sys_cmd,
"MpMult") == 0)
1693 poly arg1 = (poly)
h->Data();
1694 poly arg2 = (poly)
h->next->Data();
1695 poly
result = MpMult(arg1, arg2);
1705 if (strcmp(sys_cmd,
"MivSame") == 0)
1726 res->data = (
void*)(
long)
MivSame(arg1, arg2);
1733 if (strcmp(sys_cmd,
"M3ivSame") == 0)
1756 res->data = (
void*)(
long)
M3ivSame(arg1, arg2, arg3);
1763 if(strcmp(sys_cmd,
"MwalkInitialForm") == 0)
1769 Werror(
"system \"MwalkInitialForm\"...) intvec not of length %d\n",
1773 ideal
id = (ideal)
h->Data();
1785 if(strcmp(sys_cmd,
"MivMatrixOrder") == 0)
1789 WerrorS(
"system(\"MivMatrixOrder\",intvec) expected");
1802 if(strcmp(sys_cmd,
"MivMatrixOrderdp") == 0)
1806 WerrorS(
"system(\"MivMatrixOrderdp\",intvec) expected");
1809 int arg1 = (int) ((
long)(
h->Data()));
1819 if(strcmp(sys_cmd,
"MPertVectors") == 0)
1823 ideal arg1 = (ideal)
h->Data();
1825 int arg3 = (int) ((
long)(
h->next->next->Data()));
1835 if(strcmp(sys_cmd,
"MPertVectorslp") == 0)
1839 ideal arg1 = (ideal)
h->Data();
1841 int arg3 = (int) ((
long)(
h->next->next->Data()));
1851 if(strcmp(sys_cmd,
"Mfpertvector") == 0)
1855 ideal arg1 = (ideal)
h->Data();
1866 if(strcmp(sys_cmd,
"MivUnit") == 0)
1870 int arg1 = (int) ((
long)(
h->Data()));
1880 if(strcmp(sys_cmd,
"MivWeightOrderlp") == 0)
1894 if(strcmp(sys_cmd,
"MivWeightOrderdp") == 0)
1898 WerrorS(
"system(\"MivWeightOrderdp\",intvec) expected");
1912 if(strcmp(sys_cmd,
"MivMatrixOrderlp") == 0)
1916 WerrorS(
"system(\"MivMatrixOrderlp\",int) expected");
1919 int arg1 = (int) ((
long)(
h->Data()));
1929 if (strcmp(sys_cmd,
"MkInterRedNextWeight") == 0)
1936 Werror(
"system(\"MkInterRedNextWeight\" ...) intvecs not of length %d\n",
1942 ideal arg3 = (ideal)
h->next->next->Data();
1952 #ifdef MPertNextWeight
1953 if (strcmp(sys_cmd,
"MPertNextWeight") == 0)
1959 Werror(
"system(\"MPertNextWeight\" ...) intvecs not of length %d\n",
1964 ideal arg2 = (ideal)
h->next->Data();
1965 int arg3 = (int)
h->next->next->Data();
1972 #endif //MPertNextWeight
1976 #ifdef Mivperttarget
1977 if (strcmp(sys_cmd,
"Mivperttarget") == 0)
1981 ideal arg1 = (ideal)
h->Data();
1982 int arg2 = (int)
h->next->Data();
1989 #endif //Mivperttarget
1993 if (strcmp(sys_cmd,
"Mwalk") == 0)
2000 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d\n",
2004 ideal arg1 = (ideal)
h->CopyD();
2007 ring arg4 = (ring)
h->next->next->next->Data();
2008 int arg5 = (int) (
long)
h->next->next->next->next->Data();
2009 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
2010 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2020 if (strcmp(sys_cmd,
"Mwalk") == 0)
2029 Werror(
"system(\"Mwalk\" ...) intvecs not of length %d or %d\n",
2033 ideal arg1 = (ideal)
h->Data();
2036 ring arg4 = (ring)
h->next->next->next->Data();
2037 ideal
result = (ideal)
Mwalk(arg1, arg2, arg3,arg4);
2044 if (strcmp(sys_cmd,
"Mpwalk") == 0)
2051 Werror(
"system(\"Mpwalk\" ...) intvecs not of length %d\n",
currRing->N);
2054 ideal arg1 = (ideal)
h->Data();
2055 int arg2 = (int) (
long)
h->next->Data();
2056 int arg3 = (int) (
long)
h->next->next->Data();
2059 int arg6 = (int) (
long)
h->next->next->next->next->next->Data();
2060 int arg7 = (int) (
long)
h->next->next->next->next->next->next->Data();
2061 int arg8 = (int) (
long)
h->next->next->next->next->next->next->next->Data();
2062 ideal
result = (ideal)
Mpwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
2072 if (strcmp(sys_cmd,
"Mrwalk") == 0)
2081 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2085 ideal arg1 = (ideal)
h->Data();
2088 int arg4 = (int)(
long)
h->next->next->next->Data();
2089 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2090 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2091 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2092 ideal
result = (ideal)
Mrwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
2101 if (strcmp(sys_cmd,
"MAltwalk1") == 0)
2108 Werror(
"system(\"MAltwalk1\" ...) intvecs not of length %d\n",
2112 ideal arg1 = (ideal)
h->Data();
2113 int arg2 = (int) ((
long)(
h->next->Data()));
2114 int arg3 = (int) ((
long)(
h->next->next->Data()));
2127 if (strcmp(sys_cmd,
"Mfwalk_alt") == 0)
2134 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2138 ideal arg1 = (ideal)
h->Data();
2141 int arg4 = (int)
h->next->next->next->Data();
2142 ideal
result = (ideal) Mfwalk_alt(arg1, arg2, arg3, arg4);
2152 if (strcmp(sys_cmd,
"Mfwalk") == 0)
2159 Werror(
"system(\"Mfwalk\" ...) intvecs not of length %d\n",
2163 ideal arg1 = (ideal)
h->Data();
2166 int arg4 = (int)(
long)
h->next->next->next->Data();
2167 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2168 ideal
result = (ideal)
Mfwalk(arg1, arg2, arg3, arg4, arg5);
2177 if (strcmp(sys_cmd,
"Mfrwalk") == 0)
2194 Werror(
"system(\"Mfrwalk\" ...) intvecs not of length %d or %d\n",
2199 ideal arg1 = (ideal)
h->Data();
2202 int arg4 = (int)(
long)
h->next->next->next->Data();
2203 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2204 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2205 ideal
result = (ideal)
Mfrwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2212 if (strcmp(sys_cmd,
"Mprwalk") == 0)
2221 Werror(
"system(\"Mrwalk\" ...) intvecs not of length %d or %d\n",
2225 ideal arg1 = (ideal)
h->Data();
2228 int arg4 = (int)(
long)
h->next->next->next->Data();
2229 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2230 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2231 int arg7 = (int)(
long)
h->next->next->next->next->next->next->Data();
2232 int arg8 = (int)(
long)
h->next->next->next->next->next->next->next->Data();
2233 int arg9 = (int)(
long)
h->next->next->next->next->next->next->next->next->Data();
2234 ideal
result = (ideal)
Mprwalk(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
2244 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2251 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2255 ideal arg1 = (ideal)
h->Data();
2268 if (strcmp(sys_cmd,
"MAltwalk2") == 0)
2275 Werror(
"system(\"MAltwalk2\" ...) intvecs not of length %d\n",
2279 ideal arg1 = (ideal)
h->Data();
2291 if (strcmp(sys_cmd,
"TranMImprovwalk") == 0)
2298 Werror(
"system(\"TranMImprovwalk\" ...) intvecs not of length %d\n",
2302 ideal arg1 = (ideal)
h->Data();
2305 int arg4 = (int) ((
long)(
h->next->next->next->Data()));
2316 if (strcmp(sys_cmd,
"TranMrImprovwalk") == 0)
2321 h->next->next->next ==
NULL ||
h->next->next->next->Typ() !=
INT_CMD ||
2322 h->next->next->next ==
NULL ||
h->next->next->next->next->Typ() !=
INT_CMD ||
2323 h->next->next->next ==
NULL ||
h->next->next->next->next->next->Typ() !=
INT_CMD)
2325 WerrorS(
"system(\"TranMrImprovwalk\", ideal, intvec, intvec) expected");
2331 Werror(
"system(\"TranMrImprovwalk\" ...) intvecs not of length %d\n",
currRing->N);
2334 ideal arg1 = (ideal)
h->Data();
2337 int arg4 = (int)(
long)
h->next->next->next->Data();
2338 int arg5 = (int)(
long)
h->next->next->next->next->Data();
2339 int arg6 = (int)(
long)
h->next->next->next->next->next->Data();
2340 ideal
result = (ideal) TranMrImprovwalk(arg1, arg2, arg3, arg4, arg5, arg6);
2350 #ifndef MAKE_DISTRIBUTION
◆ jjVARIABLES_ID()
Definition at line 6301 of file ipshell.cc.
6304 ideal I=(ideal)u->
Data();
6307 for(
i=I->nrows*I->ncols-1;
i>=0;
i--)
◆ jjVARIABLES_P()
◆ killlocals()
◆ kQHWeight()
◆ kWeight()
Definition at line 3270 of file ipshell.cc.
3272 ideal F=(ideal)id->
Data();
3278 res->data=(
char *)iv;
3282 double wNsqr = (double)2.0 / (
double)n;
3284 x = (
int * )
omAlloc(2 * (n + 1) *
sizeof(int));
3286 for (
i = n;
i!=0;
i--)
3287 (*iv)[
i-1] =
x[
i + n + 1];
◆ list_cmd()
Definition at line 422 of file ipshell.cc.
424 package savePack=currPack;
431 if (strcmp(what,
"all")==0)
466 Werror(
"%s is undefined",what);
500 package save_p=currPack;
◆ loNewtonP()
compute Newton Polytopes of input polynomials
Definition at line 4532 of file ipshell.cc.
◆ loSimplex()
Implementation of the Simplex Algorithm.
For args, see class simplex.
Definition at line 4538 of file ipshell.cc.
4542 WerrorS(
"Ground field not implemented!");
4562 LP->
m= (int)(
long)(
v->Data());
4568 LP->
n= (int)(
long)(
v->Data());
4574 LP->
m1= (int)(
long)(
v->Data());
4580 LP->
m2= (int)(
long)(
v->Data());
4586 LP->
m3= (int)(
long)(
v->Data());
4588 #ifdef mprDEBUG_PROT
4589 Print(
"m (constraints) %d\n",LP->
m);
4590 Print(
"n (columns) %d\n",LP->
n);
4614 lres->
m[4].
data=(
void*)(
long)LP->
m;
4617 lres->
m[5].
data=(
void*)(
long)LP->
n;
4619 res->data= (
void*)lres;
◆ mpJacobi()
◆ mpKoszul()
Definition at line 3062 of file ipshell.cc.
3064 int n=(int)(
long)
b->Data();
3065 int d=(int)(
long)c->
Data();
3072 if ((d>n) || (d<1) || (n<1))
3077 int *choise = (
int*)
omAlloc(d*
sizeof(
int));
3081 temp=(ideal)id->
Data();
3096 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 4647 of file ipshell.cc.
4651 gls= (poly)(arg1->
Data());
4652 int howclean= (int)(
long)arg3->
Data();
4659 WerrorS(
"Ground field not implemented!");
4666 unsigned long int ii = (
unsigned long int)arg2->
Data();
4672 WerrorS(
"Input polynomial is constant!");
4698 if ( (vpos !=
i) && (
pGetExp( piter,
i ) != 0) )
4700 WerrorS(
"The input polynomial must be univariate!");
4708 number * pcoeffs= (number *)
omAlloc( (deg+1) *
sizeof( number ) );
4710 for (
i= deg;
i >= 0;
i-- )
4724 #ifdef mprDEBUG_PROT
4725 for (
i=deg;
i >= 0;
i--)
4733 roots->
solver( howclean );
4740 rlist->
Init( elem );
4744 for (
j= 0;
j < elem;
j++ )
4753 for (
j= 0;
j < elem;
j++ )
4757 rlist->
m[
j].
data=(
void *)dummy;
4771 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 4624 of file ipshell.cc.
4626 ideal gls = (ideal)(arg1->
Data());
4627 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 4877 of file ipshell.cc.
4888 else gls= (ideal)(
v->Data());
4894 else imtype= (int)(
long)
v->Data();
4899 ideal test_id=
idInit(1,1);
4903 if (gls->m[
j]!=
NULL)
4905 test_id->m[0]=gls->m[
j];
4909 WerrorS(
"Newton polytope not of expected dimension");
4923 unsigned long int ii=(
unsigned long int)
v->Data();
4931 else howclean= (int)(
long)
v->Data();
4960 WerrorS(
"Error occurred during matrix setup!");
4968 #ifdef mprDEBUG_PROT
4973 WerrorS(
"Unsuitable input ideal: Minor of resultant matrix is singular!");
4979 if ( interpolate_det )
4985 if ( interpolate_det )
4990 #ifdef mprDEBUG_PROT
4992 for (
i=0;
i < c;
i++)
pWrite(iproots[
i]->getPoly());
4994 for (
i=0;
i < c;
i++)
pWrite(muiproots[
i]->getPoly());
4998 arranger=
new rootArranger( iproots, muiproots, howclean );
5009 WerrorS(
"Solver was unable to find any roots!");
5015 for (
i=0;
i <
count;
i++)
delete iproots[
i];
5018 for (
i=0;
i <
count;
i++)
delete muiproots[
i];
5025 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 4776 of file ipshell.cc.
4780 p= (ideal)arg1->
Data();
4781 w= (ideal)arg2->
Data();
4792 int tdg= (int)(
long)arg3->
Data();
4799 WerrorS(
"Last input parameter must be > 0!");
4807 if (
m != (
int)
pow((
double)tdg+1,(
double)n) )
4809 Werror(
"Size of second input ideal must be equal to %d!",
4810 (
int)
pow((
double)tdg+1,(
double)n));
4817 WerrorS(
"Ground field not implemented!");
4822 number *pevpoint= (number *)
omAlloc( n *
sizeof( number ) );
4823 for (
i= 0;
i < n;
i++ )
4832 WerrorS(
"Elements of first input ideal must not be equal to -1, 0, 1!");
4841 WerrorS(
"Elements of first input ideal must be numbers!");
4844 pevpoint[
i]=
nCopy( tmp );
4848 number *wresults= (number *)
omAlloc(
m *
sizeof( number ) );
4849 for (
i= 0;
i <
m;
i++ )
4858 WerrorS(
"Elements of second input ideal must be numbers!");
4866 number *ncpoly= vm.interpolateDense( wresults );
4868 poly rpoly= vm.numvec2poly( ncpoly );
4873 res->data= (
void*)rpoly;
◆ paPrint()
◆ rCompose()
Definition at line 2760 of file ipshell.cc.
2788 int ch = (int)(
long)L->
m[0].
Data();
2798 Warn(
"%d is invalid characteristic of ground field. %d is used.", ch,
l);
2801 #ifndef TEST_ZN_AS_ZP
2805 mpz_init_set_ui(modBase,(
long) ch);
2812 R->cf->has_simple_Inverse=1;
2833 int ch = (int)(
long)LL->
m[0].
Data();
2834 while ((ch!=
fftable[is_gf_char]) && (
fftable[is_gf_char])) is_gf_char++;
2835 if (
fftable[is_gf_char]==0) is_gf_char=-1;
2856 WerrorS(
"could not create the specified coefficient field");
2860 if( extRing->qideal !=
NULL )
2864 extParam.
r = extRing;
2871 extParam.
r = extRing;
2881 WerrorS(
"coefficient field must be described by `int` or `list`");
2887 WerrorS(
"could not create coefficient field described by the input!");
2899 else R->isLPring=isLetterplace;
2900 if (bitmask!=0x7fff)
R->bitmask=bitmask*2;
2907 ideal q=(ideal)L->
m[3].
Data();
2913 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2920 int par_perm_size=0;
2940 par_perm_size=
rPar(orig_ring);
2950 WerrorS(
"coefficient fields must be equal if q-ideal !=0");
2954 perm=(
int *)
omAlloc0((orig_ring->N+1)*
sizeof(int));
2955 if (par_perm_size!=0)
2956 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
2960 maFindPerm(orig_ring->names,orig_ring->N,orig_ring->parameter,orig_ring->P,
2969 else if (par_perm_size!=0)
2977 par_perm,par_perm_size);
2995 WerrorS(
"q-ideal must be given as `ideal`");
◆ rDecompose()
Definition at line 2058 of file ipshell.cc.
2067 || (r->qideal !=
NULL)
2074 WerrorS(
"ring with polynomial data must be the base ring or compatible");
2099 else if ( r->cf->extRing!=
NULL )
2109 Lc->m[0].data=(
void*)(
long)r->cf->m_nfCharQ;
2116 Lc->m[1].data=(
void*)Lv;
2127 Loo->
m[1].
data=(
void *)iv;
2130 Lo->
m[0].
data=(
void*)Loo;
2133 Lc->m[2].data=(
void*)Lo;
2144 L->
m[0].
data=(
void *)(
long)r->cf->ch;
2151 for(
i=0;
i<r->N;
i++)
2157 L->
m[1].
data=(
void *)LL;
2178 assume( r->block0[
i] == r->block1[
i] );
2179 const int s = r->block0[
i];
2185 else if (r->block1[
i]-r->block0[
i] >=0 )
2187 int bl=
j=r->block1[
i]-r->block0[
i];
2195 j+=r->wvhdl[
i][bl+1];
2198 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2200 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
2202 else switch (r->order[
i])
2209 for(;
j>=0;
j--) (*iv)[
j]=1;
2219 LLL->
m[1].
data=(
void *)iv;
2220 LL->
m[
i].
data=(
void *)LLL;
2223 L->
m[2].
data=(
void *)LL;
2227 if (r->qideal==
NULL)
2232 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDecompose_CF()
Definition at line 1856 of file ipshell.cc.
1863 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1876 else if ( C->extRing!=
NULL )
1886 Lc->m[0].data=(
void*)(
long)C->m_nfCharQ;
1893 Lc->m[1].data=(
void*)Lv;
1904 Loo->
m[1].
data=(
void *)iv;
1907 Lo->
m[0].
data=(
void*)Loo;
1910 Lc->m[2].data=(
void*)Lo;
1916 res->data=(
void*)
Lc;
1921 res->data=(
void *)(
long)C->ch;
◆ rDecompose_list_cf()
Definition at line 1927 of file ipshell.cc.
1942 WerrorS(
"ring with polynomial data must be the base ring or compatible");
1960 L->
m[0].
data=(
char*)r->cf; r->cf->ref++;
1966 for(
i=0;
i<r->N;
i++)
1972 L->
m[1].
data=(
void *)LL;
1992 assume( r->block0[
i] == r->block1[
i] );
1993 const int s = r->block0[
i];
1999 else if (r->block1[
i]-r->block0[
i] >=0 )
2001 int bl=
j=r->block1[
i]-r->block0[
i];
2009 j+=r->wvhdl[
i][bl+1];
2012 if ((r->wvhdl!=
NULL) && (r->wvhdl[
i]!=
NULL))
2014 for(;
j>=0;
j--) (*iv)[
j]=r->wvhdl[
i][
j+(
j>bl)];
2016 else switch (r->order[
i])
2023 for(;
j>=0;
j--) (*iv)[
j]=1;
2033 LLL->
m[1].
data=(
void *)iv;
2034 LL->m[
i].data=(
void *)LLL;
2037 L->
m[2].
data=(
void *)LL;
2041 if (r->qideal==
NULL)
2046 #ifdef HAVE_PLURAL // NC! in rDecompose
◆ rDefault()
Definition at line 1555 of file ipshell.cc.
1571 #ifndef TEST_ZN_AS_ZP
1575 mpz_init_set_ui(modBase, (
long)32003);
1582 r->cf->has_simple_Inverse=1;
1595 r->block0 = (
int *)
omAlloc0(3 *
sizeof(
int *));
1596 r->block1 = (
int *)
omAlloc0(3 *
sizeof(
int *));
◆ rFindHdl()
◆ rInit()
Definition at line 5574 of file ipshell.cc.
5605 WerrorS(
"parameter expected");
5612 for(
int i=pars-1;
i>=0;
i--)
5624 int ch = (int)(
long)pn->
Data();
5635 if ((ch<2)||(ch!=ch2))
5637 Warn(
"%d is invalid as characteristic of the ground field. 32003 is used.", ch);
5640 #ifndef TEST_ZN_AS_ZP
5644 mpz_init_set_ui(modBase, (
long)ch);
5651 cf->has_simple_Inverse=1;
5664 if ((ch!=0) && (ch!=
IsPrime(ch)) && (pars == 1))
5676 if ((ch!=0) && (ch!=
IsPrime(ch)))
5678 WerrorS(
"too many parameters");
5686 WerrorS(
"parameter expected");
5692 extParam.
r =
rDefault( ch, pars, names);
5693 for(
int i=pars-1;
i>=0;
i--)
5706 && ((strcmp(pn->
name,
"real")==0) || (strcmp(pn->
name,
"complex")==0)))
5709 BOOLEAN complex_flag=(strcmp(pn->
name,
"complex")==0);
5712 float_len=(int)(
long)pnn->
Data();
5713 float_len2=float_len;
5717 float_len2=(int)(
long)pnn->
Data();
5752 else if ((pn->
name !=
NULL) && (strcmp(pn->
name,
"integer") == 0))
5756 unsigned int modExponent = 1;
5757 mpz_init_set_si(modBase, 0);
5764 mpz_set_ui(modBase, (
long) pnn->
Data());
5768 modExponent = (long) pnn->
Data();
5773 mpz_mul_ui(modBase, modBase, (
int)(
long) pnn->
Data());
5786 if ((mpz_cmp_ui(modBase, 1) == 0) && (
mpz_sgn1(modBase) < 0))
5788 WerrorS(
"Wrong ground ring specification (module is 1)");
5791 if (modExponent < 1)
5793 WerrorS(
"Wrong ground ring specification (exponent smaller than 1");
5798 if (modExponent > 1 &&
cf ==
NULL)
5800 if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*
sizeof(
unsigned long)))
5811 WerrorS(
"modulus must not be 0 or parameter not allowed");
5817 info.exp= modExponent;
5826 WerrorS(
"modulus must not be 0 or parameter not allowed");
5832 info.exp= modExponent;
5843 extParam.
r = (ring)pn->
Data();
5855 WerrorS(
"Wrong or unknown ground field specification");
5861 Print(
"pn[%p]: type: %d [%s]: %p, name: %s", (
void*)
p,
p->Typ(),
Tok2Cmdname(
p->Typ()),
p->Data(), (
p->name ==
NULL?
"NULL" :
p->name) );
5883 WerrorS(
"Invalid ground field specification");
5907 WerrorS(
"name of ring variable expected");
◆ rKill() [1/2]
◆ rKill() [2/2]
Definition at line 6119 of file ipshell.cc.
6121 if ((r->ref<=0)&&(r->order!=
NULL))
6131 if (
j==0)
WarnS(
"killing the basering for level 0");
6136 while (r->idroot!=
NULL)
6139 killhdl2(r->idroot,&(r->idroot),r);
◆ rSetHdl()
Definition at line 5081 of file ipshell.cc.
5088 if (rg==
NULL)
return;
5113 Warn(
"deleting denom_list for ring change to %s",
IDID(
h));
5127 if ((rg!=
NULL) && (rg->idroot==
NULL))
◆ rSimpleFindHdl()
◆ scIndIndset()
Definition at line 1027 of file ipshell.cc.
1093 res->m[
i].data = (
void *)save->set;
1105 res->m[
i].data = (
void *)save->set;
◆ semicProc()
Definition at line 4520 of file ipshell.cc.
4523 memset(&tmp,0,
sizeof(tmp));
◆ semicProc3()
Definition at line 4480 of file ipshell.cc.
4483 BOOLEAN qh=(((int)(
long)
w->Data())==1);
4494 WerrorS(
"first argument is not a spectrum" );
4499 WerrorS(
"second argument is not a spectrum" );
◆ setOption()
Definition at line 586 of file misc_ip.cc.
612 if(strcmp(n,
"get")==0)
621 if(strcmp(n,
"set")==0)
641 if(strcmp(n,
"none")==0)
659 WarnS(
"cannot set option");
670 else if ((strncmp(n,
"no",2)==0)
678 WarnS(
"cannot clear option");
697 else if ((strncmp(n,
"no",2)==0)
712 Werror(
"unknown option `%s`",n);
721 extern int om_sing_opt_show_mem;
723 else om_sing_opt_show_mem = 0;
◆ showOption()
◆ singular_example()
void singular_example |
( |
char * |
str | ) |
|
Definition at line 449 of file misc_ip.cc.
455 while (*ss!=
'\0') ss++;
465 if((lib!=
NULL)&&(*lib!=
'\0'))
467 Print(
"// proc %s from lib %s\n",
s,lib);
488 sprintf(sing_file,
"%s/%s.sing", res_m,
s);
502 got = fread(
s,
sizeof(
char),
length,
fd);
506 Werror(
"Error while reading file %s", sing_file);
511 strcat(
s,
"\n;return();\n\n");
520 Werror(
"no example for %s", str);
◆ singular_system()
◆ spaddProc()
Definition at line 4397 of file ipshell.cc.
4410 WerrorS(
"first argument is not a spectrum:" );
4415 WerrorS(
"second argument is not a spectrum:" );
◆ spectrumfProc()
Definition at line 4153 of file ipshell.cc.
4168 WerrorS(
"only works for local orderings" );
4173 WerrorS(
"does not work in quotient rings" );
◆ spectrumProc()
Definition at line 4102 of file ipshell.cc.
4114 WerrorS(
"only works for local orderings" );
4122 WerrorS(
"does not work in quotient rings" );
◆ spmulProc()
Definition at line 4439 of file ipshell.cc.
4448 int k = (int)(
long)second->Data( );
4452 WerrorS(
"first argument is not a spectrum" );
4457 WerrorS(
"second argument should be positive" );
◆ syBetti1()
Definition at line 3141 of file ipshell.cc.
3144 memset(&tmp,0,
sizeof(tmp));
◆ syBetti2()
Definition at line 3118 of file ipshell.cc.
3122 BOOLEAN minim=(int)(
long)
w->Data();
3124 int add_row_shift=0;
3130 add_row_shift = ww->
min_in();
3131 (*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 789 of file misc_ip.cc.
792 StringAppend(
"Singular for %s version %s (%d, %d bit) %s #%s",
795 #ifdef MAKE_DISTRIBUTION
796 VERSION_DATE, GIT_VERSION);
802 #if defined(mpir_version)
803 StringAppend(
"MPIR(%s)~GMP(%s),", mpir_version, gmp_version);
804 #elif defined(gmp_version)
822 #if defined(HAVE_DYN_RL)
836 #if defined(HAVE_READLINE) && !defined(FEREAD)
854 #ifdef HAVE_DYNAMIC_LOADING
886 #ifdef __OPTIMIZE_SIZE__
892 #ifdef HAVE_GENERIC_ADD
897 #ifdef HAVE_GENERIC_MULT
919 #define SI_SHOW_BUILTIN_MODULE(name) StringAppend(" %s", #name);
923 #undef SI_SHOW_BUILTIN_MODULE
926 "CC = %s,FLAGS : %s,\n"
927 "CXX = %s,FLAGS : %s,\n"
928 "DEFS : %s,CPPFLAGS : %s,\n"
929 "LDFLAGS : %s,LIBS : %s "
931 "(ver: " __VERSION__
")"
933 "\n",AC_CONFIGURE_ARGS, CC,CFLAGS
" " PTHREAD_CFLAGS,
934 CXX,CXXFLAGS
" " PTHREAD_CFLAGS, DEFS,CPPFLAGS, LDFLAGS,
935 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)
@ n_Zn
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 might be != 0
ideal TranMImprovwalk(ideal G, intvec *curr_weight, intvec *target_tmp, int nP)
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)
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.
@ n_long_C
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)
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
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)
@ n_Z2m
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)
ideal freegb(ideal I, int uptodeg, int lVblock)
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)
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
@ n_Q
rational (GMP) numbers
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)
@ n_Znm
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)
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)
@ n_long_R
real floating point (GMP) numbers
void factoryseed(int s)
random seed initializer
static void iiCleanProcs(idhdl &root)
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)
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)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
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.
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...
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...
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)
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)
@ n_Z
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)
const char * singular_date
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)
static BOOLEAN iiNoKeepRing
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)
double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
static int ipSwapId(idhdl tomove, idhdl &root1, idhdl &root2)
intvec * MivMatrixOrder(intvec *iv)
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)
denominator_list DENOMINATOR_LIST
libstackv pop(const char *p)
@ n_transExt
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)
Linear Programming / Linear Optimization using Simplex - Algorithm.
int exprlist_length(leftv v)
static BOOLEAN iiInternalExport(leftv v, int toLev)
@ n_R
single prescision (6,6) real numbers
struct fe_option feOptSpec[]
Base class for solving 0-dim poly systems using u-resultant.
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)
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)
#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)
poly p_Shrink(poly p, int lV, const ring r)
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)
BOOLEAN iiApplyINTVEC(leftv res, leftv a, int op, leftv proc)
void hSupp(scfmon stc, int Nstc, varset var, int *Nvar)
@ ringorder_IS
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)
#define pLastVblock(p, lV)
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)
static SArithBase sArithBase
Base entry for arithmetic.
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)
void(* WerrorS_callback)(const char *s)
virtual ideal getMatrix()
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[]
static int WerrorS_dummy_cnt
matrix evHessenberg(matrix M)
ring rAssure_HasComp(const ring r)
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
const struct sConvertTypes dConvertTypes[]
#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 &)
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 char const ** 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)
poly p_LPshift(poly p, int sh, int uptodeg, int lV, const ring r)
static BOOLEAN rField_is_Zp(const ring r)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
#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)
@ n_algExt
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)