source: git/Singular/lists.h @ 63be42

spielwiese
Last change on this file since 63be42 was 6d281ac, checked in by Kai Krüger <krueger@…>, 26 years ago
grammar.y ipid.cc ipid.h iplib.cc lists.h ring.cc ring.h subexpr.cc subexpr.h tok.h * Added char *idhdl2id(idhdl pck, idhdl h) changed ggetid(const char *n, BOOLEAN local, idhdl *packhdl) Added parameter to rFindHdl() Changed rKill() for namespaces Added idhdl currRingHdl; to class namerec Added idhdl packhdl, req_packhdl to class slevftv Added inline const char * Fullname() to class slevftv Changed syMake(leftv v,char * id, idhdl packhdl) Added char *iiSleftv2name(leftv v) Added ALIAS_CMD to tok.h git-svn-id: file:///usr/local/Singular/svn/trunk@2481 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1#ifndef LISTS_H
2#define LISTS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: lists.h,v 1.5 1998-08-25 13:33:20 krueger Exp $ */
7/*
8* ABSTRACT: handling of the list type
9*/
10#include "structs.h"
11#include "mmemory.h"
12#include "subexpr.h"
13#include "ipid.h"
14#include "tok.h"
15
16class slists
17{
18  public:
19    void Clean()
20    {
21      if (this!=NULL)
22      {
23        if (nr>=0)
24        {
25          int i;
26          for(i=nr;i>=0;i--)
27          {
28            if (m[i].rtyp!=DEF_CMD) m[i].CleanUp();
29          }
30          Free((ADDRESS)m, (nr+1)*sizeof(sleftv));
31          nr=-1;
32        }
33        Free((ADDRESS)this, sizeof(slists));
34      }
35    }
36    inline void Init(int l=0)
37      { nr=l-1; m=(sleftv *)((l>0) ? Alloc0(l*sizeof(sleftv)): NULL);
38#ifdef HAVE_NAMESPACES
39        packhdl = namespaceroot->get(namespaceroot->name, 0, TRUE);
40#endif /* HAVE_NAMESPACES */
41      }
42    int    nr; /* the number of elements in the list -1 */
43               /* -1: empty list */
44#ifdef HAVE_NAMESPACES
45    idhdl packhdl;
46#endif /* HAVE_NAMESPACES */
47    sleftv  *m;  /* field of sleftv */
48};
49
50lists lCopy(lists L);
51lists lInsert0(lists ul, leftv v, int pos);
52BOOLEAN lInsert(leftv res, leftv u, leftv v);
53BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w);
54BOOLEAN lAppend(leftv res, leftv u, leftv v);
55BOOLEAN lDelete(leftv res, leftv u, leftv v);
56BOOLEAN lAdd(leftv res, leftv u, leftv v);
57BOOLEAN lRingDependend(lists L);
58
59lists liMakeResolv(resolvente r, int length, int reallen, int typ0, intvec ** weights);
60resolvente liFindRes(lists L, int * len, int *typ0,intvec *** weights=NULL);
61#endif
Note: See TracBrowser for help on using the repository browser.