version 1.21, 2000/08/01 03:42:35 |
version 1.23, 2000/08/01 08:51:03 |
|
|
/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.20 2000/07/31 02:25:34 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.22 2000/08/01 06:26:11 takayama Exp $ */ |
#define DEBUG 1 |
#define DEBUG 1 |
Sordinary = false; |
Sordinary = false; |
/* If you run this program on openxm version 1.1.2 (FreeBSD), |
/* If you run this program on openxm version 1.1.2 (FreeBSD), |
Line 239 def SresolutionFrameWithTower(g,opt) { |
|
Line 239 def SresolutionFrameWithTower(g,opt) { |
|
} |
} |
} |
} |
} |
} |
}else{ |
} else if (IsNull(opt)){ |
|
} else { |
Println("Warning: option should be given by an array."); |
Println("Warning: option should be given by an array."); |
|
Println(opt); |
|
Println("--------------------------------------------"); |
} |
} |
} |
} |
|
|
Line 962 HelpAdd(["Sminimal", |
|
Line 965 HelpAdd(["Sminimal", |
|
def Sminimal(g,opt) { |
def Sminimal(g,opt) { |
local r, freeRes, redundantTable, reducer, maxLevel, |
local r, freeRes, redundantTable, reducer, maxLevel, |
minRes, seq, maxSeq, level, betti, q, bases, dr, |
minRes, seq, maxSeq, level, betti, q, bases, dr, |
betti_levelplus, newbases, i, j,qq, tminRes; |
betti_levelplus, newbases, i, j,qq, tminRes,bettiTable; |
if (Length(Arglist) < 2) { |
if (Length(Arglist) < 2) { |
opt = null; |
opt = null; |
} |
} |
Line 975 def Sminimal(g,opt) { |
|
Line 978 def Sminimal(g,opt) { |
|
freeRes = r[0]; |
freeRes = r[0]; |
redundantTable = r[1]; |
redundantTable = r[1]; |
reducer = r[2]; |
reducer = r[2]; |
|
bettiTable = SbettiTable(redundantTable); |
|
Println("Betti numbers are ------"); |
|
sm1_pmat(bettiTable); |
minRes = SnewArrayOfFormat(freeRes); |
minRes = SnewArrayOfFormat(freeRes); |
seq = 0; |
seq = 0; |
maxSeq = SgetMaxSeq(redundantTable); |
maxSeq = SgetMaxSeq(redundantTable); |
Line 1500 HelpAdd(["Sinit_w", |
|
Line 1506 HelpAdd(["Sinit_w", |
|
" c=Sinit_w(b,w); c:" |
" c=Sinit_w(b,w); c:" |
]]); |
]]); |
|
|
|
/* This method does not work, because we have zero rows. |
|
Think about it later. */ |
|
def SbettiTable(rtable) { |
|
local ans,i,j,pp; |
|
ans = SnewArrayOfFormat(rtable); |
|
for (i=0; i<Length(rtable); i++) { |
|
pp = 0; |
|
for (j=0; j<Length(rtable[i]); j++) { |
|
if (rtable[i,j] != 0) {pp = pp+1;} |
|
} |
|
ans[i] = pp; |
|
} |
|
return(ans); |
|
} |
|
|