Loading...
Searching...
No Matches
lists.h
Go to the documentation of this file.
#ifndef LISTS_H
#define LISTS_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT: handling of the list type
*/
#include "omalloc/omalloc.h"
#include "kernel/structs.h"
#include "kernel/ideals.h"
#include "Singular/subexpr.h"
#include "Singular/tok.h"
#ifdef MDEBUG
#define INLINE_THIS
#else
#define INLINE_THIS inline
#endif
EXTERN_VAR omBin slists_bin;
class slists
{
public:
void Clean(ring r=currRing)
{
assume (this!=NULL);
if (nr>=0)
{
int i;
for(i=nr;i>=0;i--)
{
if (m[i].rtyp!=DEF_CMD) m[i].CleanUp(r);
}
omFreeSize((ADDRESS)m, (nr+1)*sizeof(sleftv));
nr=-1;
}
//omFreeSize((ADDRESS)this, sizeof(slists));
omFreeBin((ADDRESS)this,slists_bin);
}
INLINE_THIS void Init(int l=0);
int nr; /* the number of elements in the list -1 */
/* -1: empty list */
sleftv *m; /* field of sleftv */
};
typedef slists * lists;
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);
#if ! defined(MDEBUG) || defined(LISTS_CC)
INLINE_THIS void slists::Init(int l)
{ nr=l-1; m=(sleftv *)((l>0) ? omAlloc0(l*sizeof(sleftv)): NULL);
}
#endif
#undef INLINE_THIS
#endif
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
FALSE
#define FALSE
Definition auxiliary.h:97
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
intvec
Definition intvec.h:24
sleftv
Class used for (list of) interpreter objects.
Definition subexpr.h:83
slists
Definition lists.h:24
slists::m
sleftv * m
Definition lists.h:46
slists::Clean
void Clean(ring r=currRing)
Definition lists.h:26
slists::Init
INLINE_THIS void Init(int l=0)
slists::nr
int nr
Definition lists.h:44
res
CanonicalForm res
Definition facAbsFact.cc:60
w
const CanonicalForm & w
Definition facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
EXTERN_VAR
#define EXTERN_VAR
Definition globaldefs.h:6
ideals.h
resolvente
ideal * resolvente
Definition ideals.h:18
length
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
slists_bin
VAR omBin slists_bin
Definition lists.cc:23
lDelete
BOOLEAN lDelete(leftv res, leftv u, leftv v)
Definition lists.cc:161
slists_bin
EXTERN_VAR omBin slists_bin
Definition lists.h:22
lRingDependend
BOOLEAN lRingDependend(lists L)
Definition lists.cc:222
lAdd
BOOLEAN lAdd(leftv res, leftv u, leftv v)
Definition lists.cc:51
lInsert0
lists lInsert0(lists ul, leftv v, int pos)
Definition lists.cc:87
lDeleteIV
BOOLEAN lDeleteIV(leftv res, leftv u, leftv v)
Definition lists.cc:192
lAppend
BOOLEAN lAppend(leftv res, leftv u, leftv v)
Definition lists.cc:151
lInsert3
BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w)
Definition lists.cc:135
liFindRes
resolvente liFindRes(lists L, int *len, int *typ0, intvec ***weights=NULL)
Definition lists.cc:344
INLINE_THIS
#define INLINE_THIS
Definition lists.h:17
lString
char * lString(lists l, BOOLEAN typed=FALSE, int dim=1)
Definition lists.cc:409
lInsert
BOOLEAN lInsert(leftv res, leftv u, leftv v)
Definition lists.cc:120
liMakeResolv
lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec **weights, int add_row_shift)
Definition lists.cc:239
lSize
int lSize(lists L)
Definition lists.cc:25
lCopy
lists lCopy(lists L)
Definition lists.cc:32
assume
#define assume(x)
Definition mod2.h:389
lists
slists * lists
Definition mpr_numeric.h:146
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259
NULL
#define NULL
Definition omList.c:12
omBin
omBin_t * omBin
Definition omStructs.h:12
omalloc.h
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
structs.h
leftv
sleftv * leftv
Definition structs.h:53
subexpr.h
tok.h
DEF_CMD
@ DEF_CMD
Definition tok.h:58
dim
int dim(ideal I, ring r)
Definition tropicalStrategy.cc:23