reptable.sa


Generated by gen_html_sa_files from ICSI. Contact gomes@icsi.berkeley.edu for details
 
-- 2002/12 SL2(p) version
-- 1996/10 LINUX version
--
--1993/12/30 checkEqG
--
--Make a table of representations.
--If checkEq is called,
--	check if cunjugate to representation in the table.
-- i.e. It return true if the representation is new upto conjugate.


class REP_TABLE{STK,ET}

class REP_TABLE{STK,ET} is attr rep_tbl:ARRAY{ARRAY{ET}}; create:SAME is res:SAME:=new; res.rep_tbl:=#; return res; end; private SetTable(stack:STK, checkTra:ARRAY{INT}, num:INT) is s::=rep_tbl.size; rep_tbl:=rep_tbl.resize(s+1); rep_tbl[s]:=#(num.min(checkTra.size)); loop i::=rep_tbl[s].ind!; rep_tbl[s][i]:=stack.st[checkTra[i]].copy; end; end; checkEqTbl(inout stack:STK, checkTra:ARRAY{INT},num, cnj_class:INT,Rback:INT):BOOL is -- true if new Rep -- cnj_class is pointer of stack. -- pd : # of Pd when GenConj failed. --if true then return true; end; eqFlg:BOOL; if rep_tbl.size=0 then SetTable(stack,checkTra,num); return true; end; stack.Fetch(checkTra[0]); stack.st[Rback]:=rep_tbl[0][0]; stack.Fetch(Rback); if ~ stack.Eq then -- start of new conjugacy class. -- Note that the first entry of the table is -- a element of the conjugacy class generated by 'setFY'. rep_tbl:=#; SetTable(stack,checkTra,num); return true; else loop r::=rep_tbl.ind!; loop i::=rep_tbl[r].ind!; stack.st[i+Rback]:=rep_tbl[r][i]; end; stack.Fetch(cnj_class); stack.InitConj; -- use InitGen or InitConj loop while!(stack.GenConj); -- use Gen or GenConj loop i::=rep_tbl[r].ind!; stack.Conjugate(checkTra[i],-stack.pt); stack.Fetch(i+Rback); eqFlg:=stack.Eq; if ~eqFlg then break!; end; end; if eqFlg then stack.GenConjDispose; return false; end; end; end; SetTable(stack,checkTra,num); return true; end; end; end;