Skip to content

Commit a52d702

Browse files
authored
Merge pull request #8 from kamalsaleh/master
comply with CAP v2024.09-12
2 parents 5f776d0 + 1a60436 commit a52d702

6 files changed

+87
-5
lines changed

PackageInfo.g

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "MachineLearningForCAP",
1212
Subtitle := "Exploring categorical machine learning in CAP",
13-
Version := "2024.07-20",
13+
Version := "2024.09-01",
1414
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
1515
License := "GPL-2.0-or-later",
1616

@@ -70,7 +70,7 @@ Dependencies := rec(
7070
GAP := ">= 4.13.0",
7171
NeededOtherPackages := [
7272
[ "GAPDoc", ">= 1.5" ],
73-
[ "CAP", ">= 2023.12-05" ],
73+
[ "CAP", ">= 2024.09-12" ],
7474
[ "MonoidalCategories", ">= 2024.04-01" ],
7575
[ "CartesianCategories", ">= 2024.04-01" ],
7676
[ "ToolsForCategoricalTowers", ">= 2024.06-02" ],
+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# SPDX-License-Identifier: GPL-2.0-or-later
2+
# MachineLearningForCAP: Exploring categorical machine learning in CAP
3+
#
4+
# Implementations
5+
#
6+
# THIS FILE IS AUTOMATICALLY GENERATED, SEE CAP_project/CAP/gap/MethodRecordTools.gi
7+
8+
## MultiplicationForMorphisms
9+
InstallMethod( AddMultiplicationForMorphisms,
10+
[ IsCapCategory, IsFunction ],
11+
12+
function( category, func )
13+
14+
AddCapOperation( "MultiplicationForMorphisms", category, func, -1 );
15+
16+
end );
17+
18+
InstallMethod( AddMultiplicationForMorphisms,
19+
[ IsCapCategory, IsFunction, IsInt ],
20+
21+
FunctionWithNamedArguments(
22+
[
23+
[ "IsPrecompiledDerivation", false ],
24+
],
25+
function( CAP_NAMED_ARGUMENTS, category, func, weight )
26+
27+
AddCapOperation( "MultiplicationForMorphisms", category, func, weight : IsPrecompiledDerivation := CAP_NAMED_ARGUMENTS.IsPrecompiledDerivation );
28+
29+
end
30+
)
31+
);
32+
33+
## ReverseDifferential
34+
InstallMethod( AddReverseDifferential,
35+
[ IsCapCategory, IsFunction ],
36+
37+
function( category, func )
38+
39+
AddCapOperation( "ReverseDifferential", category, func, -1 );
40+
41+
end );
42+
43+
InstallMethod( AddReverseDifferential,
44+
[ IsCapCategory, IsFunction, IsInt ],
45+
46+
FunctionWithNamedArguments(
47+
[
48+
[ "IsPrecompiledDerivation", false ],
49+
],
50+
function( CAP_NAMED_ARGUMENTS, category, func, weight )
51+
52+
AddCapOperation( "ReverseDifferential", category, func, weight : IsPrecompiledDerivation := CAP_NAMED_ARGUMENTS.IsPrecompiledDerivation );
53+
54+
end
55+
)
56+
);
57+
58+
## ReverseDifferentialWithGivenObjects
59+
InstallMethod( AddReverseDifferentialWithGivenObjects,
60+
[ IsCapCategory, IsFunction ],
61+
62+
function( category, func )
63+
64+
AddCapOperation( "ReverseDifferentialWithGivenObjects", category, func, -1 );
65+
66+
end );
67+
68+
InstallMethod( AddReverseDifferentialWithGivenObjects,
69+
[ IsCapCategory, IsFunction, IsInt ],
70+
71+
FunctionWithNamedArguments(
72+
[
73+
[ "IsPrecompiledDerivation", false ],
74+
],
75+
function( CAP_NAMED_ARGUMENTS, category, func, weight )
76+
77+
AddCapOperation( "ReverseDifferentialWithGivenObjects", category, func, weight : IsPrecompiledDerivation := CAP_NAMED_ARGUMENTS.IsPrecompiledDerivation );
78+
79+
end
80+
)
81+
);

gap/MethodRecord.gi

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ MultiplicationForMorphisms := rec(
6363

6464
CAP_INTERNAL_ENHANCE_NAME_RECORD( CRDC_INTERNAL_METHOD_NAME_RECORD );
6565

66-
CAP_INTERNAL_GENERATE_DOCUMENTATION_FROM_METHOD_NAME_RECORD(
66+
CAP_INTERNAL_GENERATE_DECLARATIONS_AND_INSTALLATIONS_FROM_METHOD_NAME_RECORD(
6767
CRDC_INTERNAL_METHOD_NAME_RECORD,
6868
"MachineLearningForCAP",
69-
"MethodRecord.autogen.gd",
69+
"MethodRecord.",
7070
"operations for machine learning in CAP",
7171
"Add-methods"
7272
);

init.g

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ReadPackage( "MachineLearningForCAP", "gap/Tools.gd" );
88
ReadPackage( "MachineLearningForCAP", "gap/Expressions.gd" );
99
ReadPackage( "MachineLearningForCAP", "gap/MethodRecord.gd" );
10-
ReadPackage( "MachineLearningForCAP", "gap/MethodRecord.autogen.gd" );
10+
ReadPackage( "MachineLearningForCAP", "gap/MethodRecord.Declarations.autogen.gd" );
1111
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfSkeletalSmoothMaps.gd" );
1212
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfParametrisedMorphisms.gd" );
1313
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfLenses.gd" );

read.g

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
ReadPackage( "MachineLearningForCAP", "gap/Tools.gi");
88
ReadPackage( "MachineLearningForCAP", "gap/Expressions.gi");
99
ReadPackage( "MachineLearningForCAP", "gap/MethodRecord.gi");
10+
ReadPackage( "MachineLearningForCAP", "gap/MethodRecord.Installations.autogen.gi");
1011
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfSkeletalSmoothMaps.gi");
1112
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfParametrisedMorphisms.gi" );
1213
ReadPackage( "MachineLearningForCAP", "gap/CategoryOfLenses.gi" );

0 commit comments

Comments
 (0)