Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
1
Task/Matrix-arithmetic/Julia/matrix-arithmetic-1.julia
Normal file
1
Task/Matrix-arithmetic/Julia/matrix-arithmetic-1.julia
Normal file
|
|
@ -0,0 +1 @@
|
|||
det(A)
|
||||
5
Task/Matrix-arithmetic/Julia/matrix-arithmetic-2.julia
Normal file
5
Task/Matrix-arithmetic/Julia/matrix-arithmetic-2.julia
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function perm(A)
|
||||
m, n = size(A)
|
||||
if m != n; throw(ArgumentError("permanent is for square matrices only")); end
|
||||
sum(σ -> prod(i -> A[i,σ[i]], 1:n), permutations(1:n))
|
||||
end
|
||||
3
Task/Matrix-arithmetic/Julia/matrix-arithmetic-3.julia
Normal file
3
Task/Matrix-arithmetic/Julia/matrix-arithmetic-3.julia
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
julia> A = [2 9 4; 7 5 3; 6 1 8]
|
||||
julia> det(A), perm(A)
|
||||
(-360.0,900)
|
||||
Loading…
Add table
Add a link
Reference in a new issue