[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.6 and 1.9

version 1.6, 2002/09/08 10:49:50 version 1.9, 2003/08/26 12:46:05
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.5 2002/02/09 06:21:02 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.8 2003/06/26 13:00:11 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "stackm.h"  #include "stackm.h"
Line 180  void showRing(level,ringp) 
Line 180  void showRing(level,ringp) 
     printObjectList((struct object *)(ringp->gbListTower));      printObjectList((struct object *)(ringp->gbListTower));
     fprintf(fp,"\n");      fprintf(fp,"\n");
   }    }
     if (ringp->degreeShiftSize) {
       fprintf(fp,"degreeShift vector (N=%d,Size=%d)= \n[\n",ringp->degreeShiftN,ringp->degreeShiftSize);
       {
         int i,j;
         for (i=0; i<ringp->degreeShiftN; 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,"---  weight vectors ---\n");
   if (level) printOrder(ringp);    if (level) printOrder(ringp);
   
   if (ringp->next != (struct ring *)NULL) {    if (ringp->next != (struct ring *)NULL) {
Line 336  int mmLarger_matrix(ff,gg)
Line 350  int mmLarger_matrix(ff,gg)
   int in2;    int in2;
   int *from, *to;    int *from, *to;
   int omsize;    int omsize;
     int dssize;
     int dsn;
     int *degreeShiftVector;
   
   if (ff == POLYNULL ) {    if (ff == POLYNULL ) {
     if (gg == POLYNULL) return( 2 );      if (gg == POLYNULL) return( 2 );
Line 353  int mmLarger_matrix(ff,gg)
Line 370  int mmLarger_matrix(ff,gg)
   from = rp->from;    from = rp->from;
   to = rp->to;    to = rp->to;
   omsize = rp->orderMatrixSize;    omsize = rp->orderMatrixSize;
     if (dssize = rp->degreeShiftSize) {
           degreeShiftVector = rp->degreeShift;  /* Note. 2003.06.26 */
           dsn = rp->degreeShiftN;
     }
   
   flag = 1;    flag = 1;
   for (i=N-1,k=0; i>=0; i--,k++) {    for (i=N-1,k=0; i>=0; i--,k++) {
Line 369  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 < dsn)) { /* Note, 2003.06.26 */
         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)) {
           sum += degreeShiftVector[i*dssize+ (f->e[N-1].x)]
                 -degreeShiftVector[i*dssize+ (g->e[N-1].x)];
         }else{
           /*warningOrder("Size mismatch in the degree shift vector. It is ignored.");*/
         }
       }
     if (sum > 0) return(1);      if (sum > 0) return(1);
     if (sum < 0) return(0);      if (sum < 0) return(0);
   }    }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.9

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