version 1.1, 1999/10/08 02:12:02 |
version 1.4, 2000/06/26 11:15:04 |
|
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/resol.c,v 1.3 2000/05/24 15:31:29 takayama Exp $ */ |
/* resol.c */ |
/* resol.c */ |
#include <stdio.h> |
#include <stdio.h> |
#include "datatype.h" |
#include "datatype.h" |
Line 11 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
Line 12 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
static struct arrayOfMonomialSyz putMonomialSyz(struct arrayOfMonomialSyz a, |
static struct arrayOfMonomialSyz putMonomialSyz(struct arrayOfMonomialSyz a, |
struct monomialSyz *s); |
struct monomialSyz *s); |
|
|
|
static int RemoveRedundantInSchreyerSkelton = 1; |
|
|
struct monomialSyz *newMonomialSyz(void) |
struct monomialSyz *newMonomialSyz(void) |
{ |
{ |
struct monomialSyz *s; |
struct monomialSyz *s; |
Line 49 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
Line 52 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
struct monomialSyz *s; |
struct monomialSyz *s; |
struct spValue sv; |
struct spValue sv; |
struct arrayOfMonomialSyz ans; |
struct arrayOfMonomialSyz ans; |
|
extern int RemoveRedundantInSchreyerSkelton; |
|
/* It was 1. */ |
|
|
m = g.n; |
m = g.n; |
if (m > s_ij_size) { |
if (m > s_ij_size) { |
Line 64 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
Line 69 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
s->deleted = 0; |
s->deleted = 0; |
sv = (*sp)((g.array)[i],(g.array)[j]); |
sv = (*sp)((g.array)[i],(g.array)[j]); |
s->a = sv.a; s->b = sv.b; |
s->a = sv.a; s->b = sv.b; |
|
/* If isConstant(sv.a) is added, (x^3 - y^2 z^2) deRham stops |
|
with an error. I've not yet understood the reason. |
|
At Posthouse at Heathrow. June 24, 2000 */ |
|
if (isConstant(sv.b)) { |
|
s->deleted = 1; |
|
} |
}else{ |
}else{ |
s->deleted = 1; |
s->deleted = 1; |
} |
} |
} |
} |
shellForMonomialSyz(s_ij,m-i-1); |
shellForMonomialSyz(s_ij,m-i-1); |
for (j=0; j<m-i-1;j++) { |
if (RemoveRedundantInSchreyerSkelton) { |
|
for (j=0; j<m-i-1;j++) { |
s = s_ij[j]; |
s = s_ij[j]; |
if (s->deleted != 1) { |
if (s->deleted != 1) { |
for (k=j+1; k<m-i-1; k++) { |
for (k=j+1; k<m-i-1; k++) { |
if (s_ij[k]->deleted != 1) { |
if (s_ij[k]->deleted != 1) { |
if ((*isReducible)(s_ij[k]->a,s->a)) s_ij[k]->deleted = 1; |
if ((*isReducible)(s_ij[k]->a,s->a)) s_ij[k]->deleted = 1; |
} |
} |
} |
} |
} |
} |
|
} |
} |
} |
ans.size = m-i-1; |
ans.size = m-i-1; |
ans.limit = s_ij_size; |
ans.limit = s_ij_size; |
Line 112 struct arrayOfMonomialSyz schreyerSkelton(struct array |
|
Line 125 struct arrayOfMonomialSyz schreyerSkelton(struct array |
|
ipart = schreyerSkelton0(g,i); |
ipart = schreyerSkelton0(g,i); |
for (k=0; k< ipart.size; k++) { |
for (k=0; k< ipart.size; k++) { |
if ((ipart.p)[k]->deleted != 1) { |
if ((ipart.p)[k]->deleted != 1) { |
ans = putMonomialSyz(ans,(ipart.p)[k]); |
ans = putMonomialSyz(ans,(ipart.p)[k]); |
} |
} |
} |
} |
} |
} |