Dear Forum,
Alexander Konovalov wrote:
But i have tried to do this for a group from library, and the function
"String" does not work:gap> G:=SmallGroup(8,2);;
gap> String(Random(a));
Error, no method found! For debugging hints type ?Recovery from
NoMethodFound
Whenever a `No method found' error arises, this indicates that a certain
functionality has not (yet) been implemented. In this case:
In release 4.2 there is no method for `String' for elements of a pc group.
Such a method will be available in the next release. Until then, one can use
the appended method installation.
Best,
Alexander Hulpke
############################################################################# ## #M String( <IsNBitsPcWordRep> ) ## InstallMethod( String,"pcword",true, [ IsMultiplicativeElementWithInverseByPolycyclicCollector and IsNBitsPcWordRep ], 0, function( obj ) local names, word, len, i,s; names := TypeObj(obj)![PCWP_NAMES]; word := ExtRepOfObj(obj); len := Length(word) - 1; if len < 0 then return "<identity> of ..."; else s:=""; i := 1; while i < len do Append(s,names[ word[i] ]); if word[i+1] <> 1 then Add(s,'^'); Append(s, String(word[i+1]) ); fi; Add(s,'*'); i := i+2; od; Append(s,names[word[i]] ); if word[i+1] <> 1 then Add(s,'^'); Append(s,String(word[ i+1 ])); fi; fi; return s; end );
Miles-Receive-Header: reply