version 1.12, 2004/05/15 12:00:48 |
version 1.17, 2020/10/06 11:33:46 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.11 2004/05/13 06:30:51 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/order.c,v 1.16 2018/09/07 00:15:44 takayama Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
#include "extern.h" |
#include "extern.h" |
Line 173 void showRing(level,ringp) |
|
Line 175 void showRing(level,ringp) |
|
}else { |
}else { |
mtype = "unknown"; |
mtype = "unknown"; |
} |
} |
fprintf(fp,"Multiplication function --%s(%xH).\n", |
fprintf(fp,"Multiplication function --%s(%p).\n", |
mtype,(unsigned int) ringp->multiplication); |
mtype, ringp->multiplication); |
if (ringp->schreyer) { |
if (ringp->schreyer) { |
fprintf(fp,"schreyer=1, gbListTower="); |
fprintf(fp,"schreyer=1, gbListTower="); |
printObjectList((struct object *)(ringp->gbListTower)); |
printObjectList((struct object *)(ringp->gbListTower)); |
Line 196 void showRing(level,ringp) |
|
Line 198 void showRing(level,ringp) |
|
} |
} |
fprintf(fp,"--- weight vectors ---\n"); |
fprintf(fp,"--- weight vectors ---\n"); |
if (level) printOrder(ringp); |
if (level) printOrder(ringp); |
|
|
|
if (ringp->partialEcart) { |
|
fprintf(fp,"--- partialEcartGlobalVarX ---\n"); |
|
for (i=0; i<ringp->partialEcart; i++) { |
|
fprintf(fp," %4s ",TransX[ringp->partialEcartGlobalVarX[i]]); |
|
} |
|
fprintf(fp,"\n"); |
|
} |
|
|
if (ringp->next != (struct ring *)NULL) { |
if (ringp->next != (struct ring *)NULL) { |
fprintf(fp,"\n\n-------- The next ring is .... --------------\n"); |
fprintf(fp,"\n\n-------- The next ring is .... --------------\n"); |
Line 318 void printOrder(ringp) |
|
Line 328 void printOrder(ringp) |
|
|
|
struct object oGetOrderMatrix(struct ring *ringp) |
struct object oGetOrderMatrix(struct ring *ringp) |
{ |
{ |
struct object rob,ob2; |
struct object rob = OINIT; |
|
struct object ob2 = OINIT; |
int n,i,j,m; |
int n,i,j,m; |
int *om; |
int *om; |
n = ringp->n; |
n = ringp->n; |
Line 455 int mmLarger_qmatrix(ff,gg) |
|
Line 466 int mmLarger_qmatrix(ff,gg) |
|
} |
} |
|
|
/* x(N-1)>x(N-2)>....>D(N-1)>....>D(0) */ |
/* x(N-1)>x(N-2)>....>D(N-1)>....>D(0) */ |
mmLarger_pureLexicographic(f,g) |
int mmLarger_pureLexicographic(f,g) |
POLY f; |
POLY f; |
POLY g; |
POLY g; |
{ |
{ |
Line 623 int mmLarger_tower3(POLY f,POLY g,struct object *gbLis |
|
Line 634 int mmLarger_tower3(POLY f,POLY g,struct object *gbLis |
|
int n,fv,gv,t,r,nn; |
int n,fv,gv,t,r,nn; |
POLY fm; |
POLY fm; |
POLY gm; |
POLY gm; |
struct object gb; |
struct object gb = OINIT; |
|
|
if (f == POLYNULL) { |
if (f == POLYNULL) { |
if (g == POLYNULL) return(2); |
if (g == POLYNULL) return(2); |
Line 680 int mmLarger_tower3(POLY f,POLY g,struct object *gbLis |
|
Line 691 int mmLarger_tower3(POLY f,POLY g,struct object *gbLis |
|
|
|
static struct object auxPruneZeroRow(struct object ob) { |
static struct object auxPruneZeroRow(struct object ob) { |
int i,m,size; |
int i,m,size; |
struct object obt; |
struct object obt = OINIT; |
struct object rob; |
struct object rob = OINIT; |
m = getoaSize(ob); |
m = getoaSize(ob); |
size=0; |
size=0; |
for (i=0; i<m; i++) { |
for (i=0; i<m; i++) { |
Line 700 static struct object auxPruneZeroRow(struct object ob) |
|
Line 711 static struct object auxPruneZeroRow(struct object ob) |
|
} |
} |
static struct object oRingToOXringStructure_long(struct ring *ringp) |
static struct object oRingToOXringStructure_long(struct ring *ringp) |
{ |
{ |
struct object rob,ob2; |
struct object rob = OINIT; |
struct object obMat; |
struct object ob2 = OINIT; |
struct object obV; |
struct object obMat = OINIT; |
struct object obShift; |
struct object obV = OINIT; |
struct object obt; |
struct object obShift = OINIT; |
|
struct object obt = OINIT; |
char **TransX; char **TransD; |
char **TransX; char **TransD; |
int n,i,j,m,p,nonzero; |
int n,i,j,m,p,nonzero; |
int *om; |
int *om; |
Line 802 static int auxEffectiveVar(int idx,int n) { |
|
Line 814 static int auxEffectiveVar(int idx,int n) { |
|
*/ |
*/ |
static struct object oRingToOXringStructure_short(struct ring *ringp) |
static struct object oRingToOXringStructure_short(struct ring *ringp) |
{ |
{ |
struct object rob,ob2; |
struct object rob = OINIT; |
struct object obMat; |
struct object ob2 = OINIT; |
struct object obV; |
struct object obMat = OINIT; |
struct object obShift; |
struct object obV = OINIT; |
struct object obt; |
struct object obShift = OINIT; |
|
struct object obt = OINIT; |
char **TransX; char **TransD; |
char **TransX; char **TransD; |
int n,i,j,m,p,nonzero; |
int n,i,j,m,p,nonzero; |
int *om; |
int *om; |
Line 888 static struct object oRingToOXringStructure_short(stru |
|
Line 901 static struct object oRingToOXringStructure_short(stru |
|
} |
} |
struct object oRingToOXringStructure(struct ring *ringp) |
struct object oRingToOXringStructure(struct ring *ringp) |
{ |
{ |
struct object rob; |
struct object rob = OINIT; |
struct object tob; |
struct object tob = OINIT; |
rob = newObjectArray(2); |
rob = newObjectArray(2); |
tob = oRingToOXringStructure_short(ringp); |
tob = oRingToOXringStructure_short(ringp); |
putoa(rob,0,tob); |
putoa(rob,0,tob); |