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

Update ktypeof function to support BlockArrays and FillArrays #606

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

amontoison
Copy link
Member

close #573
It also concerns #605

@github-actions
Copy link
Contributor

Package name latest stable
CaNNOLeS.jl
DCISolver.jl
JSOSolvers.jl
LLSModels.jl
Percival.jl
RipQP.jl

@github-actions
Copy link
Contributor

Package name latest stable
CaNNOLeS.jl
DCISolver.jl
JSOSolvers.jl
LLSModels.jl
Percival.jl
RipQP.jl

@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #606 (b96ff11) into main (56196d7) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main     #606      +/-   ##
==========================================
- Coverage   98.05%   98.03%   -0.02%     
==========================================
  Files          36       36              
  Lines        6062     6064       +2     
==========================================
+ Hits         5944     5945       +1     
- Misses        118      119       +1     
Impacted Files Coverage Δ
src/krylov_utils.jl 94.32% <83.33%> (-0.64%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

Package name latest stable
CaNNOLeS.jl
DCISolver.jl
JSOSolvers.jl
LLSModels.jl
Percival.jl
RipQP.jl

@amontoison amontoison merged commit d6f006d into JuliaSmoothOptimizers:main Aug 16, 2022
@amontoison amontoison deleted the hotfix_ktypeof branch August 16, 2022 22:38
@gdalle
Copy link

gdalle commented Aug 17, 2022

Hi there, and thanks for fixing #573! I just took a look at the code, and I was wondering why the function ktypeof doesn't exploit multiple dispatch? My first thought would have been something like this:

function ktypeof(v::S) where {S<:SubArray}
    return S.types[1]
end

function ktypeof(v::S) where {T,S<:DenseVector{T}}
    return Vector{T}
end

function ktypeof(v::S) where {S<:SparseVector}
    return S.types[3]
end

function ktypeof(v::S) where {S<:AbstractSparseVector}
    return S.types[2]
end

function ktypeof(v::S) where {S<:AbstractVector}
    return S
end

Would that work too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with FillArrays
2 participants