Skip to content

Commit 1ae3e09

Browse files
authored
Use named-arguments in the LinearClosure constructor (#1802)
1 parent ac7dd9f commit 1ae3e09

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

CAP/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 := "CAP",
1212
Subtitle := "Categories, Algorithms, Programming",
13-
Version := "2025.09-04",
13+
Version := "2025.11-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

CAP/gap/DerivedMethods.gi

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,13 +2606,15 @@ AddDerivationToCAP( BasisOfSolutionsOfHomogeneousLinearSystemInLinearCategory,
26062606

26072607
basis := List( basis, m -> PreCompose( range_cat, m, iota ) );
26082608

2609-
return
2610-
List( basis, m ->
2611-
List( [ 1 .. n ], j ->
2612-
InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( cat,
2613-
Target( left_coefficients[1][j] ),
2614-
Source( right_coefficients[1][j] ),
2615-
PreCompose( range_cat, m, ProjectionInFactorOfDirectSum( range_cat, H_B_C, j ) ) ) ) );
2609+
return List( basis, m ->
2610+
List( [ 1 .. n ], j ->
2611+
InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( cat,
2612+
Target( left_coefficients[1][j] ),
2613+
Source( right_coefficients[1][j] ),
2614+
PreCompose( range_cat, m, ProjectionInFactorOfDirectSum( range_cat, H_B_C, j ) )
2615+
)
2616+
)
2617+
);
26162618

26172619
end :
26182620
CategoryGetters := rec( range_cat := RangeCategoryOfHomomorphismStructure ),
@@ -2668,16 +2670,15 @@ AddDerivationToCAP( BasisOfSolutionsOfHomogeneousDoubleLinearSystemInLinearCateg
26682670

26692671
B := List( B, m -> PreCompose( range_cat, m, iota ) );
26702672

2671-
return
2672-
List( B, m ->
2673-
List( [ 1 .. n ], j ->
2674-
InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( cat,
2675-
Target( alpha[1][j] ),
2676-
Source( beta[1][j] ),
2677-
PreCompose( range_cat, m, ProjectionInFactorOfDirectSum( range_cat, H_B_C, j ) )
2678-
)
2679-
)
2680-
);
2673+
return List( B, m ->
2674+
List( [ 1 .. n ], j ->
2675+
InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( cat,
2676+
Target( alpha[1][j] ),
2677+
Source( beta[1][j] ),
2678+
PreCompose( range_cat, m, ProjectionInFactorOfDirectSum( range_cat, H_B_C, j ) )
2679+
)
2680+
)
2681+
);
26812682

26822683
end :
26832684
CategoryGetters := rec( range_cat := RangeCategoryOfHomomorphismStructure ),

LinearClosuresForCAP/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 := "LinearClosuresForCAP",
1212
Subtitle := "Linear closures",
13-
Version := "2025.09-01",
13+
Version := "2025.11-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

LinearClosuresForCAP/gap/LinearClosure.gi

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212

1313
##
1414
InstallGlobalFunction( LINEAR_CLOSURE_CONSTRUCTOR_USING_CategoryOfRows,
15-
function( rows, underlying_category, arg... ) ## rows = CategoryOfRows( ... )
15+
FunctionWithNamedArguments(
16+
[
17+
[ "FinalizeCategory", true ],
18+
],
19+
function( CAP_NAMED_ARGUMENTS, rows, underlying_category, arg... ) ## rows = CategoryOfRows( ... )
1620
local ring, name, category, is_finite, sorting_function, with_nf, cocycle;
1721

1822
ring := UnderlyingRing( rows );
@@ -142,11 +146,15 @@ InstallGlobalFunction( LINEAR_CLOSURE_CONSTRUCTOR_USING_CategoryOfRows,
142146

143147
INSTALL_FUNCTIONS_FOR_LINEAR_CLOSURE( rows, category );
144148

145-
Finalize( category );
149+
if CAP_NAMED_ARGUMENTS.FinalizeCategory then
150+
151+
Finalize( category );
152+
153+
fi;
146154

147155
return category;
148156

149-
end );
157+
end ) );
150158

151159
##
152160
InstallMethod( LinearClosure,

0 commit comments

Comments
 (0)