Skip to content

Commit

Permalink
Make Permanent an attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
markuspf committed May 4, 2016
1 parent e6e6633 commit 766b8ef
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 766b8ef

Please sign in to comment.