Skip to content

Commit

Permalink
Bugfix: method ambiguity for the LLR method of the prox! function
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobAsslaender committed Jul 2, 2024
1 parent b258cb8 commit e8deda6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/proximalMaps/ProxLLR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LLRRegularization(λ; shape::NTuple{N,TI}, blockSize::NTuple{N,TI} = ntuple(_ -
performs the proximal map for LLR regularization using singular-value-thresholding
"""
function prox!(reg::LLRRegularization{TR, N, TI}, x::AbstractArray{Tc}, λ::T) where {TR, N, TI, T, Tc <: Union{T, Complex{T}}}
function prox!(reg::LLRRegularization, x::Union{AbstractArray{T}, AbstractArray{Complex{T}}}, λ::T) where {T <: Real}
reg.fullyOverlapping ? proxLLROverlapping!(reg, x, λ) : proxLLRNonOverlapping!(reg, x, λ)
end

Expand Down Expand Up @@ -101,7 +101,7 @@ end
"""
norm(reg::LLRRegularization, x, λ)
returns the value of the LLR-regularization term. The norm is only implemented for 2D, non-fully overlapping blocks.
returns the value of the LLR-regularization term. The norm is only implemented for 2D, non-fully overlapping blocks.
"""
function norm(reg::LLRRegularization, x::Union{AbstractArray{T}, AbstractArray{Complex{T}}}, λ::T) where {T <: Real}
shape = reg.shape
Expand Down Expand Up @@ -171,7 +171,7 @@ performs the proximal map for LLR regularization using singular-value-thresholdi
function proxLLROverlapping!(reg::LLRRegularization{TR, N, TI}, x::AbstractArray{Tc}, λ::T) where {TR, N, TI, T, Tc <: Union{T, Complex{T}}}
shape = reg.shape
blockSize = reg.blockSize

x = reshape(x, tuple(shape..., length(x) ÷ prod(shape)))

block_idx = CartesianIndices(blockSize)
Expand Down

0 comments on commit e8deda6

Please sign in to comment.