Skip to content

Commit

Permalink
Merge pull request #777 from markuspf/permanent-attribute
Browse files Browse the repository at this point in the history
Make Permanent an attribute
  • Loading branch information
fingolfin committed May 13, 2016
2 parents 9618a90 + 766b8ef commit 16d1ba7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/combinat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ DeclareGlobalFunction("Bernoulli");
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction("Permanent");
DeclareAttribute("Permanent", IsMatrix);


#############################################################################
Expand Down
5 changes: 4 additions & 1 deletion lib/combinat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1344,7 +1344,10 @@ Permanent2 := function ( mat, m, n, r, v, i, sum )
end;
MakeReadOnlyGlobal( "Permanent2" );

InstallGlobalFunction(Permanent,function ( mat )
InstallMethod(Permanent,
"for matrices",
[ IsMatrix ],
function ( mat )
local m, n;

m := Length(mat);
Expand Down

0 comments on commit 16d1ba7

Please sign in to comment.