My Project
Loading...
Searching...
No Matches
lists.h
Go to the documentation of this file.
1#ifndef LISTS_H
2#define LISTS_H
3/****************************************
4* Computer Algebra System SINGULAR *
5****************************************/
6/*
7* ABSTRACT: handling of the list type
8*/
9#include "omalloc/omalloc.h"
10
11#include "kernel/structs.h"
12#include "kernel/ideals.h"
13#include "Singular/subexpr.h"
14#include "Singular/tok.h"
15
16#ifdef MDEBUG
17#define INLINE_THIS
18#else
19#define INLINE_THIS inline
20#endif
21
23class slists
24{
25 public:
26 void Clean(ring r=currRing)
27 {
28 assume (this!=NULL);
29
30 if (nr>=0)
31 {
32 int i;
33 for(i=nr;i>=0;i--)
34 {
35 if (m[i].rtyp!=DEF_CMD) m[i].CleanUp(r);
36 }
37 omFreeSize((ADDRESS)m, (nr+1)*sizeof(sleftv));
38 nr=-1;
39 }
40 //omFreeSize((ADDRESS)this, sizeof(slists));
42 }
43 INLINE_THIS void Init(int l=0);
44 int nr; /* the number of elements in the list -1 */
45 /* -1: empty list */
46 sleftv *m; /* field of sleftv */
47};
48
49typedef slists * lists;
50
51int lSize(lists L);
53lists lInsert0(lists ul, leftv v, int pos);
61char* lString(lists l, BOOLEAN typed = FALSE, int dim = 1);
62
63
64lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec ** weights,int add_row_shift);
65resolvente liFindRes(lists L, int * len, int *typ0,intvec *** weights=NULL);
66
67#if ! defined(MDEBUG) || defined(LISTS_CC)
69 { nr=l-1; m=(sleftv *)((l>0) ? omAlloc0(l*sizeof(sleftv)): NULL);
70 }
71#endif
72
73#undef INLINE_THIS
74
75#endif
int BOOLEAN
Definition: auxiliary.h:87
#define FALSE
Definition: auxiliary.h:96
void * ADDRESS
Definition: auxiliary.h:119
int l
Definition: cfEzgcd.cc:100
int i
Definition: cfEzgcd.cc:132
Definition: intvec.h:23
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
void CleanUp(ring r=currRing)
Definition: subexpr.cc:348
Definition: lists.h:24
sleftv * m
Definition: lists.h:46
void Clean(ring r=currRing)
Definition: lists.h:26
INLINE_THIS void Init(int l=0)
int nr
Definition: lists.h:44
CanonicalForm res
Definition: facAbsFact.cc:60
const CanonicalForm & w
Definition: facAbsFact.cc:51
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:39
#define EXTERN_VAR
Definition: globaldefs.h:6
ideal * resolvente
Definition: ideals.h:18
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
BOOLEAN lDelete(leftv res, leftv u, leftv v)
Definition: lists.cc:161
EXTERN_VAR omBin slists_bin
Definition: lists.h:22
BOOLEAN lRingDependend(lists L)
Definition: lists.cc:222
BOOLEAN lAdd(leftv res, leftv u, leftv v)
Definition: lists.cc:51
lists lInsert0(lists ul, leftv v, int pos)
Definition: lists.cc:87
BOOLEAN lDeleteIV(leftv res, leftv u, leftv v)
Definition: lists.cc:192
BOOLEAN lAppend(leftv res, leftv u, leftv v)
Definition: lists.cc:151
BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w)
Definition: lists.cc:135
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights=NULL)
Definition: lists.cc:338
slists * lists
Definition: lists.h:49
#define INLINE_THIS
Definition: lists.h:17
char * lString(lists l, BOOLEAN typed=FALSE, int dim=1)
Definition: lists.cc:403
BOOLEAN lInsert(leftv res, leftv u, leftv v)
Definition: lists.cc:120
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
Definition: lists.cc:239
int lSize(lists L)
Definition: lists.cc:25
lists lCopy(lists L)
Definition: lists.cc:32
#define assume(x)
Definition: mod2.h:389
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
#define omAlloc0(size)
Definition: omAllocDecl.h:211
#define omFreeBin(addr, bin)
Definition: omAllocDecl.h:259
#define NULL
Definition: omList.c:12
omBin_t * omBin
Definition: omStructs.h:12
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
@ DEF_CMD
Definition: tok.h:58
int dim(ideal I, ring r)