version 1.4, 2003/07/10 08:20:05 |
version 1.6, 2003/08/24 05:19:43 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/redm.c,v 1.3 2001/05/04 01:06:25 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/redm.c,v 1.5 2003/07/17 09:10:54 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "extern2.h" |
#include "extern2.h" |
|
|
MONOMIAL tf; |
MONOMIAL tf; |
static int nn,mm,ll,cc,n,m,l,c; |
static int nn,mm,ll,cc,n,m,l,c; |
static struct ring *cr = (struct ring *)NULL; |
static struct ring *cr = (struct ring *)NULL; |
|
extern int *DegreeShiftD_vec; |
|
extern int DegreeShiftD_size; |
|
|
if (f ISZERO) return(-1); |
if (f ISZERO) return(-1); |
tf = f->m; |
tf = f->m; |
|
|
for (i=m; i<nn; i++) { |
for (i=m; i<nn; i++) { |
r += tf->e[i].D; |
r += tf->e[i].D; |
} |
} |
|
if (DegreeShiftD_size > 0) { |
|
if ((tf->e[n-1].x <DegreeShiftD_size) && (tf->e[n-1].x >= 0)) { |
|
r += DegreeShiftD_vec[tf->e[n-1].x]; |
|
}else{ |
|
/* warning. out of range. */ |
|
} |
|
} |
return(r); |
return(r); |
} |
} |
|
|
Line 414 int uvGrade1(POLY f,int u[],int v[],int ds[],int dssiz |
|
Line 423 int uvGrade1(POLY f,int u[],int v[],int ds[],int dssiz |
|
if ((t <dssize) && (t >= 0)) { |
if ((t <dssize) && (t >= 0)) { |
r += ds[t]; |
r += ds[t]; |
}else{ |
}else{ |
/* Warning! */ |
/* Warning! ds[t] is assumed to be zero. */ |
} |
} |
}else{ |
}else{ |
t = ei; |
t = ei; |
if ((t <dssize) && (t >= 0)) { |
if ((t <dssize) && (t >= 0)) { |
r += ds[t]; |
r += ds[t]; |
}else{ |
}else{ |
/* Warning! */ |
/* Warning! ds[t] is assumed to be zero. */ |
} |
} |
} |
} |
return(r); |
return(r); |