Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit bb068bb

Browse files
authored
Fix the ambiguities method issue for Factor (#27)
* Fix ambiguous method issue for `Factor` * Add test for `detect_ambiguities`
1 parent 79db23e commit bb068bb

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/cholmod.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ mutable struct Factor{Tv<:VTypes} <: Factorization{Tv}
336336
return F
337337
end
338338
end
339-
Factor(ptr::Ptr{cholmod_factor}) where {Tv<:VTypes} = Factor{Tv}(ptr)
340-
Factor(x::Factor) = x
341339

342340
Base.adjoint(F::Factor) = Adjoint(F)
343341
Base.transpose(F::Factor) = Transpose(F)
@@ -384,7 +382,7 @@ function FactorComponent(F::Factor{Tv}, sym::Symbol) where Tv
384382
FactorComponent{Tv,sym}(F)
385383
end
386384

387-
Factor(FC::FactorComponent) = Factor(FC.F)
385+
Factor(FC::FactorComponent) = FC.F
388386

389387
#################
390388
# Thin wrappers #

test/ambiguous.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using SuiteSparse
2+
using Test
3+
4+
@testset "detect_ambiguities" begin
5+
@test_nowarn detect_ambiguities(SuiteSparse; recursive=true, ambiguous_bottom=false)
6+
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using Test, Random
44
using SuiteSparse, LinearAlgebra, SparseArrays
55

66
if Base.USE_GPL_LIBS
7+
include("ambiguous.jl")
78
include("umfpack.jl")
89
include("cholmod.jl")
910
include("spqr.jl")

0 commit comments

Comments
 (0)