Changeset b07ba77 in git


Ignore:
Timestamp:
Jan 15, 2010, 4:00:32 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
bf3f332d4e29104e80aaf5520f04b6d65789298a
Parents:
995a6af88b866ab378e0031cf03c0b84fb35b292
Message:
clean up structs.h, part ...

git-svn-id: file:///usr/local/Singular/svn/trunk@12437 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • kernel/clapsing.cc

    r995a6a rb07ba77  
    1717#include "numbers.h"
    1818#include "ring.h"
     19#include "ideals.h"
    1920#include "ffields.h"
    2021#include <factory.h>
  • kernel/febase.cc

    r995a6a rb07ba77  
    2727#include "dError.h"
    2828
    29 #define fePutChar(c) fputc((uchar)(c),stdout)
     29#define fePutChar(c) fputc((unsigned char)(c),stdout)
    3030/*0 implementation */
    3131
  • kernel/febase.h

    r995a6a rb07ba77  
    7878size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream);
    7979
     80enum noeof_t
     81{
     82  noeof_brace = 1,
     83  noeof_asstring,
     84  noeof_block,
     85  noeof_bracket,
     86  noeof_comment,
     87  noeof_procname,
     88  noeof_string
     89};  /* for scanner.l */
    8090
    8191extern char*  feErrors;
  • kernel/ideals.cc

    r995a6a rb07ba77  
    3232#include "prCopy.h"
    3333
    34 
    35 
     34omBin sip_sideal_bin = omGetSpecBin(sizeof(sip_sideal));
    3635
    3736/* #define WITH_OLD_MINOR */
  • kernel/ideals.h

    r995a6a rb07ba77  
    1010#include "structs.h"
    1111#include "ring.h"
     12
     13struct sip_sideal
     14{
     15  poly*  m;
     16  long rank;
     17  int nrows;
     18  int ncols;
     19  #define IDELEMS(i) ((i)->ncols)
     20};
     21
     22struct sip_smap
     23{
     24  poly *m;
     25  char *preimage;
     26  int nrows;
     27  int ncols;
     28};
     29
     30struct sideal_list;
     31typedef struct sideal_list *      ideal_list;
     32struct sideal_list
     33{
     34  ideal_list next;
     35  ideal      d;
     36#ifndef NDEBUG
     37  int nr;
     38#endif
     39};
     40
     41//typedef struct sip_sideal *        ideal;
     42//typedef struct sip_smap *          map;
     43typedef ideal *            resolvente;
     44
     45
     46extern omBin sip_sideal_bin;
    1247
    1348#ifdef PDEBUG
  • kernel/kbuckets.cc

    r995a6a rb07ba77  
    10071007// But better declare it extern than including polys.h
    10081008extern void pTakeOutComp(poly *p, Exponent_t comp, poly *q, int *lq);
    1009 void pDecrOrdTakeOutComp(poly *p, Exponent_t comp, Order_t order,
     1009void pDecrOrdTakeOutComp(poly *p, Exponent_t comp, long order,
    10101010                         poly *q, int *lq);
    10111011
     
    10461046
    10471047void kBucketDecrOrdTakeOutComp(kBucket_pt bucket,
    1048                                Exponent_t comp, Order_t order,
     1048                               Exponent_t comp, long order,
    10491049                               poly *r_p, int *l)
    10501050{
  • kernel/kbuckets.h

    r995a6a rb07ba77  
    105105//         m1 >= m2 ==> pGetOrder(m1) >= pGetOrder(m2)
    106106void kBucketDecrOrdTakeOutComp(kBucket_pt bucket,
    107                                Exponent_t comp, Order_t order,
     107                               Exponent_t comp, long order,
    108108                               poly *p, int *l);
    109109
  • kernel/maps.h

    r995a6a rb07ba77  
    99*/
    1010#include "structs.h"
    11 typedef ip_smap *          map;
     11#include "ideals.h"
    1212
    1313poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap,matrix s=NULL);
  • kernel/misc.cc

    r995a6a rb07ba77  
    4848
    4949omBin char_ptr_bin = omGetSpecBin(sizeof(char_ptr));
    50 omBin ideal_bin = omGetSpecBin(sizeof(ideal));
    5150omBin indlist_bin = omGetSpecBin(sizeof(indlist));
    5251omBin naIdeal_bin = omGetSpecBin(sizeof(naIdeal));
    5352omBin snaIdeal_bin = omGetSpecBin(sizeof(snaIdeal));
    5453omBin smprec_bin = omGetSpecBin(sizeof(smprec));
    55 omBin sip_sideal_bin = omGetSpecBin(sizeof(sip_sideal));
    56 omBin sip_smap_bin = omGetSpecBin(sizeof(sip_smap));
    5754omBin sip_sring_bin = omGetSpecBin(sizeof(sip_sring));
    5855
  • kernel/pInline2.h

    r995a6a rb07ba77  
    3838
    3939// order
    40 PINLINE2 Order_t p_GetOrder(poly p, ring r)
     40PINLINE2 long p_GetOrder(poly p, ring r)
    4141{
    4242  p_LmCheckPolyRing2(p, r);
     
    6262}
    6363
    64 PINLINE2 Order_t p_SetOrder(poly p, long o, ring r)
     64PINLINE2 long p_SetOrder(poly p, long o, ring r)
    6565{
    6666  p_LmCheckPolyRing2(p, r);
  • kernel/p_polys.cc

    r995a6a rb07ba77  
    2323#include "p_polys.h"
    2424#include "ring.h"
     25#include "ideals.h"
    2526#include "int64vec.h"
    2627#ifndef NDEBUG
  • kernel/p_polys.h

    r995a6a rb07ba77  
    6767
    6868// get Order
    69 PINLINE2 Order_t p_GetOrder(poly p, ring r);
     69PINLINE2 long p_GetOrder(poly p, ring r);
    7070// don't use this
    71 PINLINE2 Order_t p_SetOrder(poly p, long order, ring r);
     71PINLINE2 long p_SetOrder(poly p, long order, ring r);
    7272
    7373// Component
  • kernel/polys.cc

    r995a6a rb07ba77  
    575575}
    576576
    577 void pDecrOrdTakeOutComp(poly *r_p, Exponent_t comp, Order_t order,
     577void pDecrOrdTakeOutComp(poly *r_p, Exponent_t comp, long order,
    578578                         poly *r_q, int *lq)
    579579{
  • kernel/polys.h

    r995a6a rb07ba77  
    403403// ASSUME: monomial ordering is Order compatible, i.e., if m1, m2 Monoms then
    404404//         m1 >= m2 ==> pGetOrder(m1) >= pGetOrder(m2)
    405 void pDecrOrdTakeOutComp(poly *p, Exponent_t comp, Order_t order,
     405void pDecrOrdTakeOutComp(poly *p, Exponent_t comp, long order,
    406406                         poly *q, int *lq);
    407407// This is something weird -- Don't use it, unless you know what you are doing
  • kernel/ring.h

    r995a6a rb07ba77  
    1515
    1616#define SHORT_REAL_LENGTH 6 // use short reals for real <= 6 digits
     17
     18#if 0
     19enum n_coeffType
     20{
     21  n_unknown=0,
     22  n_Zp,
     23  n_Q,
     24  n_R,
     25  n_GF,
     26  n_long_R,
     27  n_Zp_a,
     28  n_Q_a,
     29  n_long_C
     30};
     31#endif
     32
     33
     34// #ifdef HAVE_PLURAL
     35#if 0
     36enum nc_type
     37{
     38  nc_error = -1, // Something's gone wrong!
     39  nc_general = 0, /* yx=q xy+... */
     40  nc_skew, /*1*/ /* yx=q xy */
     41  nc_comm, /*2*/ /* yx= xy */
     42  nc_lie,  /*3*/ /* yx=xy+... */
     43  nc_undef, /*4*/  /* for internal reasons */
     44
     45  nc_exterior /*5*/ // Exterior Algebra(SCA): yx= -xy & (!:) x^2 = 0
     46};
     47#endif
     48// #endif
     49
    1750
    1851extern ring      currRing;
  • kernel/structs.h

    r995a6a rb07ba77  
    1919
    2020/* standard types */
    21 typedef unsigned char  uchar;
    2221typedef unsigned short CARDINAL;
    2322#ifdef HAVE_RINGS
     
    3635#define ADDRESS Sy_reference
    3736#define BITSET  unsigned int
    38 
    39 /* EXPONENT_TYPE is determined by configure und defined in mod2.h */
    4037
    4138#if defined(SI_CPU_I386) || defined(SI_CPU_X86_64)
     
    7976
    8077typedef long Exponent_t;
    81 typedef long Order_t;
    8278
    8379enum tHomog
     
    8682   isHomog    = TRUE,
    8783   testHomog
    88 };
    89 enum noeof_t
    90 {
    91   noeof_brace = 1,
    92   noeof_asstring,
    93   noeof_block,
    94   noeof_bracket,
    95   noeof_comment,
    96   noeof_procname,
    97   noeof_string
    9884};
    9985
     
    152138struct n_Procs_s;
    153139struct sip_sring;
    154 struct sip_sideal;
    155140struct sip_link;
    156141struct spolynom;
     
    161146struct s_si_link_extension;
    162147
     148// forward for ideals.h:
     149struct sip_sideal;
     150struct sip_smap;
     151typedef struct sip_smap *         map;
     152typedef struct sip_sideal *       ideal;
     153
     154
    163155typedef struct  n_Procs_s  n_Procs_s;
    164156
     
    171163typedef struct _sssym      ssym;
    172164typedef struct spolyrec    polyrec;
    173 typedef struct sip_sideal  ip_sideal;
    174 typedef struct sip_smap    ip_smap;
    175165typedef struct sip_sring   ip_sring;
    176166typedef struct sip_link    ip_link;
     
    186176typedef polyrec *          poly;
    187177typedef poly *             polyset;
    188 typedef ip_sideal *        ideal;
    189 typedef ip_smap *          map;
    190 typedef struct sideal_list *      ideal_list;
    191 typedef ideal *            resolvente;
    192178typedef union uutypes      utypes;
    193179typedef ip_command *       command;
     
    304290   int     char_flag;
    305291   int     ref;
     292   n_coeffType type;
    306293   short   nChar;
    307    n_coeffType type;
    308 };
    309 
    310 extern idhdl currPackHdl;
    311 extern idhdl basePackHdl;
    312 extern package currPack;
    313 extern package basePack;
    314 #define IDROOT (currPack->idroot)
     294};
    315295
    316296/* the function pointer types */
     
    502482    // internal data for different implementations
    503483    // if dynamic => must be deallocated in destructor (nc_rKill!)
    504     union {
    505       struct {
     484    union
     485    {
     486      struct
     487      {
    506488        // treat variables from iAltVarsStart till iAltVarsEnd as alternating vars.
    507489        // these variables should have odd degree, though that will not be checked
     
    514496        ideal idSCAQuotient; // = NULL by default. // must be deleted in Kill!
    515497      } sca;
    516 
    517498    } data;
    518499
     
    556537};
    557538#endif
    558 #if 0
    559 struct nc_struct
    560 {
    561   short ref;
    562   nc_type type;
    563   ring basering; // the ring C,D,.. live in
    564   matrix C;
    565   matrix D;
    566   matrix *MT;
    567   matrix COM;
    568   int *MTsize;
    569   int IsSkewConstant; /* indicates whethere coeffs C_ij are all equal */
    570   /* effective together with nc_type=nc_skew */
    571 };
    572 #endif
    573 
    574539
    575540struct sip_sring
     
    603568  ideal      qideal; /* extension to the ring structure: qring, rInit */
    604569
    605 
    606570  int*     firstwv;
    607571
     
    643607
    644608  BOOLEAN   ComponentOrder; // ???
    645 
    646609
    647610  // what follows below here should be set by rComplete, _only_
     
    699662};
    700663
    701 struct sip_sideal
    702 {
    703   poly*  m;
    704   long rank;
    705   int nrows;
    706   int ncols;
    707   #define IDELEMS(i) ((i)->ncols)
    708 };
    709 
    710 struct sip_smap
    711 {
    712   poly *m;
    713   char *preimage;
    714   int nrows;
    715   int ncols;
    716 };
    717 
    718 struct sideal_list
    719 {
    720   ideal_list next;
    721   ideal      d;
    722 #ifndef NDEBUG
    723   int nr;
    724 #endif
    725 };
    726664#endif /* __cplusplus */
    727665
     
    890828
    891829extern struct omBin_s* char_ptr_bin;
    892 extern struct omBin_s* ideal_bin;
    893830extern struct omBin_s* indlist_bin;
    894831extern struct omBin_s* naIdeal_bin;
    895832extern struct omBin_s* snaIdeal_bin;
    896833extern struct omBin_s* smprec_bin;
    897 extern struct omBin_s* sip_sideal_bin;
    898 extern struct omBin_s* sip_smap_bin;
    899834extern struct omBin_s* sip_sring_bin;
    900835extern struct omBin_s* sleftv_bin;
  • kernel/syz.h

    r995a6a rb07ba77  
    1010#include "structs.h"
    1111#include "ring.h"
     12#include "ideals.h"
    1213
    1314// Logarithm of estimate of maximal number of new components
  • kernel/syz1.cc

    r995a6a rb07ba77  
    15161516{
    15171517  int i,j=1,k;
    1518   Order_t deg = 0;
     1518  long deg = 0;
    15191519
    15201520  PrintLn();
     
    25132513      ((idRankFreeModule(arg)>0) && (!idHomModule(arg,NULL,&(syzstr->cw)))))
    25142514  {
    2515     syzstr->minres = (resolvente)omAlloc0Bin(ideal_bin);
     2515    syzstr->minres = (resolvente)omAlloc0Bin(char_ptr_bin);
    25162516    syzstr->length = 1;
    25172517    syzstr->minres[0] = idInit(1,arg->rank);
     
    26362636      ((idRankFreeModule(arg)>0) && (!idTestHomModule(arg, NULL, syzstr->cw))))
    26372637  {
    2638     syzstr->minres = (resolvente)omAlloc0Bin(ideal_bin);
     2638    syzstr->minres = (resolvente)omAlloc0Bin(char_ptr_bin);
    26392639    syzstr->length = 1;
    26402640    syzstr->minres[0] = idInit(1,arg->rank);
Note: See TracChangeset for help on using the changeset viewer.