Skip to content

Commit

Permalink
remove choleskyinv
Browse files Browse the repository at this point in the history
  • Loading branch information
TSGut committed Apr 20, 2023
1 parent 2302d61 commit de0bd8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
3 changes: 1 addition & 2 deletions src/MatrixFactorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ArrayLayouts: reflector!, reflectorApply!, materialize!, @_layoutlmul, @_



export ul, ul!, ql, ql!, qrunblocked, qrunblocked!, UL, QL, choleskyinv!, choleskyinv
export ul, ul!, ql, ql!, qrunblocked, qrunblocked!, UL, QL

const AdjointQtype = isdefined(LinearAlgebra, :AdjointQ) ? LinearAlgebra.AdjointQ : Adjoint
const AbstractQtype = AbstractQ <: AbstractMatrix ? AbstractMatrix : AbstractQ
Expand Down Expand Up @@ -136,7 +136,6 @@ include("ul.jl")
include("qr.jl")
include("ql.jl")
include("rq.jl")
include("choleskyinv.jl")
include("polar.jl")

end #module
29 changes: 0 additions & 29 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -439,33 +439,4 @@ end
end

include("test_rq.jl")

# choleskyinv.jl
@testset "choleskyinv" begin
etol = 1e-9
n = 20
# real matrices
A = randn(n, n)
P = A*A'
Pi = inv(P)
C = choleskyinv!(copy(Matrix(P)))
@test(norm(C.c.L*C.c.U-P)/√n < etol)
@test(norm(C.ci.U*C.ci.L-Pi)/√n < etol)
C = choleskyinv(P)
@test(norm(C.c.L*C.c.U-P)/√n < etol)
@test(norm(C.ci.U*C.ci.L-Pi)/√n < etol)

# repeat the test for complex matrices
A=randn(ComplexF64, n, n)
P=A*A'
Pi=inv(P)
C=choleskyinv!(copy(Matrix(P)))
@test(norm(C.c.L*C.c.U-P)/√n < etol)
@test(norm(C.ci.U*C.ci.L-Pi)/√n < 4etol)
C = choleskyinv(P)
@test(norm(C.c.L*C.c.U-P)/√n < etol)
@test(norm(C.ci.U*C.ci.L-Pi)/√n < 4etol)
end


include("test_polar.jl")

0 comments on commit de0bd8e

Please sign in to comment.