Skip to content

Commit 7782b37

Browse files
authored
Merge pull request #700 from zickgraf/CategoryOfColumns
Make `CategoryOfColumns` return a precompiled version of `CategoryOfColumnsAsOppositeOfCategoryOfRows`
2 parents 80716d3 + 9b4aef1 commit 7782b37

13 files changed

+815
-1179
lines changed

CompilerForCAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CompilerForCAP",
1212
Subtitle := "Speed up computations in CAP categories",
13-
Version := "2021.09-06",
13+
Version := "2021.09-07",
1414
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1515
License := "GPL-2.0-or-later",
1616

CompilerForCAP/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
<!-- END HEADER -->
1111

12-
**WARNING**: This package is still in alpha and not tested or validated extensively!
13-
1412
Using the notions of category theory initially comes with a measurable performance overhead when implementing algorithms on a computer.
1513
The main reason for this is the excessive amount of superfluous wrapping and unwrapping occurring during complex computations once we use several category constructors.
1614
As an example, consider the category

CompilerForCAP/doc/Usage.autodoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@Chapter Using the compiler
22

3-
**WARNING**: This package is still in alpha and not tested or validated extensively!
4-
53
@Section Terminology
64

75
The compiler is a just-in-time compiler, that is, it needs some arguments to infer types of variables. These arguments
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! @Chapter Examples and tests
2+
3+
#! @Section Tests
4+
5+
#! @Example
6+
7+
LoadPackage( "FreydCategoriesForCAP", false );
8+
#! true
9+
10+
QQ := HomalgFieldOfRationalsInSingular( );;
11+
QQxy := QQ * "x,y";;
12+
EEE := KoszulDualRing( QQxy );;
13+
14+
precompile_CategoryOfColumns := function( homalg_ring, name )
15+
16+
CapJitPrecompileCategoryAndCompareResult(
17+
homalg_ring -> CategoryOfColumnsAsOppositeOfCategoryOfRows(
18+
homalg_ring
19+
),
20+
[ homalg_ring ],
21+
"FreydCategoriesForCAP",
22+
Concatenation(
23+
"CategoryOfColumnsAsOppositeOfCategoryOfRowsOf",
24+
name,
25+
"Precompiled"
26+
) :
27+
operations := "primitive"
28+
); end;;
29+
30+
precompile_CategoryOfColumns( QQ, "Field" );;
31+
precompile_CategoryOfColumns( QQxy, "CommutativeRing" );;
32+
precompile_CategoryOfColumns( EEE, "ArbitraryRing" );;
33+
34+
#! @EndExample

CompilerForCAP/examples/PrecompileCategoryOfColumnsOfField.g

Lines changed: 0 additions & 27 deletions
This file was deleted.

CompilerForCAP/examples/PrecompileOppositeOfCategoryOfRowsOfField.g

Lines changed: 0 additions & 27 deletions
This file was deleted.

CompilerForCAP/tst/100_LoadPackage.tst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@ gap> package_loading_info_level := InfoLevel( InfoPackageLoading );;
77
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_ERROR );;
88
gap> LoadPackage( "CompilerForCAP", false );
99
true
10+
gap> LoadPackage( "IO_ForHomalg", false );
11+
true
1012
gap> LoadPackage( "LinearAlgebraForCAP", false );
1113
true
1214
gap> LoadPackage( "RingsForHomalg", false );
1315
true
1416
gap> SetInfoLevel( InfoPackageLoading, PACKAGE_INFO );;
1517
gap> LoadPackage( "CompilerForCAP" );
1618
true
19+
gap> LoadPackage( "IO_ForHomalg" );
20+
true
1721
gap> LoadPackage( "LinearAlgebraForCAP" );
1822
true
1923
gap> LoadPackage( "RingsForHomalg" );
2024
true
2125
gap> SetInfoLevel( InfoPackageLoading, package_loading_info_level );;
26+
gap> HOMALG_IO.show_banners := false;;

FreydCategoriesForCAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "FreydCategoriesForCAP",
1212
Subtitle := "Freyd categories - Formal (co)kernels for additive categories",
13-
Version := "2021.09-03",
13+
Version := "2021.09-04",
1414
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1515
License := "GPL-2.0-or-later",
1616

FreydCategoriesForCAP/gap/CategoryOfColumns.gd

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,3 @@ DeclareAttribute( "UnderlyingMatrix",
7171

7272
DeclareAttribute( "CATEGORY_OF_COLUMNS_ReductionBySplitEpiSummandTuple",
7373
IsCategoryOfColumnsMorphism );
74-
75-
####################################
76-
##
77-
#! @Section Global functions
78-
##
79-
####################################
80-
81-
DeclareGlobalFunction( "CATEGORY_OF_COLUMNS_SimplificationSourceAndRangeTuple" );
82-
83-
DeclareGlobalFunction( "CATEGORY_OF_COLUMNS_SimplificationSourceTuple" );
84-
85-
DeclareGlobalFunction( "CATEGORY_OF_COLUMNS_SimplificationRangeTuple" );

0 commit comments

Comments
 (0)