LibraryGroups( fun 1, val 1, ... )
For each of the following group libraries there is a selection function. This function permits one to select all groups from the library that have a given set of properties.
The name of the selection functions always begins with All and always
ends with Groups. In between is a name that hints at the nature of the
group library. For example, the selection function for the library of all
primitive groups (see Transitive permutation groups) is called
AllTransitiveGroups.
These functions take an arbitrary number of pairs of arguments. The first argument in such a pair is a function that can be applied to the groups in the library, and the second argument is either a single value that this function must return in order to have this group included in the selection, or a list of such values. For example,
AllTransitiveGroups(NrMovedPoints,[10..15], Size, [1..100], IsAbelian, false );returns a list of all transitive groups with degree between 10 and 15 and size less than 100 that are not abelian.
Thus the AllTransitiveGroups behaves as if it was implemented by a
function similar to the one defined below, where TransitiveGroupsList is a
list of all primitive groups. (Note that in the definition below we assume
for simplicity that AllTransitiveGroups accepts exactly 4 arguments. It is
of course obvious how to change this definition so that the function would
accept a variable number of arguments.)
AllTransitiveGroups := function( fun1, val1, fun2, val2 )
local groups, g, i;
groups := [];
for i in [ 1 .. Length( TransitiveGroupsList ) ] do
g := TransitiveGroupsList[i];
if fun1(g) = val1 or IsList(val1) and fun1(g) in val1
and fun2(g) = val2 or IsList(val2) and fun2(g) in val2
then
Add( groups, g );
fi;
od;
return groups;
end;
Note that the real selection functions are considerably more difficult,
to improve the efficiency. Most important, each recognizes a certain set
of properties which are precomputed for the library without having to
compute them anew for each group. This will substantially speed up the
selection process.
In the description of each library we will
list the properties that are stored for this library.
LibraryGroup( fun 1, val 1, ... )
This function simply returns the first (in the stored order) group in the
library that has the prescribed properties.
It returns fail if no such group exists in the library.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual