Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfaffian #35

Closed
wants to merge 27 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c85e929
tridiag.jl
smataigne Aug 9, 2022
4302a63
tridiag.jl
smataigne Aug 9, 2022
ebcd844
tridiag.jl
smataigne Aug 9, 2022
806c79a
fixes tridiag.jl
smataigne Aug 9, 2022
e8c081d
Merge branch 'main' into smataigne
smataigne Aug 9, 2022
15b9613
fixes tridiag.jl
smataigne Aug 9, 2022
1d6cfe0
Merge branch 'smataigne' of https://github.com/smataigne/SkewLinearAl…
smataigne Aug 9, 2022
f41d228
more fixes
smataigne Aug 9, 2022
033db54
Merge branch 'main' into smataigne
smataigne Aug 9, 2022
7ac8c84
more fixes
smataigne Aug 9, 2022
3ff0888
Merge branch 'smataigne' of https://github.com/smataigne/SkewLinearAl…
smataigne Aug 9, 2022
802a510
tridiag fixed
smataigne Aug 10, 2022
b761add
Merge branch 'main' into smataigne
smataigne Aug 10, 2022
c0edc6c
fixes tridiag
smataigne Aug 10, 2022
fc10524
Merge branch 'smataigne' of https://github.com/smataigne/SkewLinearAl…
smataigne Aug 10, 2022
4849e40
fixes tridiag
smataigne Aug 10, 2022
c89db59
fixes tridiag
smataigne Aug 10, 2022
25486d9
fixes tridiag
smataigne Aug 10, 2022
e030630
fixes tridiag
smataigne Aug 10, 2022
7005fef
complex hessenberg
smataigne Aug 10, 2022
03ac56f
complex hessenberg 2nd
smataigne Aug 11, 2022
5201b4b
complex hessenberg 2nd
smataigne Aug 11, 2022
bd2c8d7
complex hessenberg 2nd
smataigne Aug 11, 2022
9231a07
Memory complex hessenberg
smataigne Aug 11, 2022
036f042
Memory complex hessenberg
smataigne Aug 11, 2022
e1d4e42
Merge branch 'main' into smataigne
smataigne Aug 11, 2022
0f3b02a
pfaffian.jl
smataigne Aug 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes tridiag.jl
smataigne committed Aug 9, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 15b9613df9a307f2ef93df38675cbc5be77e09b1
6 changes: 3 additions & 3 deletions src/tridiag.jl
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ julia> SkewHermTridiagonal(A)
"""
function SkewHermTridiagonal(A::AbstractMatrix)
if diag(A, 1) == - adjoint.(diag(A, -1))
SkewHermTridiagonal(diag(A, 1))
SkewHermTridiagonal(diag(A, -1))
else
throw(ArgumentError("matrix is not skew-hermitian; cannot convert to SkewHermTridiagonal"))
end
@@ -126,7 +126,7 @@ Base.copy(S::LA.Adjoint{<:Any,<:SkewHermTridiagonal}) = SkewHermTridiagonal(map(

#isskewhermitian(S::SkewHermTridiagonal) = true

function diag(M::SkewHermTridiagonal{T}, n::Integer=0) where T<:Number
function LA.diag(M::SkewHermTridiagonal{T}, n::Integer=0) where T<:Number
# every branch call similar(..., ::Int) to make sure the
# same vector type is returned independent of n
absn = abs(n)
@@ -141,7 +141,7 @@ function diag(M::SkewHermTridiagonal{T}, n::Integer=0) where T<:Number
"and at most $(size(M, 2)) for an $(size(M, 1))-by-$(size(M, 2)) matrix")))
end
end
function diag(M::SkewHermTridiagonal, n::Integer=0)
function LA.diag(M::SkewHermTridiagonal, n::Integer=0)
# every branch call similar(..., ::Int) to make sure the
# same vector type is returned independent of n
absn = abs(n)
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using LinearAlgebra, Random
import SkewLinearAlgebra as SLA
import .SkewLinearAlgebra as SLA
using Test

Random.seed!(314159) # use same pseudorandom stream for every test
@@ -176,6 +176,9 @@ end

@testset "tridiag.jl" begin
for n in [2,20,151,200]
C=SLA.skewhermitian(randn(n,n))
A=SLA.SkewHermTridiagonal(C)
@test Matrix(A)Matrix(C)
A=SLA.SkewHermTridiagonal(randn(n-1))
B=Matrix(A)
@test size(A,1)==n