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;
95 for(i=j=0;i<=ul->
nr;i++,j++)
100 for(j=ul->
nr+1;j<pos;j++)
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));
174 for(i=j=0;i<=EndIndex;i++,j++)
179 memset(&ul->
m[i],0,
sizeof(ul->
m[i]));
189 res->
data = (
char *)l;
192 Werror(
"wrong index %d in list(%d)",VIndex+1,ul->
nr+1);
205 if ((BEGIN_RING<L->
m[i].rtyp)
216 int typ0,
intvec ** weights,
int add_row_shift)
226 int oldlength=length;
227 while (r[length-1]==
NULL) length--;
228 if (reallen<=0) reallen=
currRing->N;
229 reallen=
si_max(reallen,length);
241 while ((j>0) && (r[0]->
m[j]==
NULL)) j--;
264 L->
m[
i].
data=(
void *)r[i];
265 if ((weights!=
NULL) && (weights[
i]!=
NULL))
268 (*w) += add_row_shift;
277 Warn(
"internal NULL in resolvente");
293 ideal I=(ideal)L->
m[i-1].
data;
323 r=(ideal *)
omAlloc0((*len)*
sizeof(ideal));
333 Werror(
"element %d is not of type module",i+1);
339 if ((i>0) && (
idIs0(r[i-1])))
355 while ((j<i) && hom_complex)
357 hom_complex = hom_complex && (w[
i]!=
NULL);
360 if ((!hom_complex) || (weights==
NULL))
364 if (w[j]!=
NULL)
delete w[
j];
381 if (typed)
return omStrDup(
"list()");
385 char** slist = (
char**)
omAlloc((l->
nr+1) *
sizeof(
char*));
388 for (i=0, j = 0, k = 0; i<=l->
nr; i++)
393 if (*(slist[i]) !=
'\0')
395 j += strlen(slist[i]);
399 s = (
char*)
omAlloc(j+k+2+(typed ? 10 : 0) + (dim == 2 ?
k : 0));
406 for (i=0; i<=l->
nr; i++)
408 if (*(slist[i]) !=
'\0')
412 if (dim == 2) strcat(s,
"\n");
417 if (k > 0) s[strlen(s) - (dim == 2 ? 2 : 1)] =
'\0';
418 if (typed) strcat(s,
")");
BOOLEAN lAdd(leftv res, leftv u, leftv v)
const CanonicalForm int s
ideal id_FreeModule(int i, const ring r)
the free module of rank i
void atSet(idhdl root, const char *name, void *data, int typ)
Class used for (list of) interpreter objects.
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights)
#define idDelete(H)
delete an ideal
Compatiblity layer for legacy polynomial operations (over currRing)
#define omFreeSize(addr, size)
intvec * ivCopy(const intvec *o)
BOOLEAN lDelete(leftv res, leftv u, leftv v)
void WerrorS(const char *s)
char * lString(lists l, BOOLEAN typed, int dim)
char * String(void *d=NULL, BOOLEAN typed=FALSE, int dim=1)
Called for conversion to string (used by string(..), write(..),..)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
const CanonicalForm CFMap CFMap & N
ideal idFreeModule(int i)
BOOLEAN lInsert(leftv res, leftv u, leftv v)
lists lInsert0(lists ul, leftv v, int pos)
static int si_max(const int a, const int b)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
INLINE_THIS void Init(int l=0)
#define omGetSpecBin(size)
ideal idInit(int idsize, int rank)
initialise an ideal / module
const Variable & v
< [in] a sqrfree bivariate poly
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w)
void pEnlargeSet(poly **p, int l, int increment)
const char * Tok2Cmdname(int tok)
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
BOOLEAN lAppend(leftv res, leftv u, leftv v)
void CleanUp(ring r=currRing)
#define omCheckAddr(addr)
#define omFreeBin(addr, bin)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
BOOLEAN lRingDependend(lists L)
void Werror(const char *fmt,...)