Go to the source code of this file.
|
int | lSize (lists L) |
|
lists | lCopy (lists L) |
|
lists | lInsert0 (lists ul, leftv v, int pos) |
|
BOOLEAN | lInsert (leftv res, leftv u, leftv v) |
|
BOOLEAN | lInsert3 (leftv res, leftv u, leftv v, leftv w) |
|
BOOLEAN | lAppend (leftv res, leftv u, leftv v) |
|
BOOLEAN | lDelete (leftv res, leftv u, leftv v) |
|
BOOLEAN | lDeleteIV (leftv res, leftv u, leftv v) |
|
BOOLEAN | lAdd (leftv res, leftv u, leftv v) |
|
BOOLEAN | lRingDependend (lists L) |
|
char * | lString (lists l, BOOLEAN typed=FALSE, int dim=1) |
|
lists | liMakeResolv (resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift) |
|
resolvente | liFindRes (lists L, int *len, int *typ0, intvec ***weights=NULL) |
|
◆ INLINE_THIS
◆ lists
◆ lAdd()
Definition at line 51 of file lists.cc.
52{
56 l->Init(ul->
nr+vl->
nr+2);
58
59 for(
i=0;
i<=ul->
nr;
i++)
60 {
61
64 }
65 for(
i=0;
i<=vl->
nr;
i++)
66 {
67
70 }
77 memset(u,0,sizeof(*u));
78 memset(
v,0,
sizeof(*
v));
79 res->data = (
char *)
l;
80
82}
Class used for (list of) interpreter objects.
const Variable & v
< [in] a sqrfree bivariate poly
#define omFreeSize(addr, size)
#define omFreeBin(addr, bin)
◆ lAppend()
Definition at line 151 of file lists.cc.
152{
156}
lists lInsert0(lists ul, leftv v, int pos)
◆ lCopy()
Definition at line 32 of file lists.cc.
33{
36 if (n>=0)
38 else
40 for(;n>=0;n--)
41 {
42 N->m[n].Copy(&L->
m[n]);
43 }
44
46}
const CanonicalForm CFMap CFMap & N
◆ lDelete()
Definition at line 161 of file lists.cc.
162{
164 int VIndex=(int)(
long)
v->Data()-1;
165 int EndIndex=
lSize(ul);
166
167 if((0<=VIndex)&&(VIndex<=ul->nr))
168 {
172 l->
Init(EndIndex+(VIndex>EndIndex));
173
175 for(
i=0;
i<VIndex;
i++)
176 {
178 }
179 for(
i=VIndex+1;
i<=ul->
nr;
i++)
180 {
182 }
185 res->data = (
char *)
l;
187 }
188 Werror(
"wrong index %d in list(%d)",VIndex+1,ul->
nr+1);
190}
void CleanUp(ring r=currRing)
INLINE_THIS void Init(int l=0)
void Werror(const char *fmt,...)
◆ lDeleteIV()
Definition at line 192 of file lists.cc.
193{
197 cnt=0;
199 {
201 if ((
j>0)&&(
j<=ul->
nr))
202 {
203 cnt++;
205 memcpy(&(ul->
m[
j-1]),&(ul->
m[
j]),(ul->
nr-
j+1)*
sizeof(
sleftv));
208 }
209 }
210 if ((cnt*2>=ul->
nr)||(cnt*
sizeof(
sleftv)>=1024))
211 {
214 }
215 res->data = (
char *)ul;
217}
#define omReallocSize(addr, o_size, size)
◆ liFindRes()
Definition at line 338 of file lists.cc.
339{
342
344 if (*len<=0)
345 {
348 }
349 r=(ideal *)
omAlloc0((*len)*
sizeof(ideal));
354 {
356 {
358 {
359 Werror(
"element %d is not of type module",
i+1);
362 }
364 }
366 {
367
368 break;
369 }
373 {
375 }
378 }
381 while ((
j<
i) && hom_complex)
382 {
383 hom_complex = hom_complex && (
w[
j]!=
NULL);
385 }
386 if ((!hom_complex) || (weights==
NULL))
387 {
389 {
391 }
394 }
395 else
396 {
398 }
399
400 return r;
401}
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
void WerrorS(const char *s)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
intvec * ivCopy(const intvec *o)
◆ liMakeResolv()
lists liMakeResolv |
( |
resolvente | r, |
|
|
int | length, |
|
|
int | reallen, |
|
|
int | typ0, |
|
|
intvec ** | weights, |
|
|
int | add_row_shift ) |
Definition at line 239 of file lists.cc.
241{
242
245 {
246
248 }
249 else
250 {
253 if (reallen<=0) reallen=
currRing->N;
257
259 {
261 {
263 {
266 while ((
j>0) && (r[0]->
m[
j]==
NULL))
j--;
269 {
272 }
273 }
274 else
275 {
279 {
282 }
283 else
284 {
286 }
288 }
290 if ((weights!=
NULL) && (weights[
i]!=
NULL))
291 {
293 (*w) += add_row_shift;
296 }
297 }
298 #ifdef TEST
299 else
300 {
301
302 WarnS(
"internal NULL in resolvente");
304 }
305 #endif
307 }
311 {
315 }
317 {
319 ideal I=(ideal)L->
m[
i-1].
data;
320 ideal J;
323 {
325 }
326 else
327 {
329 }
332 }
333
334 }
335 return L;
336}
void atSet(idhdl root, char *name, void *data, int typ)
static int si_max(const int a, const int b)
#define idDelete(H)
delete an ideal
ideal idFreeModule(int i)
static BOOLEAN length(leftv result, leftv arg)
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 ...
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
◆ lInsert()
Definition at line 120 of file lists.cc.
121{
125 {
128 }
130}
const char * Tok2Cmdname(int tok)
◆ lInsert0()
Definition at line 87 of file lists.cc.
88{
89 if ((pos<0)||(
v->rtyp==
NONE))
94
96 {
99 }
100 for(
j=ul->
nr+1;
j<pos;
j++)
102
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();
108 {
109 l->m[pos].attribute=(*a)->Copy();
110 }
115}
◆ lInsert3()
Definition at line 135 of file lists.cc.
136{
140 {
141 Werror(
"cannot insert type `%s` at pos. %d",
144 }
146}
◆ lRingDependend()
Definition at line 222 of file lists.cc.
223{
227 {
235 }
237}
BOOLEAN lRingDependend(lists L)
◆ lSize()
◆ lString()
Definition at line 403 of file lists.cc.
404{
406 {
407 if (typed)
return omStrDup(
"list()");
409 }
410
411 char** slist = (
char**)
omAlloc((
l->nr+1) *
sizeof(
char*));
414 for (
i=0,
j = 0,
k = 0;
i<=
l->nr;
i++)
415 {
419 if (*(slist[
i]) !=
'\0')
420 {
421 j += strlen(slist[
i]);
423 }
424 }
425 size_t len=
j+
k+2+(typed ? 10 : 0) + (
dim == 2 ?
k : 0);
427
428 if (typed)
429 snprintf(
s, len,
"list(");
430 else
432
433 for (
i=0;
i<=
l->nr;
i++)
434 {
435 if (*(slist[
i]) !=
'\0')
436 {
439 if (
dim == 2) strcat(
s,
"\n");
440 }
443 }
444 if (
k > 0)
s[strlen(
s) - (
dim == 2 ? 2 : 1)] =
'\0';
445 if (typed) strcat(
s,
")");
449}
const CanonicalForm int s
#define omCheckAddr(addr)
◆ slists_bin