fix the determinan for finite fields
This commit is contained in:
parent
3ec3b553e8
commit
72997b58d0
2
SL.jl
2
SL.jl
@ -43,6 +43,8 @@ import Base.LinAlg.det
|
|||||||
function det(M::Array{Mod,2})
|
function det(M::Array{Mod,2})
|
||||||
if size(M,1) ≠ size(M,2)
|
if size(M,1) ≠ size(M,2)
|
||||||
d = Mod(0,M[1,1].mod)
|
d = Mod(0,M[1,1].mod)
|
||||||
|
elseif size(M,1) == 1
|
||||||
|
d = M[1,1]
|
||||||
elseif size(M,1) == 2
|
elseif size(M,1) == 2
|
||||||
d = M[1,1]*M[2,2] - M[1,2]*M[2,1]
|
d = M[1,1]*M[2,2] - M[1,2]*M[2,1]
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user