Goto Chapter: Top 1 2 3 4 5 6 7 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

6 Precompilation
 6.1 Precompiling the skeletal category of finite left G-sets

6 Precompilation

6.1 Precompiling the skeletal category of finite left G-sets

#@if ValueOption( "no_precompiled_code" ) <> true
gap> LoadPackage( "FinGSetsForCAP", false );
true
gap> LoadPackage( "CompilerForCAP", ">= 2026.05-01", false );
true
gap> category_constructor :=
>   G -> SkeletalCategoryOfTransitiveLeftGSets(
>           GROUP_AS_CATEGORY( G : FinalizeCategory := true ) );;
gap> C2 := CyclicGroup( 2 );; StructureDescription( C2 );; C2;
C2
gap> given_arguments := [ C2 ];;
gap> compiled_category_name :=
>   "SkeletalCategoryOfTransitiveLeftGSets_precompiled";;
gap> package_name := "FinGSetsForCAP";;
gap> #primitive_operations :=
> #  ListPrimitivelyInstalledOperationsOfCategory(
> #          category_constructor( given_arguments[1]
> #          : no_precompiled_code := true ) );;
gap> list_of_operations :=
>   #SortedList( Concatenation( primitive_operations,
>           [ "SetOfObjectsOfCategory",
>             "IsEqualForObjects",
>             "IsWellDefinedForObjects",
>             "IsWellDefinedForMorphisms",
>             ];;
gap>   #) );;
gap> CapJitPrecompileCategoryAndCompareResult(
>         category_constructor,
>         given_arguments,
>         package_name,
>         compiled_category_name
>         : operations := list_of_operations,
>         number_of_objectified_objects_in_data_structure_of_object := 1,
>         number_of_objectified_morphisms_in_data_structure_of_object := 0,
>         number_of_objectified_objects_in_data_structure_of_morphism := 2,
>         number_of_objectified_morphisms_in_data_structure_of_morphism := 1
> );;
gap> SkeletalCategoryOfTransitiveLeftGSets_precompiled( C2 );
SkeletalCategoryOfTransitiveLeftGSets( C2 ) with 2 objects
gap> cat := SkeletalCategoryOfTransitiveLeftGSets( C2 );
SkeletalCategoryOfTransitiveLeftGSets( C2 ) with 2 objects
gap> cat!.precompiled_functions_added;
true
#@fi
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 Ind

generated by GAPDoc2HTML