version 1.1, 1999/10/08 02:12:02 |
version 1.3, 2000/05/24 15:31:29 |
|
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/resol.c,v 1.2 2000/01/16 07:55:41 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 69 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
Line 74 static struct arrayOfMonomialSyz schreyerSkelton0(stru |
|
} |
} |
} |
} |
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 119 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]); |
} |
} |
} |
} |
} |
} |