#@if ValueOption( "no_precompiled_code" ) <> true and String({}->1-[1-1]) = "function ( ) return 1 - [ (1 - 1) ]; end"
gap> LoadPackage( "Algebroids", false );
true
gap> LoadPackage( "CompilerForCAP", ">= 2024.07-09", false );
true
gap> ReadPackageOnce( "Algebroids", "gap/CompilerLogic.gi" );
true
gap> QQ := HomalgFieldOfRationals( );;
gap> snake_quiver := RightQuiver( "q(4)[a:1->2,b:2->3,c:3->4]" );;
gap> A := PathAlgebra( QQ, snake_quiver );;
gap> SetRingFilter( A, IsQuiverAlgebra );
gap> SetRingElementFilter( A, IsQuiverAlgebraElement );
gap> ReadPackageOnce( "Algebroids", "gap/CompilerLogic.gi" );
true
gap> # only valid for the construction above
> # FIXME: IsInt should be IsRat, but specializations of types are not yet supported by CompilerForCAP
> # this might already have been added by PrecompileAdditiveClosureOfAlgebroid.g
> if not IsBound( CAP_JIT_INTERNAL_TYPE_SIGNATURES.CoefficientsOfPaths ) then CapJitAddTypeSignature( "CoefficientsOfPaths", [ IsList, IsQuiverAlgebraElement ], CapJitDataTypeOfListOf( IsInt ) ); fi;
gap> if not IsBound( CAP_JIT_INTERNAL_TYPE_SIGNATURES.HomStructureOnBasisPaths ) then
> CapJitAddTypeSignature( "HomStructureOnBasisPaths", [ IsAlgebroid ], function ( input_types )
>
> return CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf(
> CapJitDataTypeOfListOf( IsInt ) ) ) ) ) ) ) ); end ); fi;
gap> # EXPERIMENTAL
> Add( CAP_JIT_EXPENSIVE_FUNCTION_NAMES, "CoefficientsOfPaths" );
gap> precompile_AdelmanCategoryOfAdditiveClosureOfAlgebroid := function( Rq, over_Z, ring )
> CapJitPrecompileCategoryAndCompareResult(
> EvalString( ReplacedString( """Rq -> AdelmanCategory( AdditiveClosure( Algebroid(
> Rq, over_Z : FinalizeCategory := true
> ) : FinalizeCategory := true ) )""", "over_Z", String( over_Z ) ) ),
> [ Rq ],
> "Algebroids",
> Concatenation(
> "AdelmanCategoryOfAdditiveClosureOfAlgebroidOfFiniteDimensionalQuiverAlgebraOfRightQuiverOver",
> ring,
> "Precompiled"
> ) :
> operations := [
> "IsZeroForMorphisms",
> "CokernelProjection",
> "IsDominating",
> "IsEqualAsSubobjects",
> ]
> ); end;;
gap> precompile_AdelmanCategoryOfAdditiveClosureOfAlgebroid( A, false, "Field" );
gap> precompile_AdelmanCategoryOfAdditiveClosureOfAlgebroid( A, true, "Z" );
gap> AdelmanCategoryOfAdditiveClosureOfAlgebroidOfFiniteDimensionalQuiverAlgebraOfRightQuiverOverFieldPrecompiled( A );
Adelman category( AdditiveClosure( Algebroid( Q, FreeCategory(
RightQuiver( "q(4)[a:1->2,b:2->3,c:3->4]" ) ) ) ) )
gap> AdelmanCategoryOfAdditiveClosureOfAlgebroidOfFiniteDimensionalQuiverAlgebraOfRightQuiverOverZPrecompiled( A );
Adelman category( AdditiveClosure( Algebroid( Z, FreeCategory(
RightQuiver( "q(4)[a:1->2,b:2->3,c:3->4]" ) ) ) ) )
gap> AdelmanCategory( AdditiveClosure( Algebroid( A, false ) ) )!.precompiled_functions_added;
true
gap> AdelmanCategory( AdditiveClosure( Algebroid( A, true ) ) )!.precompiled_functions_added;
true
#@fi
#@if ValueOption( "no_precompiled_code" ) <> true and String({}->1-[1-1]) = "function ( ) return 1 - [ (1 - 1) ]; end"
gap> LoadPackage( "Algebroids", false );
true
gap> LoadPackage( "CompilerForCAP", ">= 2024.07-09", false );
true
gap> ReadPackageOnce( "Algebroids", "gap/CompilerLogic.gi" );
true
gap> category_constructor :=
> function( quiver )
> local sFinSets; sFinSets := SkeletalCategoryOfFiniteSets( : FinalizeCategory := true ); return CategoryFromDataTables( FreeCategory( quiver : range_of_HomStructure := sFinSets, FinalizeCategory := true ) ); end;;
gap> given_arguments := [ RightQuiver( "q(a,b)[m:a->b]" ) ];;
gap> compiled_category_name := "CategoryFromDataTablesPrecompiled";;
gap> package_name := "Algebroids";;
gap> CapJitPrecompileCategoryAndCompareResult(
> category_constructor,
> given_arguments,
> package_name,
> compiled_category_name
> : operations := "primitive" );;
gap> CategoryFromDataTablesPrecompiled( given_arguments[1] );
FreeCategory( RightQuiver( "q(a,b)[m:a->b]" ) )
gap> CategoryFromDataTables( FreeCategory( given_arguments[1] ) )!.precompiled_functions_added;
true
#@fi
generated by GAPDoc2HTML