Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
matdet(M)
|
||||
|
|
@ -0,0 +1 @@
|
|||
matperm(M)=my(n=#M,t);sum(i=1,n!,t=numtoperm(n,i);prod(j=1,n,M[j,t[j]]))
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
matperm(M)=
|
||||
{
|
||||
my(n=matsize(M)[1],innerSums=vectorv(n));
|
||||
if(n==0, return(1));
|
||||
sum(x=1,2^n-1,
|
||||
my(k=valuation(x,2),s=M[,k+1],gray=bitxor(x, x>>1));
|
||||
if(bittest(gray,k),
|
||||
innerSums += s;
|
||||
,
|
||||
innerSums -= s;
|
||||
);
|
||||
(-1)^hammingweight(gray)*factorback(innerSums)
|
||||
)*(-1)^n;
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
matpermanent(M)
|
||||
Loading…
Add table
Add a link
Reference in a new issue