-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update solvers to follow ProximalAlgorithms (#19)
* update solvers to follow ProximalAlgorithms * updated title * remove println * REQUIRE -> Project.toml * re-enabled tests * increment tolerances a bit * add Julia 1.2 to travis
- Loading branch information
Showing
13 changed files
with
176 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ os: | |
julia: | ||
- 1.0 | ||
- 1.1 | ||
- 1.2 | ||
- nightly | ||
matrix: | ||
allow_failures: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name = "StructuredOptimization" | ||
uuid = "46cd3e9d-64ff-517d-a929-236bc1a1fc9d" | ||
version = "0.2.0" | ||
|
||
[deps] | ||
AbstractOperators = "d9c5613a-d543-52d8-9afd-8f241a8c3f1c" | ||
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" | ||
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
ProximalAlgorithms = "140ffc9f-1907-541a-a177-7475e0a401e9" | ||
ProximalOperators = "a725b495-10eb-56fe-b38b-717eba820537" | ||
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" | ||
|
||
[compat] | ||
AbstractOperators = "≥ 0.1.0" | ||
DSP = "≥ 0.5.1" | ||
FFTW = "≥ 0.2.4" | ||
ProximalAlgorithms = "≥ 0.3.0" | ||
ProximalOperators = "≥ 0.8.0" | ||
RecursiveArrayTools = "≥ 0.18.0" | ||
julia = "1.0.0" | ||
|
||
[extras] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["LinearAlgebra", "Test", "Random"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import ProximalOperators | ||
import RecursiveArrayTools | ||
|
||
@inline function ProximalOperators.prox( | ||
h::ProximalOperators.ProximableFunction, | ||
x::RecursiveArrayTools.ArrayPartition, | ||
gamma... | ||
) | ||
# unwrap | ||
y, fy = ProximalOperators.prox(h, x.x, gamma...) | ||
# wrap | ||
return RecursiveArrayTools.ArrayPartition(y), fy | ||
end | ||
|
||
@inline function ProximalOperators.gradient( | ||
h::ProximalOperators.ProximableFunction, | ||
x::RecursiveArrayTools.ArrayPartition | ||
) | ||
# unwrap | ||
grad, fx = ProximalOperators.gradient(h, x.x) | ||
# wrap | ||
return RecursiveArrayTools.ArrayPartition(grad), fx | ||
end | ||
|
||
@inline ProximalOperators.prox!( | ||
y::RecursiveArrayTools.ArrayPartition, | ||
h::ProximalOperators.ProximableFunction, | ||
x::RecursiveArrayTools.ArrayPartition, | ||
gamma... | ||
) = ProximalOperators.prox!(y.x, h, x.x, gamma...) | ||
|
||
@inline ProximalOperators.gradient!( | ||
y::RecursiveArrayTools.ArrayPartition, | ||
h::ProximalOperators.ProximableFunction, | ||
x::RecursiveArrayTools.ArrayPartition | ||
) = ProximalOperators.gradient!(y.x, h, x.x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
4dde469
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
4dde469
There was a problem hiding this comment.
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/1890
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: