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

Diff for /OpenXM/src/kan96xx/Kan/gradedset.c between version 1.3 and 1.4

version 1.3, 2001/05/04 01:06:23 version 1.4, 2003/07/17 07:33:03
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/gradedset.c,v 1.2 2000/01/16 07:55:38 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/gradedset.c,v 1.3 2001/05/04 01:06:23 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "extern2.h"  #include "extern2.h"
Line 14  struct polySet *newPolySet(n)
Line 14  struct polySet *newPolySet(n)
   int i;    int i;
   g = (struct polySet *)sGC_malloc(sizeof(struct polySet));    g = (struct polySet *)sGC_malloc(sizeof(struct polySet));
   g->g = (POLY *)sGC_malloc(sizeof(POLY)*(n+1));    g->g = (POLY *)sGC_malloc(sizeof(POLY)*(n+1));
     g->gh = (POLY *)sGC_malloc(sizeof(POLY)*(n+1));
   g->del = (int *)sGC_malloc(sizeof(int)*(n+1));    g->del = (int *)sGC_malloc(sizeof(int)*(n+1));
   g->syz = (struct syz0 **)sGC_malloc(sizeof(struct syz0 *)*(n+1));    g->syz = (struct syz0 **)sGC_malloc(sizeof(struct syz0 *)*(n+1));
   g->mark = (int *)sGC_malloc(sizeof(int)*(n+1));    g->mark = (int *)sGC_malloc(sizeof(int)*(n+1));
   g->serial = (int *)sGC_malloc(sizeof(int)*(n+1));    g->serial = (int *)sGC_malloc(sizeof(int)*(n+1));
   if (g->g == (POLY *)NULL || g->del == (int *)NULL ||    if (g->g == (POLY *)NULL || g->del == (int *)NULL ||
         g->gh == (POLY *)NULL ||
       g->syz == (struct syz0 **)NULL || g->mark == (int *)NULL ||        g->syz == (struct syz0 **)NULL || g->mark == (int *)NULL ||
       g->serial == (int *)NULL) {        g->serial == (int *)NULL) {
     errorGradedSet("No more memory.");      errorGradedSet("No more memory.");
Line 254  struct gradedPolySet *putPolyInG(g,fi,grade,index,syz,
Line 256  struct gradedPolySet *putPolyInG(g,fi,grade,index,syz,
     polysNew = newPolySet(index*2+1);      polysNew = newPolySet(index*2+1);
     for (i=0; i<g->polys[grade]->lim; i++) {      for (i=0; i<g->polys[grade]->lim; i++) {
       polysNew->g[i] = g->polys[grade]->g[i];        polysNew->g[i] = g->polys[grade]->g[i];
         polysNew->gh[i] = g->polys[grade]->gh[i];
       polysNew->del[i] = g->polys[grade]->del[i];        polysNew->del[i] = g->polys[grade]->del[i];
       polysNew->syz[i] = g->polys[grade]->syz[i];        polysNew->syz[i] = g->polys[grade]->syz[i];
       polysNew->mark[i] = g->polys[grade]->mark[i];        polysNew->mark[i] = g->polys[grade]->mark[i];
Line 265  struct gradedPolySet *putPolyInG(g,fi,grade,index,syz,
Line 268  struct gradedPolySet *putPolyInG(g,fi,grade,index,syz,
   
   g->polys[grade]->size = index+1;    g->polys[grade]->size = index+1;
   g->polys[grade]->g[index] = fi;    g->polys[grade]->g[index] = fi;
     g->polys[grade]->gh[index] = POLYNULL;
   g->polys[grade]->del[index] = 0;    g->polys[grade]->del[index] = 0;
   g->polys[grade]->syz[index] = syz;    g->polys[grade]->syz[index] = syz;
   g->polys[grade]->mark[index] = mark;    g->polys[grade]->mark[index] = mark;
Line 357  void outputGradedPolySet(grG,needSyz)
Line 361  void outputGradedPolySet(grG,needSyz)
 {  {
   int i,j;    int i,j;
   struct polySet *set;    struct polySet *set;
     extern Ecart;
   printf("======== gradedPolySet ==========\n");    printf("======== gradedPolySet ==========\n");
   printf("maxGrade=%d\n",grG->maxGrade);    printf("maxGrade=%d\n",grG->maxGrade);
   for (i=0; i<grG->maxGrade; i++) {    for (i=0; i<grG->maxGrade; i++) {
Line 364  void outputGradedPolySet(grG,needSyz)
Line 369  void outputGradedPolySet(grG,needSyz)
     printf("grade=%d, size=%d\n",i,set->size);      printf("grade=%d, size=%d\n",i,set->size);
     for (j=0; j<set->size; j++) {      for (j=0; j<set->size; j++) {
       printf("j=%d, del=%d, g=%s\n",j,set->del[j],POLYToString(set->g[j],'*',1));        printf("j=%d, del=%d, g=%s\n",j,set->del[j],POLYToString(set->g[j],'*',1));
             if (Ecart) printf("     gh=%s\n",POLYToString(set->gh[j],'*',1));
       if (needSyz) {        if (needSyz) {
         printf("mark=%d,serial=%d, syz.cf=%s, syz.syz=%s\n",set->mark[j],          printf("mark=%d,serial=%d, syz.cf=%s, syz.syz=%s\n",set->mark[j],
                set->serial[j],POLYToString(set->syz[j]->cf,'*',1),                 set->serial[j],POLYToString(set->syz[j]->cf,'*',1),

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

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