[BACK]Return to minimal.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / minimal

Diff for /OpenXM/src/k097/lib/minimal/minimal.k between version 1.22 and 1.23

version 1.22, 2000/08/01 06:26:11 version 1.23, 2000/08/01 08:51:03
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.21 2000/08/01 03:42:35 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 965  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 978  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 1503  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);
   }
   

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>