Skip to content

Commit

Permalink
adapt to new SparsityOperators
Browse files Browse the repository at this point in the history
  • Loading branch information
tknopp committed Dec 13, 2019
1 parent 655afd8 commit e92ed6d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RegularizedLeastSquares"
uuid = "1e9c538a-f78c-5de5-8ffb-0b6dbe892d23"
authors = ["Tobias Knopp <[email protected]>"]
version = "0.5"
version = "0.5.1"

[deps]
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
Expand All @@ -13,7 +13,7 @@ SparsityOperators = "a5ff1dd3-4e0a-50db-9022-6d011c1d5846"

[compat]
julia = "1.0"
SparsityOperators = "0.1.4"
SparsityOperators = "0.1.5"
ProgressMeter = "1.2"
IterativeSolvers = "0.8"

Expand Down
2 changes: 1 addition & 1 deletion src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function applyConstraints(x, sparseTrafo, enforceReal, enforcePositive, constrai
enforceReal && enfReal!(x, mask)
enforcePositive && enfPos!(x, mask)
if sparseTrafo != nothing
x[:] = sparseTrafo' * x
x[:] = adjoint(sparseTrafo)*x
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/proximalMaps/ProxL1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function proxL1!(x::Array{T}, λ::Float64; sparseTrafo::Trafo=nothing, kargs...)
z[:] = [i*max( (abs(i)-λ)/abs(i),0 ) for i in z]
end
if sparseTrafo != nothing
x[:] = sparseTrafo\z
x[:] = adjoint(sparseTrafo)*z
else
x[:] = z
end
Expand Down
4 changes: 2 additions & 2 deletions src/proximalMaps/ProxL21.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function proxL21!(x::Vector{T},λ::Float64; sparseTrafo::Trafo=nothing, slices::
proxL21!(z, λ, slices)
end
if sparseTrafo != nothing
x[:] = sparseTrafo\z
x[:] = adjoint(sparseTrafo)*z
else
x[:] = z
end
Expand All @@ -37,7 +37,7 @@ end

"""
normL21(x::Vector{T}, λ::Float64; sparseTrafo::Trafo=nothing, slices::Int64=1, kargs...) where T
return the value of the L21-regularization term.
Arguments are the same as in `proxL21!`
"""
Expand Down

2 comments on commit e92ed6d

@tknopp
Copy link
Member Author

@tknopp tknopp commented on e92ed6d Dec 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/6693

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" e92ed6d508b389c6adf288f98093a5e624e96ebe
git push origin v0.5.1

Please sign in to comment.