version 1.5, 2003/07/17 09:10:54 |
version 1.7, 2005/07/03 11:08:54 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/redm.c,v 1.4 2003/07/10 08:20:05 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/redm.c,v 1.6 2003/08/24 05:19:43 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "extern2.h" |
#include "extern2.h" |
#include "gradedset.h" |
#include "gradedset.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; |
|
|
r = 0; |
r = 0; |
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); |
} |
} |