42 N->m[n].Copy(&L->
m[n]);
56 l->Init(ul->
nr+vl->
nr+2);
59 for(
i=0;
i<=ul->
nr;
i++)
65 for(
i=0;
i<=vl->
nr;
i++)
77 memset(u,0,
sizeof(*u));
78 memset(
v,0,
sizeof(*
v));
79 res->data = (
char *)
l;
89 if ((pos<0)||(
v->rtyp==
NONE))
100 for(
j=ul->
nr+1;
j<pos;
j++)
103 l->m[pos].rtyp=
v->Typ();
104 l->m[pos].data=
v->CopyD();
105 l->m[pos].flag=
v->flag;
106 attr *a=
v->Attribute();
109 l->m[pos].attribute=(*a)->Copy();
141 Werror(
"cannot insert type `%s` at pos. %d",
164 int VIndex=(int)(
long)
v->Data()-1;
165 int EndIndex=
lSize(ul);
167 if((0<=VIndex)&&(VIndex<=ul->nr))
172 l->Init(EndIndex+(VIndex>EndIndex));
175 for(
i=0;
i<VIndex;
i++)
179 for(
i=VIndex+1;
i<=ul->
nr;
i++)
185 res->data = (
char *)
l;
188 Werror(
"wrong index %d in list(%d)",VIndex+1,ul->
nr+1);
201 if ((
j>0)&&(
j<=ul->
nr))
205 memcpy(&(ul->
m[
j-1]),&(ul->
m[
j]),(ul->
nr-
j+1)*
sizeof(
sleftv));
210 if ((cnt*2>=ul->
nr)||(cnt*
sizeof(
sleftv)>=1024))
215 res->data = (
char *)ul;
229 if ((BEGIN_RING<t /*L->
m[
i].rtyp*/)
240 int typ0,
intvec ** weights,
int add_row_shift)
253 if (reallen<=0) reallen=
currRing->N;
266 while ((
j>0) && (r[0]->
m[
j]==
NULL))
j--;
290 if ((weights!=
NULL) && (weights[
i]!=
NULL))
293 (*w) += add_row_shift;
302 WarnS(
"internal NULL in resolvente");
319 ideal I=(ideal)L->
m[
i-1].
data;
349 r=(ideal *)
omAlloc0((*len)*
sizeof(ideal));
359 Werror(
"element %d is not of type module",
i+1);
381 while ((
j<
i) && hom_complex)
383 hom_complex = hom_complex && (
w[
j]!=
NULL);
386 if ((!hom_complex) || (weights==
NULL))
407 if (typed)
return omStrDup(
"list()");
411 char** slist = (
char**)
omAlloc((
l->nr+1) *
sizeof(
char*));
414 for (
i=0,
j = 0,
k = 0;
i<=
l->nr;
i++)
419 if (*(slist[
i]) !=
'\0')
421 j += strlen(slist[
i]);
432 for (
i=0;
i<=
l->nr;
i++)
434 if (*(slist[
i]) !=
'\0')
438 if (
dim == 2) strcat(
s,
"\n");
443 if (
k > 0)
s[strlen(
s) - (
dim == 2 ? 2 : 1)] =
'\0';
444 if (typed) strcat(
s,
")");
void atSet(idhdl root, char *name, void *data, int typ)
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
static int si_max(const int a, const int b)
const CanonicalForm CFMap CFMap & N
Class used for (list of) interpreter objects.
void CleanUp(ring r=currRing)
INLINE_THIS void Init(int l=0)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
const char * Tok2Cmdname(int tok)
#define idDelete(H)
delete an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
ideal idFreeModule(int i)
static BOOLEAN length(leftv result, leftv arg)
intvec * ivCopy(const intvec *o)
char * lString(lists l, BOOLEAN typed, int dim)
BOOLEAN lDelete(leftv res, leftv u, leftv v)
BOOLEAN lRingDependend(lists L)
BOOLEAN lAdd(leftv res, leftv u, leftv v)
lists lInsert0(lists ul, leftv v, int pos)
BOOLEAN lDeleteIV(leftv res, leftv u, leftv v)
BOOLEAN lAppend(leftv res, leftv u, leftv v)
BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w)
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights)
BOOLEAN lInsert(leftv res, leftv u, leftv v)
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
#define omFreeSize(addr, size)
#define omCheckAddr(addr)
#define omReallocSize(addr, o_size, size)
#define omFreeBin(addr, bin)
#define omGetSpecBin(size)
void pEnlargeSet(poly **p, int l, int increment)
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)
void Werror(const char *fmt,...)
ideal idInit(int idsize, int rank)
initialise an ideal / module
ideal id_FreeModule(int i, const ring r)
the free module of rank i
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size