[BACK]Return to poly.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/poly.c between version 1.1 and 1.4

version 1.1, 1999/10/08 02:12:01 version 1.4, 2004/09/13 11:24:11
Line 1 
Line 1 
   /* $OpenXM: OpenXM/src/kan96xx/Kan/poly.c,v 1.3 2001/05/04 01:06:24 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 25  void KinitKan(void) {
Line 26  void KinitKan(void) {
   int i;    int i;
   static char *smallx[] = {"x","t"};    static char *smallx[] = {"x","t"};
   static char *smalld[] = {"h","T"};    static char *smalld[] = {"h","T"};
                            /* t  x  T  h */    /* t  x  T  h */
   static int smallOrder[] = { 1, 0, 0, 0,    static int smallOrder[] = { 1, 0, 0, 0,
                               0, 1, 0, 0,                                0, 1, 0, 0,
                               0, 0, 1, 0,                                0, 0, 1, 0,
Line 53  void KinitKan(void) {
Line 54  void KinitKan(void) {
   SmallRing.gbListTower = NULL;    SmallRing.gbListTower = NULL;
   SmallRing.outputOrder = outputOrderForSmallRing;    SmallRing.outputOrder = outputOrderForSmallRing;
   SmallRing.name = "SmallRingp";    SmallRing.name = "SmallRingp";
     SmallRing.partialEcart = 0;
   
   CurrentRingp = &SmallRing;    CurrentRingp = &SmallRing;
   initSyzRingp();    initSyzRingp();
Line 63  void KinitKan(void) {
Line 65  void KinitKan(void) {
   
 #ifndef NOGC  #ifndef NOGC
   /* initialize MPZ */    /* initialize MPZ */
    mp_set_memory_functions(sGC_malloc,sGC_realloc2,sGC_free2);    mp_set_memory_functions(sGC_malloc,sGC_realloc2,sGC_free2);
 #endif  #endif
   
   /* Msize is 8 on SUN gcc */    /* Msize is 8 on SUN gcc */
Line 96  void sGC_free2(void *p,size_t size)
Line 98  void sGC_free2(void *p,size_t size)
   
   
 MONOMIAL newMonomial(ringp)  MONOMIAL newMonomial(ringp)
 struct ring *ringp;       struct ring *ringp;
 {  {
   MONOMIAL f;    MONOMIAL f;
   extern int Msize;    extern int Msize;
Line 115  struct ring *ringp;
Line 117  struct ring *ringp;
   
   
 MONOMIAL monomialCopy(m)  MONOMIAL monomialCopy(m)
 MONOMIAL m;       MONOMIAL m;
 {  {
   extern int Msize;    extern int Msize;
   MONOMIAL f;    MONOMIAL f;
Line 152  MP_INT *newMP_INT() {
Line 154  MP_INT *newMP_INT() {
 }  }
   
 POLY newCell(c,mon)  POLY newCell(c,mon)
 struct coeff *c;       struct coeff *c;
 MONOMIAL mon;       MONOMIAL mon;
 {  {
   POLY ff;    POLY ff;
   ff = (POLY) sGC_malloc(sizeof(struct listPoly));    ff = (POLY) sGC_malloc(sizeof(struct listPoly));
Line 166  MONOMIAL mon;
Line 168  MONOMIAL mon;
   
 /* constructors */  /* constructors */
 POLY cxx(c,i,k,ringp)  POLY cxx(c,i,k,ringp)
 int c,i,k;       int c,i,k;
 struct ring *ringp;       struct ring *ringp;
 /*  c x_i^k where p is the characteristic. */       /*  c x_i^k where p is the characteristic. */
 /* New cell, monomial and coeff. */       /* New cell, monomial and coeff. */
 {  {
   POLY f;    POLY f;
   int p;    int p;
Line 198  struct ring *ringp;
Line 200  struct ring *ringp;
 }  }
   
 POLY bxx(c,i,k,ringp)  POLY bxx(c,i,k,ringp)
 MP_INT *c;       MP_INT *c;
 int i,k;       int i,k;
 struct ring *ringp;       struct ring *ringp;
 /*  c x_i^k.  c is not copied. */       /*  c x_i^k.  c is not copied. */
 {  {
 /* new cell, monomial, coeff. MP_INT c is not copied. */    /* new cell, monomial, coeff. MP_INT c is not copied. */
   POLY f;    POLY f;
   int p;    int p;
   p = ringp->p;    p = ringp->p;
Line 228  struct ring *ringp;
Line 230  struct ring *ringp;
 }  }
   
 POLY cdd(c,i,k,ringp)  POLY cdd(c,i,k,ringp)
 int c,i,k;       int c,i,k;
 struct ring *ringp;       struct ring *ringp;
 /*  c D_i^k where p is the characteristic. */       /*  c D_i^k where p is the characteristic. */
 /* New cell, monomial and coeff. */       /* New cell, monomial and coeff. */
 {  {
   POLY f;    POLY f;
   int p;    int p;
Line 262  struct ring *ringp;
Line 264  struct ring *ringp;
   
   
 POLY pCopy(f)  POLY pCopy(f)
 POLY f;       POLY f;
 {  {
   POLY node;    POLY node;
   struct listPoly nod;    struct listPoly nod;
Line 280  POLY f;
Line 282  POLY f;
 }  }
   
 POLY pcCopy(f)  POLY pcCopy(f)
 POLY f;       POLY f;
 {  {
   
   POLY node;    POLY node;
Line 301  POLY f;
Line 303  POLY f;
 }  }
   
 POLY pmCopy(f)  POLY pmCopy(f)
 POLY f;       POLY f;
 {  {
   POLY node;    POLY node;
   struct listPoly nod;    struct listPoly nod;
Line 320  POLY f;
Line 322  POLY f;
 }  }
   
 POLY pcmCopy(f)  POLY pcmCopy(f)
 POLY f;       POLY f;
 {  {
   POLY node;    POLY node;
   struct listPoly nod;    struct listPoly nod;
Line 339  POLY f;
Line 341  POLY f;
 }  }
   
 POLY head(f)  POLY head(f)
 POLY f;       POLY f;
 {  {
   if (f == ZERO) return(f);    if (f == ZERO) return(f);
   else {    else {
Line 348  POLY f;
Line 350  POLY f;
 }  }
   
 void errorPoly(str)  void errorPoly(str)
 char *str;       char *str;
 {  {
   fprintf(stderr,"Error(poly.c): %s\n",str);    fprintf(stderr,"Error(poly.c): %s\n",str);
   exit(20);    exit(20);
 }  }
   
 void warningPoly(str)  void warningPoly(str)
 char *str;       char *str;
 {  {
   fprintf(stderr,"Warning(poly.c): %s\n",str);    fprintf(stderr,"Warning(poly.c): %s\n",str);
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>