-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Kernel functions for eager permutation accumulators.
Further progress, especially binding kernel functions to operations
- Loading branch information
1 parent
d1ae78f
commit 467a501
Showing
6 changed files
with
281 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
DeclareRepresentation("IsEagerPermutationAccumulatorRep", | ||
IsDataObjectRep and IsPermutationAccumulator, 2); | ||
|
||
BindGlobal("DefaultTypeEagerPermAccumulator", | ||
NewType(AccumulatorsFamily, IsMutable and IsEagerPermutationAccumulatorRep)); | ||
|
||
InstallMethod(AccumulatorCons,[IsEagerPermutationAccumulatorRep, IsPerm and IsInternalRep], | ||
function(t,p) | ||
return NEW_PERMACC(p); | ||
end); | ||
|
||
InstallMethod(ValueAccumulator, [IsEagerPermutationAccumulatorRep], | ||
VALUE_PERMACC); | ||
|
||
InstallMethod(RightMultiply, [IsEagerPermutationAccumulatorRep and IsMutable, IsPerm and IsInternalRep], | ||
RIGHT_MULTIPLY_PERMACC); | ||
|
||
InstallMethod(LeftMultiply, [IsEagerPermutationAccumulatorRep and IsMutable, IsPerm and IsInternalRep], | ||
LEFT_MULTIPLY_PERMACC); | ||
|
||
InstallMethod(RightDivide, [IsEagerPermutationAccumulatorRep and IsMutable, IsPerm and IsInternalRep], | ||
RIGHT_DIVIDE_PERMACC); | ||
|
||
InstallMethod(LeftDivide, [IsEagerPermutationAccumulatorRep and IsMutable, IsPerm and IsInternalRep], | ||
LEFT_DIVIDE_PERMACC); | ||
|
||
InstallMethod(Invert, [IsEagerPermutationAccumulatorRep and IsMutable], | ||
INVERT_PERMACC); | ||
|
||
InstallMethod(ShallowCopy, [IsEagerPermutationAccumulatorRep], | ||
SHALLOWCOPY_PERMACC); | ||
|
||
InstallMethod(OnPointsAccumulator, [IsPosInt, IsEagerPermutationAccumulatorRep, ], | ||
ONPOINTS_PERMACC); | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,3 +85,4 @@ ReadLib( "session.g" ); | |
|
||
ReadLib( "float.gd" ); | ||
ReadLib( "macfloat.g" ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters