1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#############################################################################
#
# Functions for the computation of the lower bound of the number of orbits
# (this is the server's part, see scscp/examples/orbits.g for the client's)
#
#############################################################################
# locally maintained list of known orbits
localorbits:=[];
# emptying the local list of known orbits
ResetOrbits:=function()
localorbits:=[];
return true;
end;
# computing new orbit for the default action
NewOrbit := function( G, pnt )
local orb;
orb := Orbit( G, pnt );
Add( localorbits, orb );
return true;
end;
# computing new orbit for the action OnRight
NewOrbitOnRight := function( G, pnt )
local orb;
orb := Orbit( G, pnt, OnRight );
Add( localorbits, orb );
return true;
end;
# checking if an element is from any of the locally stored known orbits
IsKnownElement:=function( elt )
local orb;
return ForAny( localorbits, orb -> elt in orb);
end;
# returning the number of locally stored known orbits
NumberOfStoredOrbits:=function()
return Length(localorbits);
end;
InstallSCSCPprocedure( "ResetOrbits", ResetOrbits );
InstallSCSCPprocedure( "NewOrbit", NewOrbit );
InstallSCSCPprocedure( "NewOrbitOnRight", NewOrbitOnRight );
InstallSCSCPprocedure( "IsKnownElement", IsKnownElement );
InstallSCSCPprocedure( "NumberOfStoredOrbits", NumberOfStoredOrbits );
|