Skip to content

Commit

Permalink
Include most trivial constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Dec 10, 2024
1 parent 4fbc326 commit 60833bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pdmat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PDMat{T,S}(pdm::PDMat{T,S}) where {T,S} = pdm
PDMat{T,S}(pdm::PDMat) where {T,S} = PDMat{T,S}(pdm.mat, pdm.chol)
PDMat{T}(pdm::PDMat{T}) where T = pdm
PDMat{T}(pdm::PDMat) where T = PDMat{T}(pdm.mat, pdm.chol)
PDMat(pdm::PDMat) = pdm

# Construction from an AbstractMatrix
function PDMat{T,S}(mat::AbstractMatrix) where {T,S}
Expand Down
1 change: 1 addition & 0 deletions test/pdmtypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using Test
@testset "PDMat from PDMat" begin
pdM = PDMat(M)
pdf64M = PDMat(f64M)
@test pdM === PDMat(pdM)
test_pdmat(PDMat(pdM), M, cmat_eq=true, verbose=1)
test_pdmat(PDMat{Float64}(pdf64M), f64M, cmat_eq=true, verbose=1)
test_pdmat(PDMat{Float64,Matrix{Float64}}(pdf64M), f64M, cmat_eq=true, verbose=1)
Expand Down

0 comments on commit 60833bf

Please sign in to comment.