signature.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
-- 2003-05-26 Kouji KODAMA first version


class SIGNATURE

class SIGNATURE is -- Signature of knot. mark_braid(braid:BRAID,out gn:CARD, out gen_s,out gen_e:ARRAY{CARD}) is -- mark start/end of generator in H1(Seifert surface) to braid word gn:=0; gen_s:=#(braid.size); gen_s.to_val(0); gen_e:=#(braid.size); gen_e.to_val(0); loop string::=1.upto!(braid.index-1); g1::=0; last_pos:CARD:=0; -- (# of generator on current string)/ where is the last one. loop i::=braid.w.ind!; if string=braid[i].abs.card then if g1.is_pos then gen_e[i]:=gn+g1; end; g1:=g1+1; gen_s[i]:=gn+g1; last_pos:=i; end; end; if g1.is_pos then g1:=g1-1; gen_s[last_pos]:=0; gn:=gn+g1; end; end; end; SeifertMatrix(braid:BRAID):MAT_INTI is gen_s,gen_e:ARRAY{CARD}; gn:CARD; -- #of generator of H1(Seifert surface). mark_braid(braid, out gn, out gen_s, out gen_e); V:MAT_INTI:=#(gn,gn); V.clear; loop g::=1.upto!(gn); i1:CARD:=gen_s.index_of(g); i2:CARD:=gen_e.index_of(g); if braid[i1].is_pos then V[g-1,g-1]:=V[g-1,g-1]-1.inti; end; if gen_e[i1].is_pos and braid[i1].is_pos then V[g-1,gen_e[i1]-1]:=V[g-1,gen_e[i1]-1]+1.inti; end; loop i::=(i1+1).upto!(i2-1); if braid[i].abs=braid[i1].abs-1 then if gen_s[i].is_pos then V[g-1,gen_s[i]-1]:=V[g-1,gen_s[i]-1]+1.inti; end; if gen_e[i].is_pos then V[g-1,gen_e[i]-1]:=V[g-1,gen_e[i]-1]-1.inti; end; -- elsif braid[i].abs=braid[i1].abs+1 then -- Do nothing. end; end; if braid[i2].is_neg then V[g-1,g-1]:=V[g-1,g-1]+1.inti; end; if gen_s[i2].is_pos and braid[i2].is_neg then V[g-1,gen_s[i2]-1]:=V[g-1,gen_s[i2]-1]-1.inti; end; end; return V; end; Signature(TCode:TCODE):INTI is braid:BRAID; if BRAID_CNV::TCode2Braid(TCode, out braid).not then #OUT+"Failed to make braid.\n"; return 0.inti; end; V::=SeifertMatrix(braid); return (V+V.trans).signature; end; Signature(TCode:TCODE) is LOGOUT::Title("Signature=",Signature(TCode).str); #LOGOUT+"\n"; LOGOUT::flush; end; end;