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

Diff for /OpenXM/src/kan96xx/Kan/poly3.c between version 1.4 and 1.6

version 1.4, 2002/02/04 07:58:28 version 1.6, 2002/09/08 10:49:50
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/poly3.c,v 1.3 2001/05/04 01:06:25 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/poly3.c,v 1.5 2002/02/09 06:21:02 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
 #include "extern2.h"  #include "extern2.h"
Line 98  void monomialMult_diff(e,f)
Line 98  void monomialMult_diff(e,f)
      /* (e) * f = [Plist] monomials  */       /* (e) * f = [Plist] monomials  */
 {  {
   
   int n,k,c,l,q,i,m;    int n,k,c,l,q,i,m, weightedHomogenization;
   struct coeff *a;    struct coeff *a;
   struct monomial tmp;    struct monomial tmp;
   struct ring *ringp;    struct ring *ringp;
Line 106  void monomialMult_diff(e,f)
Line 106  void monomialMult_diff(e,f)
   
   tmp.ringp = ringp = f->m->ringp;    tmp.ringp = ringp = f->m->ringp;
   n = ringp->n; c = ringp->c; l = ringp->l; m = ringp->m;    n = ringp->n; c = ringp->c; l = ringp->l; m = ringp->m;
     weightedHomogenization = ringp->weightedHomogenization;
   for (k=Plist-1; k>=0; k--) {    for (k=Plist-1; k>=0; k--) {
     /* coeff */      /* coeff */
     a = coeffCopy(CList[k]);      a = coeffCopy(CList[k]);
Line 115  void monomialMult_diff(e,f)
Line 116  void monomialMult_diff(e,f)
     for (i=0; i<n; i++) {      for (i=0; i<n; i++) {
       tmp.e[i] = f->m->e[i];        tmp.e[i] = f->m->e[i];
     }      }
     if (Homogenize) {      if ((!weightedHomogenization) && Homogenize) {
       tmp.e[0].D += EList[k]; /* homogenization.        tmp.e[0].D += EList[k]; /* homogenization.
                                  e[0].D will be added later. */                                   e[0].D will be added later. */
     }      }else if (weightedHomogenization && Homogenize) {
         tmp.e[0].D += EList[k]/2 ; /* homogenization.  Weight is (1,0) (special).
                                                                     */
           }
   
     /* from m to n:  Differential variables. */      /* from m to n:  Differential variables. */
     for (i=0; i<Maxv; i++) {      for (i=0; i<Maxv; i++) {
Line 176  void monomialMult_diff(e,f)
Line 180  void monomialMult_diff(e,f)
   
 /* Note that you cannot call mpMult_diff recursively. */  /* Note that you cannot call mpMult_diff recursively. */
 /* Note also that mpMult_diff assumes coefficients and Dx commutes each other*/  /* Note also that mpMult_diff assumes coefficients and Dx commutes each other*/
 POLY mpMult_diff_org(POLY f,POLY g)  POLY mpMult_diff(POLY f,POLY g)
 {  {
   int k;    int k;
   POLY r,temp;    POLY r,temp;
Line 214  POLY mpMult_diff_org(POLY f,POLY g)
Line 218  POLY mpMult_diff_org(POLY f,POLY g)
   return(r);    return(r);
 }  }
   
 POLY mpMult_difference(POLY f,POLY g)  POLY mpMult_difference_org(POLY f,POLY g)
 {  {
   POLY r;    POLY r;
   int m,l;    int m,l;

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

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