homotopy.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 

class HOMOTOPY

class HOMOTOPY is -- 1-dim Homotopy group for covering space -- 1996/10 LINUX version -- 1989 FTL-Modula2 version. K Kodama. -- Copyright (C) 1989 1996 Kouji KODAMA WrGen(g,b:INT) is #LOGOUT+WORD::gstr(g,b); end; KnotR(TCode:TCODE) is #LOGOUT+"\nCrossing relation."; word:WORD; i1:INT:=0; loop while!(KNOT_GROUP::getCrossR(TCode,inout i1,out word)); loop pt::=1.upto!(REP::rcode.stack.Jn); #LOGOUT+"\n"; COV_PRIM::Relation(word,pt.int,bind(WrGen(_,_))); end; end; end; BandR(TCode:TCODE) is if ~TCode.has_band then return; end; #LOGOUT+"\nBand relation."; word:WORD; bs:INT:=0; loop while!(KNOT_GROUP::getBandR(TCode,inout bs,out word)); loop pt::=1.upto!(REP::rcode.stack.Jn); #LOGOUT+"\n"; COV_PRIM::Relation(word,pt.int,bind(WrGen(_,_))); end; end; end; Branch_NewOrbit(out orb:CARD, mark:ARRAY{BOOL}):BOOL is loop orb:=1.up!; until!((orb>REP::rcode.stack.Jn)or(mark[orb])); end; return orb<=REP::rcode.stack.Jn; end; Branch(TCode:TCODE) is #LOGOUT+"\nBranch relation."; Mer:INT; Lon:WORD; NOrbit,orb:CARD; Ncompo:INT:=TCode.number_compo; loop compo::=1.int.upto!(Ncompo); COV_PRIM::SetLongitude(TCode,compo,out Mer,out Lon); COV_PRIM::SetOrbits(compo,out NOrbit); end; loop compo::=1.int.upto!(Ncompo); mark:ARRAY{BOOL}:=#(REP::rcode.stack.Jn1); mark.to_val(true); Mer:=TCode[TCode.compoStart(compo)].gen; loop while!(Branch_NewOrbit(out orb, mark)); #LOGOUT+"\n"; loop while!(mark[orb]); mark[orb]:=false; WrGen(Mer,orb.int); orb:=REP::rcode.stack.st[Mer][orb]; end; end; end; end; BaseRelation(TCode:TCODE) is #LOGOUT+"\nBase relation."; bsFlg:ARRAY{BOOL}:=#(REP::rcode.stack.Jn1); bsFlg.to_val(false); BsCount:CARD:=1; bsFlg[BsCount]:=true; maxG::=TCode.number_gen; setF:BOOL; loop while!(BsCount<REP::rcode.stack.Jn); setF:=false; loop g::=1.upto!(maxG); loop bp::=1.upto!(REP::rcode.stack.Jn); if (bsFlg[bp] and (~bsFlg[REP::rcode.stack.st[g][bp]])) then #LOGOUT+"\n"; WrGen(g.int,bp.int); setF:=true; BsCount:=BsCount+1; bsFlg[REP::rcode.stack.st[g][bp]]:=true; end; until!(setF); end; until!(setF); end; end; end; CovHomotopy(TCode:TCODE) is #LOGOUT+"\nFundamental group of Covering: " +(TCode.number_gen*REP::rcode.stack.Jn).str+" generator.\n"; KnotR(TCode); -- crossing relation BandR(TCode); -- band relation BaseRelation(TCode); Branch(TCode); -- branch relation #LOGOUT+"\n"; LOGOUT::flush; end; end;