72 ch[0]=c->op;ch[1]=
'\0';
75 ::Print(
"##command %d(%s), %d args\n",
309 else {
::Print(
"Print: blackbox %d(bb=NULL)",t); }
312 ::Print(
"Print:unknown type %s(%d)",
Tok2Cmdname(t),t);
314 if ((store!=
NULL)&&(store!=
this))
472 return (
void *)
pCopy((poly)d);
507 if (
b!=
NULL)
return b->blackbox_Copy(
b,d);
511 Warn(
"s_internalCopy: cannot copy type %s(%d)",
632 Print(
"currRing? ref=%d\n",
R->ref);
645 if (cmd->arg1.rtyp!=0) cmd->arg1.CleanUp(r);
646 if (cmd->arg2.rtyp!=0) cmd->arg2.CleanUp(r);
647 if (cmd->arg3.rtyp!=0) cmd->arg3.CleanUp(r);
679 if (
b!=
NULL)
b->blackbox_destroy(
b,d);
683 Warn(
"s_internalDelete: cannot delete type %s(%d)",
719 WerrorS(
"object from another ring");
819 size_t len=
strlen((
char*) d) + 3;
925 snprintf(
ns,len,
"intmat(intvec(%s),%d,%d)",
s,
v->rows(),
v->cols());
982 snprintf(
ns,len,
"\"%s\";%sideal(%s)",
s,(
dim == 2 ?
"\n" :
" "),
id);
1007 s = (
pi->data.s.body);
1040 if (
bb!=
NULL)
return bb->blackbox_String(
bb,d);
1059 return ((
idhdl)
h->data.ustring)->typ;
1134 if ((0<
e->start)&&(
e->start<=
l->nr+1))
1137 l->m[
e->start-1].e=
e->next;
1138 r=
l->m[
e->start-1].Typ();
1139 e->next=
l->m[
e->start-1].e;
1140 l->m[
e->start-1].e=
tmp;
1170 if ((0<
e->start)&&(
e->start<=
l->nr+1))
1172 l->m[
e->start-1].e=
e->next;
1173 r=
l->m[
e->start-1].LTyp();
1199 WerrorS(
"object from another ring");
1209 return ((
idhdl)
h->data.ustring)->
data.ustring;
1230 return (
void *)
A->qideal->m[0];
1233 return (
void *)
nInit(0);
1273 r=(
char *)(
long)((*iv)[
index-1]);
1281 ||(
e->next->start<1)
1282 ||(
e->next->start>iv->
cols()))
1285 Werror(
"wrong range[%d,%d] in intmat %s(%dx%d)",
index,
e->next->start,
1310 ||(
e->next->start<1)
1311 ||(
e->next->start>
m->cols()))
1314 Werror(
"wrong range[%d,%d] in bigintmat %s(%dx%d)",
index,
e->next->start,
1315 this->Name(),
m->rows(),
m->cols());
1327 ||(
e->next->start<1)
1328 ||(
e->next->start>
m->cols()))
1331 Werror(
"wrong range[%d,%d] in matrix %s(%dx%d)",
index,
e->next->start,
1332 this->Name(),
m->rows(),
m->cols());
1367 && ((c=
e->next->start)>0) &&(c<=
IDELEMS(
I)))
1408 r[0]=*(((
char *)d)+
index-1);
1443 ||(
e->next->start<1)
1447 Werror(
"wrong range[%d,%d] in matrix %s(%dx%d)",
1472 char *
dd=(
char *)
l->m[
index-1].data;
1473 int j=
e->next->start-1;
1489 r=(
char *)
l->m[
index-1].Data();
1514 return &(
v->attribute);
1543 if ((0>=
e->start)||(
e->start>
l->nr+1))
1547 l->m[
e->start-1].e=
e->next;
1548 leftv r=
l->m[
e->start-1].LData();
1552 return &(
l->m[
e->start-1]);
1571 if ((0>=
e->start)||(
e->start>
l->nr+1))
1575 l->m[
e->start-1].e=
e->next;
1576 leftv r=
l->m[
e->start-1].LHdl();
1580 return &(
l->m[
e->start-1]);
1601 Warn(
"%s is no standard basis",
h->Name());
1631 if ((*
id<
' ')||(*
id>(
char)126))
1633 Print(
"wrong id :%s:\n",
id);
1640 v->req_packhdl =
pa;
1660 else if ((
id[0]!=
'-')&&(
id[0]>=
'@' ))
1662 if (
strcmp(
id,
"basering")==0)
1676 else if (
strcmp(
id,
"Current")==0)
1692 h=
v->req_packhdl->idroot->get(
id,
myynest);
1718 v->data = (
void *)
p;
1729 if (ok && (
p!=
NULL))
1751 if (
id[0]==
'-') {
i=1; }
1767 v->data=(
void*)(
long)
j;
1784 v->data = (
void *)
nInit(0);
1804 #ifdef HAVE_SHIFTBBA
1831 v->data = (
void *)
nInit(0);
1913 v->data = (
char *)
h;
1921 Print(
"non-digit:%s\n",
id);
1929 if ((*
id<
' ')||(*
id>(
char)126))
1931 Print(
"wrong id :%s:\n",
id);
1948 v->data = (
void *)
nInit(0);
1965 #ifdef HAVE_SHIFTBBA
2022 char *what=(
char *)(d->arg1.Data());
2040 else if (d->op==
'=')
2048 const char *n=d->arg1.name;
2049 nok=(n ==
NULL) || d->arg2.Eval();
2054 if (d->arg1.rtyp!=
IDHDL)
2057 if (d->arg1.rtyp==
IDHDL)
2091 if ((toktype==
CMD_M)
2097 if (d->argc>=1)
nok=d->arg1.Eval();
2098 if ((!
nok) && (d->argc>=2))
2105 if ((!
nok) && (d->argc==3))
2123 else if (d->argc==1)
2181 int i=
id->ncols*
id->nrows-1;
bigintmat * bimCopy(const bigintmat *b)
same as copy constructor - apart from it being able to accept NULL as input
#define BIMATELEM(M, I, J)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
char * String()
IO: String returns a singular string containing the matrix, needs freeing afterwards.
void killAll(const ring r)
Class used for (list of) interpreter objects.
char * String(void *d=NULL, BOOLEAN typed=FALSE, int dim=1)
Called for conversion to string (used by string(..), write(..),..)
void CleanUp(ring r=currRing)
void Print(leftv store=NULL, int spaces=0)
Called by type_cmd (e.g. "r;") or as default in jPRINT.
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
@ n_long_C
complex floating point (GMP) numbers
static FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE char * nCoeffName(const coeffs cf)
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
static FORCE_INLINE const char * n_Read(const char *s, number *a, const coeffs r)
!!! Recommendation: This method is too cryptic to be part of the user- !!! interface....
void nKillChar(coeffs r)
undo all initialisations
static BOOLEAN pa(leftv res, leftv args)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
VAR char my_yylinebuf[80]
void nfShowMipo(const coeffs r)
Show the mininimal polynom.... NOTE: this is used by char * sleftv::String(void *d,...
const char * iiTwoOps(int t)
const char * Tok2Cmdname(int tok)
BOOLEAN yyInRingConstruction
void ipPrint_MA0(matrix m, const char *name)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
intvec * ivCopy(const intvec *o)
#define IMATELEM(M, I, J)
BOOLEAN iiExprArith2(leftv res, leftv a, int op, leftv b, BOOLEAN proccall)
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
BOOLEAN iiExprArithM(leftv res, leftv a, int op)
BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c)
void jjNormalizeQRingId(leftv I)
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
VAR omBin sip_command_bin
idhdl ggetid(const char *n)
void killhdl(idhdl h, package proot)
BOOLEAN piKill(procinfov pi)
EXTERN_VAR omBin sleftv_bin
#define jjNormalizeQRingP(p)
package paCopy(package pack)
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv args)
INST_VAR sleftv iiRETURNEXPR
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
BOOLEAN iiCheckRing(int i)
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
void paPrint(const char *n, package p)
char * lString(lists l, BOOLEAN typed, int dim)
BOOLEAN lRingDependend(lists L)
map maCopy(map theMap, const ring r)
char * iiStringMatrix(matrix im, int dim, const ring r, char ch)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
#define MATELEM(mat, i, j)
1-based access to matrix
#define SMATELEM(A, i, j, R)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
The main handler for Singular numbers which are suitable for Singular polynomials.
#define omCheckAddr(addr)
#define omCheckIf(cond, test)
#define omCheckAddrSize(addr, size)
#define omFreeBin(addr, bin)
#define omFreeBinAddr(addr)
#define omGetSpecBin(size)
static int index(p_Length length, p_Ord ord)
static void p_LmDelete(poly p, const ring r)
static void p_Delete(poly *p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
#define pIsConstant(p)
like above, except that Comp must be 0
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pCopy(p)
return a copy of the poly
void StringSetS(const char *st)
void StringAppendS(const char *st)
void PrintNSpaces(const int n)
void PrintS(const char *s)
void Werror(const char *fmt,...)
void rWrite(ring r, BOOLEAN details)
int r_IsRingVar(const char *n, char **names, int N)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static ring rIncRefCnt(ring r)
static BOOLEAN rField_is_GF(const ring r)
void sBucketPrint(sBucket_pt bucket)
char * sBucketString(sBucket_pt bucket)
void sBucketDeleteAndDestroy(sBucket_pt *bucket_pt)
sBucket_pt sBucketCopy(const sBucket_pt bucket)
Copy sBucket non-intrusive!!!
poly sBucketPeek(sBucket_pt b)
const char * slStatus(si_link l, const char *request)
static si_link slCopy(si_link l)
static char * slString(si_link l)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
matrix id_Module2Matrix(ideal mod, const ring R)
void syMake(leftv v, const char *id, package pa)
void s_internalDelete(const int t, void *d, const ring r)
STATIC_VAR omBin size_two_bin
INST_VAR sleftv sLastPrinted
static void * s_internalCopy(const int t, void *d)
BOOLEAN assumeStdFlag(leftv h)
void syMakeMonom(leftv v, const char *id)
procinfov piCopy(procinfov pi)
void s_internalDelete(const int t, void *d, const ring r)
EXTERN_VAR omBin sSubexpr_bin
const char * piProcinfo(procinfov pi, const char *request)
void syMake(leftv v, const char *name, package pa=NULL)
syStrategy syCopy(syStrategy syzstr)
void syKillComputation(syStrategy syzstr, ring r=currRing)
void syPrint(syStrategy syzstr, const char *currRingName)