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

Diff for /OpenXM/src/kan96xx/Kan/order.c between version 1.7 and 1.8

version 1.7, 2003/06/26 08:14:46 version 1.8, 2003/06/26 13:00:11
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.6 2002/09/08 10:49:50 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.7 2003/06/26 08:14:46 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 181  void showRing(level,ringp) 
Line 181  void showRing(level,ringp) 
     fprintf(fp,"\n");      fprintf(fp,"\n");
   }    }
   if (ringp->degreeShiftSize) {    if (ringp->degreeShiftSize) {
     fprintf(fp,"degreeShift vector = [");      fprintf(fp,"degreeShift vector (N=%d,Size=%d)= \n[\n",ringp->degreeShiftN,ringp->degreeShiftSize);
     {      {
       int i;        int i,j;
       for (i=0; i<ringp->degreeShiftSize; i++) {        for (i=0; i<ringp->degreeShiftN; i++) {
         fprintf(fp," %d ",ringp->degreeShift[i]);          fprintf(fp," [");
           for (j=0; j< ringp->degreeShiftSize; j++) {
             fprintf(fp," %d ",ringp->degreeShift[i*(ringp->degreeShiftSize)+j]);
           }
           fprintf(fp,"]\n");
       }        }
     }      }
     fprintf(fp,"]\n");      fprintf(fp,"]\n");
Line 347  int mmLarger_matrix(ff,gg)
Line 351  int mmLarger_matrix(ff,gg)
   int *from, *to;    int *from, *to;
   int omsize;    int omsize;
   int dssize;    int dssize;
     int dsn;
   int *degreeShiftVector;    int *degreeShiftVector;
   
   if (ff == POLYNULL ) {    if (ff == POLYNULL ) {
Line 367  int mmLarger_matrix(ff,gg)
Line 372  int mmLarger_matrix(ff,gg)
   omsize = rp->orderMatrixSize;    omsize = rp->orderMatrixSize;
   if (dssize = rp->degreeShiftSize) {    if (dssize = rp->degreeShiftSize) {
         degreeShiftVector = rp->degreeShift;  /* Note. 2003.06.26 */          degreeShiftVector = rp->degreeShift;  /* Note. 2003.06.26 */
           dsn = rp->degreeShiftN;
   }    }
   
   flag = 1;    flag = 1;
Line 384  int mmLarger_matrix(ff,gg)
Line 390  int mmLarger_matrix(ff,gg)
     sum = 0; in2 = i*2*N;      sum = 0; in2 = i*2*N;
     /* for (k=0; k<2*N; k++) sum += exp[k]*Order[in2+k]; */      /* for (k=0; k<2*N; k++) sum += exp[k]*Order[in2+k]; */
     for (k=from[i]; k<to[i]; k++) sum += exp[k]*Order[in2+k];      for (k=from[i]; k<to[i]; k++) sum += exp[k]*Order[in2+k];
     if (dssize && ( i == 0)) { /* Note, 2003.06.26 */      if (dssize && ( i < dsn)) { /* Note, 2003.06.26 */
       if ((f->e[N-1].x < dssize) && (f->e[N-1].x >= 0) &&        if ((f->e[N-1].x < dssize) && (f->e[N-1].x >= 0) &&
           (g->e[N-1].x < dssize) && (g->e[N-1].x >= 0)) {            (g->e[N-1].x < dssize) && (g->e[N-1].x >= 0)) {
         sum += degreeShiftVector[f->e[N-1].x]          sum += degreeShiftVector[i*dssize+ (f->e[N-1].x)]
               -degreeShiftVector[g->e[N-1].x];                -degreeShiftVector[i*dssize+ (g->e[N-1].x)];
       }else{        }else{
         warningOrder("Size mismatch in the degree shift vector. It is ignored.");          warningOrder("Size mismatch in the degree shift vector. It is ignored.");
       }        }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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