Skip to content

Commit

Permalink
Merge pull request #590 from mohamed-barakat/devel
Browse files Browse the repository at this point in the history
use NumberRows/Columns instead of NrRows/Columns
  • Loading branch information
mohamed-barakat authored Aug 23, 2023
2 parents ad38a0e + 8fd2963 commit c76e9ab
Show file tree
Hide file tree
Showing 113 changed files with 1,671 additions and 1,667 deletions.
12 changes: 6 additions & 6 deletions ExamplesForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "ExamplesForHomalg",
Subtitle := "Examples for the GAP Package homalg",
Version := "2023.07-01",
Version := "2023.08-01",
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)( ),
License := "GPL-2.0-or-later",

Expand Down Expand Up @@ -96,12 +96,12 @@ PackageDoc := rec(
Dependencies := rec(
GAP := ">= 4.12.1",
NeededOtherPackages := [
[ "MatricesForHomalg", ">= 2020.05.09" ],
[ "HomalgToCAS", ">= 2011.08.25" ],
[ "RingsForHomalg", ">= 2021.10-01" ],
[ "Modules", ">= 2020.05.09" ],
[ "MatricesForHomalg", ">= 2023.08-01" ],
[ "HomalgToCAS", ">= 2023.08-01" ],
[ "RingsForHomalg", ">= 2023.08-01" ],
[ "Modules", ">= 2023.08-01" ],
[ "homalg", ">= 2015.06.01" ],
[ "GaussForHomalg", ">=2019.09.01" ],
[ "GaussForHomalg", ">=2023.08-01" ],
[ "GAPDoc", ">= 1.1" ] ],
SuggestedOtherPackages := [ ],
ExternalConditions := []
Expand Down
4 changes: 2 additions & 2 deletions ExamplesForHomalg/examples/JordanNormalForm.g
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ m := HomalgMatrix( "[ \

d := Indeterminates( R )[1];

M := LeftPresentation( m - HomalgScalarMatrix( d, NrRows( m ) ) );
M := LeftPresentation( m - HomalgScalarMatrix( d, NumberRows( m ) ) );

n := HomalgMatrix( "[ \
3, 4, 3, \
Expand All @@ -24,5 +24,5 @@ n := HomalgMatrix( "[ \

d := Indeterminates( R )[1];

N := LeftPresentation( n - HomalgScalarMatrix( d, NrRows( n ) ) );
N := LeftPresentation( n - HomalgScalarMatrix( d, NumberRows( n ) ) );

4 changes: 2 additions & 2 deletions GaussForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "GaussForHomalg",
Subtitle := "Gauss functionality for the homalg project",
Version := "2023.02-04",
Version := "2023.08-01",
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)( ),
License := "GPL-2.0-or-later",

Expand Down Expand Up @@ -81,7 +81,7 @@ Dependencies := rec(
GAP := ">= 4.12.1",
NeededOtherPackages := [
[ "Gauss", ">= 2021.04-01" ],
[ "MatricesForHomalg", ">= 2021.04-02" ],
[ "MatricesForHomalg", ">= 2023.08-01" ],
[ "GAPDoc", ">= 1.0" ] ],
SuggestedOtherPackages := [ ],
ExternalConditions := []
Expand Down
4 changes: 2 additions & 2 deletions GaussForHomalg/doc/methods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ specifically designed for &GaussForHomalg;.
<#Include Label="KroneckerMat">
<#Include Label="DualKroneckerMat">
<#Include Label="Compose">
<#Include Label="NrRows">
<#Include Label="NrColumns">
<#Include Label="NumberRows">
<#Include Label="NumberColumns">
<#Include Label="IsZeroMatrix">
<#Include Label="IsDiagonalMatrix">
<#Include Label="ZeroRows">
Expand Down
10 changes: 5 additions & 5 deletions GaussForHomalg/gap/GaussBasic.gi
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ InstallValue( CommonHomalgTableForGaussBasic,
#this uses ReduceMat from the Gauss Package to reduce A with B
DecideZeroRows :=
function( A, B )
return HomalgMatrix( ReduceMat( MyEval( A ), MyEval( B ) ).reduced_matrix, NrRows( A ), NrColumns( A ), HomalgRing( A ) );
return HomalgMatrix( ReduceMat( MyEval( A ), MyEval( B ) ).reduced_matrix, NumberRows( A ), NumberColumns( A ), HomalgRing( A ) );
end,

## <#GAPDoc Label="DecideZeroRowsEffectively">
Expand All @@ -80,7 +80,7 @@ InstallValue( CommonHomalgTableForGaussBasic,
RMT := ReduceMatTransformation( MyEval( A ), MyEval( B ) );
SetMyEval( T, RMT.transformation );
ResetFilterObj( T, IsVoidMatrix );
return HomalgMatrix( RMT.reduced_matrix, NrRows( A ), NrColumns( A ), HomalgRing( A ) );
return HomalgMatrix( RMT.reduced_matrix, NumberRows( A ), NumberColumns( A ), HomalgRing( A ) );
end,

## <#GAPDoc Label="SyzygiesGeneratorsOfRows">
Expand All @@ -98,7 +98,7 @@ InstallValue( CommonHomalgTableForGaussBasic,
function( M )
local syz;
syz := KernelMat( MyEval( M ) ).relations;
return HomalgMatrix( syz, Nrows( syz ), NrRows( M ), HomalgRing( M ) );
return HomalgMatrix( syz, Nrows( syz ), NumberRows( M ), HomalgRing( M ) );
end,

## <#GAPDoc Label="RelativeSyzygiesGeneratorsOfRows">
Expand All @@ -116,8 +116,8 @@ InstallValue( CommonHomalgTableForGaussBasic,
RelativeSyzygiesGeneratorsOfRows :=
function( M, N )
local syz;
syz := KernelMat( MyEval( UnionOfRows( M, N ) ), [ 1 .. NrRows( M ) ] ).relations;
return HomalgMatrix( syz, Nrows( syz ), NrRows( M ), HomalgRing( M ) );
syz := KernelMat( MyEval( UnionOfRows( M, N ) ), [ 1 .. NumberRows( M ) ] ).relations;
return HomalgMatrix( syz, Nrows( syz ), NumberRows( M ), HomalgRing( M ) );
end,

)
Expand Down
10 changes: 5 additions & 5 deletions GaussForHomalg/gap/GaussFQI.gi
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,24 @@ InstallMethod( CreateHomalgTable,
## assign U:
SetMyEval( arg[2], union_of_rows( [ result.coeffs, result.relations ] ) );
ResetFilterObj( arg[2], IsVoidMatrix );
SetNrRows( arg[2], NrRows( M ) );
SetNrColumns( arg[2], NrRows( M ) );
SetNumberRows( arg[2], NumberRows( M ) );
SetNumberColumns( arg[2], NumberRows( M ) );
SetIsInvertibleMatrix( arg[2], true );
else
## compute N only:
N := EchelonMat( MyEval( M ) ).vectors;
fi;

if N = [ ] then
H := HomalgZeroMatrix( 0, NrColumns( M ), R );
H := HomalgZeroMatrix( 0, NumberColumns( M ), R );
else
H := HomalgMatrix( N, R ); ## and since this is not i.g. triangular:
fi;

SetNrColumns( H, NrColumns( M ) );
SetNumberColumns( H, NumberColumns( M ) );

if HasIsIntegralDomain( R ) and IsIntegralDomain( R ) then
SetRowRankOfMatrix( H, NrRows( H ) );
SetRowRankOfMatrix( H, NumberRows( H ) );
fi;

SetZeroRows( H, [] );
Expand Down
10 changes: 5 additions & 5 deletions GaussForHomalg/gap/GaussRationals.gi
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,23 @@ InstallMethod( CreateHomalgTable,
## assign U:
SetMyEval( arg[2], union_of_rows( [ result.coeffs, result.relations ] ) );
ResetFilterObj( arg[2], IsVoidMatrix );
SetNrRows( arg[2], NrRows( M ) );
SetNrColumns( arg[2], NrRows( M ) );
SetNumberRows( arg[2], NumberRows( M ) );
SetNumberColumns( arg[2], NumberRows( M ) );
SetIsInvertibleMatrix( arg[2], true );
else
## compute N only:
N := EchelonMat( MyEval( M ) ).vectors;
fi;

if N = [ ] then
H := HomalgZeroMatrix( 0, NrColumns( M ), R );
H := HomalgZeroMatrix( 0, NumberColumns( M ), R );
else
H := HomalgMatrix( N, R ); ## and since this is not i.g. triangular:
fi;

SetNrColumns( H, NrColumns( M ) );
SetNumberColumns( H, NumberColumns( M ) );

SetRowRankOfMatrix( H, NrRows( H ) );
SetRowRankOfMatrix( H, NumberRows( H ) );

SetIsUpperTriangularMatrix( H, true );

Expand Down
16 changes: 8 additions & 8 deletions GaussForHomalg/gap/GaussTools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ InstallValue( CommonHomalgTableForGaussTools,
local R;
R := HomalgRing( C );

return SparseZeroMatrix( NrRows( C ), NrColumns( C ), R!.ring );
return SparseZeroMatrix( NumberRows( C ), NumberColumns( C ), R!.ring );

end,
## <#GAPDoc Label="IdentityMatrix">
Expand All @@ -69,7 +69,7 @@ InstallValue( CommonHomalgTableForGaussTools,
local R;
R := HomalgRing( C );

return SparseIdentityMatrix( NrRows( C ), R!.ring );
return SparseIdentityMatrix( NumberRows( C ), R!.ring );

end,
## <#GAPDoc Label="CopyMatrix">
Expand Down Expand Up @@ -272,33 +272,33 @@ InstallValue( CommonHomalgTableForGaussTools,
return Eval( A ) * Eval( B );

end,
## <#GAPDoc Label="NrRows">
## <#GAPDoc Label="NumberRows">
## <ManSection>
## <Func Arg="C" Name="NrRows"/>
## <Func Arg="C" Name="NumberRows"/>
## <Returns>an integer</Returns>
## <Description>
## This returns the number of rows of the sparse matrix stored in the
## <C>Eval</C> attribute of the &homalg; matrix <A>C</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
NrRows :=
NumberRows :=
function( C )

return Nrows( Eval( C ) );

end,
## <#GAPDoc Label="NrColumns">
## <#GAPDoc Label="NumberColumns">
## <ManSection>
## <Func Arg="C" Name="NrColumns"/>
## <Func Arg="C" Name="NumberColumns"/>
## <Returns>an integer</Returns>
## <Description>
## This returns the number of columns of the sparse matrix stored in the
## <C>Eval</C> attribute of the &homalg; matrix <A>C</A>.
## </Description>
## </ManSection>
## <#/GAPDoc>
NrColumns :=
NumberColumns :=
function( C )

return Ncols( Eval( C ) );
Expand Down
12 changes: 6 additions & 6 deletions GradedModules/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(

PackageName := "GradedModules",
Subtitle := "A homalg based package for the Abelian category of finitely presented graded modules over computable graded rings",
Version := "2023.02-04",
Version := "2023.08-01",
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)( ),
License := "GPL-2.0-or-later",

Expand Down Expand Up @@ -144,11 +144,11 @@ Dependencies := rec(
GAP := ">= 4.12.1",
NeededOtherPackages := [
[ "ToolsForHomalg", ">= 2014.12.08" ],
[ "MatricesForHomalg", ">= 2022.02-01" ],
[ "HomalgToCAS", ">= 2011.10.05" ],
[ "RingsForHomalg", ">= 2020.04.17" ],
[ "GradedRingForHomalg", ">= 2021.03-01" ],
[ "Modules", ">= 2022.02-01" ],
[ "MatricesForHomalg", ">= 2023.08-01" ],
[ "HomalgToCAS", ">= 2023.08-01" ],
[ "RingsForHomalg", ">= 2023.08-01" ],
[ "GradedRingForHomalg", ">= 2023.08-01" ],
[ "Modules", ">= 2023.08-01" ],
[ "homalg", ">= 2022.02-01" ],
[ "GAPDoc", ">= 1.0" ] ],
SuggestedOtherPackages := [ ],
Expand Down
8 changes: 4 additions & 4 deletions GradedModules/gap/BettiTable.gi
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ InstallGlobalFunction( HomalgBettiTable,
## Objectify:
ObjectifyWithAttributes(
diagram, TheTypeBettiTable,
NrRows, nr_rows,
NrColumns, nr_cols
NumberRows, nr_rows,
NumberColumns, nr_cols
);

return diagram;
Expand Down Expand Up @@ -174,8 +174,8 @@ InstallMethod( homalgCreateDisplayString,
## read the row range upside down?
reverse := o!.reverse;

nr_rows := NrRows( o );
nr_cols := NrColumns( o );
nr_rows := NumberRows( o );
nr_cols := NumberColumns( o );

## now prepare constructing the display string

Expand Down
16 changes: 8 additions & 8 deletions GradedModules/gap/GradedModule.gi
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ InstallMethod( LeftPresentationWithDegrees,
function( mat, degrees, S )
local M;

if Length( degrees ) <> NrColumns( mat ) then
if Length( degrees ) <> NumberColumns( mat ) then
Error( "the number of degrees must coincide with the number of columns\n" );
fi;

Expand Down Expand Up @@ -819,7 +819,7 @@ InstallMethod( LeftPresentationWithDegrees,

fi;

return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NrColumns( mat ), degree * gens ), S );
return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberColumns( mat ), degree * gens ), S );

end );

Expand All @@ -830,7 +830,7 @@ InstallMethod( LeftPresentationWithDegrees,

function( mat, degree, S )

return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NrColumns( mat ), degree ), S );
return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberColumns( mat ), degree ), S );

end );

Expand Down Expand Up @@ -878,7 +878,7 @@ InstallMethod( LeftPresentationWithDegrees,

function( mat, S )

return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NrColumns( mat ), TheZeroElement( DegreeGroup( S ) ) ), S );
return LeftPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberColumns( mat ), TheZeroElement( DegreeGroup( S ) ) ), S );

end );

Expand All @@ -901,7 +901,7 @@ InstallMethod( RightPresentationWithDegrees,
function( mat, degrees, S )
local M;

if Length( degrees ) <> NrRows( mat ) then
if Length( degrees ) <> NumberRows( mat ) then
Error( "the number of degrees must coincide with the number of rows\n" );
fi;

Expand Down Expand Up @@ -946,7 +946,7 @@ InstallMethod( RightPresentationWithDegrees,

fi;

return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NrRows( mat ), degree * gens ), S );
return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberRows( mat ), degree * gens ), S );

end );

Expand All @@ -957,7 +957,7 @@ InstallMethod( RightPresentationWithDegrees,

function( mat, degree, S )

return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NrRows( mat ), degree ), S );
return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberRows( mat ), degree ), S );

end );

Expand All @@ -979,7 +979,7 @@ InstallMethod( RightPresentationWithDegrees,

function( mat, S )

return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NrRows( mat ), TheZeroElement( DegreeGroup( S ) ) ), S );
return RightPresentationWithDegrees( mat, ListWithIdenticalEntries( NumberRows( mat ), TheZeroElement( DegreeGroup( S ) ) ), S );

end );

Expand Down
Loading

0 comments on commit c76e9ab

Please sign in to comment.