Skip to content

Commit

Permalink
Use BindGlobal instead of InstallValue (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Jan 12, 2024
1 parent dcb1e09 commit 26d0917
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion gap/cmat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ DeclareOperation( "EntryOfMatrixProduct",
# Greasing:
#############################################################################

DeclareGlobalVariable( "CVEC_SpreadTabCache" );
DeclareGlobalFunction( "CVEC_MakeSpreadTab" );
DeclareGlobalFunction( "CVEC_OptimizeGreaseHint" );

Expand Down
2 changes: 1 addition & 1 deletion gap/cmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ InstallMethod( ChooseHashFunction, "for cmats",
# Greasing:
#############################################################################

InstallValue( CVEC_SpreadTabCache, [] );
BindGlobal( "CVEC_SpreadTabCache", [] );

InstallGlobalFunction( CVEC_MakeSpreadTab, function(p,d,l,bitsperel)
# Make up the spreadtab (EXTRACT values are 2^bitsperel-adic
Expand Down
8 changes: 0 additions & 8 deletions gap/cvec.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ DeclareFilter( "IsCVecRepOverPrimeField" );
## Information about the base fields:
#############################################################################

DeclareGlobalVariable( "CVEC_q" );
DeclareGlobalVariable( "CVEC_F" );
DeclareGlobalVariable( "CVEC_lens" );
DeclareGlobalVariable( "CVEC_classes" );
DeclareGlobalVariable( "CVEC_BestGreaseTab" );

DeclareGlobalFunction( "CVEC_NewCVecClass" );
DeclareGlobalFunction( "CVEC_NewCVecClassSameField" );

Expand Down Expand Up @@ -110,8 +104,6 @@ DeclareOperation( "CVecNumber", [IsInt, IsPosInt, IsPosInt, IsPosInt] );

DeclareGlobalFunction( "CVEC_New" );

DeclareGlobalVariable( "CVEC_CharactersForDisplay" );

DeclareGlobalFunction( "CVEC_HandleScalar" );

DeclareOperation( "Memory", [IsCVecRep] );
Expand Down
12 changes: 6 additions & 6 deletions gap/cvec.gi
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ SetInfoLevel(InfoCVec,1);
#############################################################################

# A set holding all q's for which we have cvec classes:
InstallValue( CVEC_q, [] );
BindGlobal( "CVEC_q", [] );
# A list holding field infos:
InstallValue( CVEC_F, [] );
BindGlobal( "CVEC_F", [] );
# A list holding lengths of vectors existing for each q:
InstallValue( CVEC_lens, [] );
BindGlobal( "CVEC_lens", [] );
# A list holding cvec classes (which are pairs [fieldinfo,len])
InstallValue( CVEC_classes, [] );
BindGlobal( "CVEC_classes", [] );


#############################################################################
## Administration of field info and cvec class data:
#############################################################################

InstallValue( CVEC_BestGreaseTab,
BindGlobal( "CVEC_BestGreaseTab",
[ , # q=1
8, # q=2
5, # q=3
Expand Down Expand Up @@ -375,7 +375,7 @@ function(v)
return res;
end);

InstallValue( CVEC_CharactersForDisplay,
BindGlobal( "CVEC_CharactersForDisplay",
".123456789abcdefghijklmnopqrstuvwxyz" );

InstallMethod( Display, "for a cvec", [IsCVecRep],
Expand Down

0 comments on commit 26d0917

Please sign in to comment.