Skip to content

Commit

Permalink
Final name adoptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Dec 11, 2023
1 parent abb0f84 commit 4c22931
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and their documentation and testing has been extendede.
### Changed

* Bumped and added dependencies on all 3 Project.toml files, the main one, the docs/, an the tutorials/ one.
* `artificial_S2_lemniscate` is now available as [`ManoptExample.Lemniscate`]() – and works on arbitrary manifolds now.
* `artificial_S2_composite_bezier_curve` is now available as [`ManoptExamples.artificial_S2_composite_Bezier_curve`]()
* `adjoint_differential_forward_logs` is available as [`ManoptExamples.adjoint_differential_forward_logs`]()
* `adjoint:differential_bezier_control` is available as [`ManoptExamples.adjoint_differential_Bezier_control_points`]
Expand Down
23 changes: 14 additions & 9 deletions test/solvers/test_cyclic_proximal_point.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Manifolds, Manopt, Test, Dates, LRUCache
using ManifoldDiff: prox_distance, prox_distance!
using ManoptExamples: prox_TV, prox_TV!, L2_Total_Variation
using ManoptExamples: prox_Total_Variation, prox_Total_Variation!, L2_Total_Variation
using ManoptExamples: artificial_S1_signal, Lemniscate

@testset "Cyclic Proximal Point" begin
@testset "Allocating" begin
Expand All @@ -9,7 +10,8 @@ using ManoptExamples: prox_TV, prox_TV!, L2_Total_Variation
q = artificial_S1_signal(n)
f(M, p) = L2_Total_Variation(M, q, 0.5, p)
proxes = (
(N, λ, p) -> prox_distance(N, λ, q, p), (N, λ, p) -> prox_TV(N, 0.5 * λ, p)
(N, λ, p) -> prox_distance(N, λ, q, p),
(N, λ, p) -> prox_Total_Variation(N, 0.5 * λ, p),
)
q2 = cyclic_proximal_point(
N, f, proxes, q; λ=i -> π / (2 * i), stopping_criterion=StopAfterIteration(100)
Expand Down Expand Up @@ -45,14 +47,15 @@ using ManoptExamples: prox_TV, prox_TV!, L2_Total_Variation
n = 3
M = Sphere(2)
N = PowerManifold(M, NestedPowerRepresentation(), n)
q = artificial_S2_lemniscate([0.0, 0.0, 1.0], n)
q = Lemniscate(n)
f(N, p) = L2_Total_Variation(N, q, 0.5, p)
proxes! = (
(N, qr, λ, p) -> prox_distance!(N, qr, λ, q, p),
(N, q, λ, p) -> prox_TV!(N, q, 0.5 * λ, p),
(N, q, λ, p) -> prox_Total_Variation!(N, q, 0.5 * λ, p),
)
proxes = (
(N, λ, p) -> prox_distance(N, λ, q, p), (N, λ, p) -> prox_TV(N, 0.5 * λ, p)
(N, λ, p) -> prox_distance(N, λ, q, p),
(N, λ, p) -> prox_Total_Variation(N, 0.5 * λ, p),
)
s1 = cyclic_proximal_point(
N, f, proxes, q; λ=i -> π / (2 * i), stopping_criterion=StopAfterIteration(100)
Expand Down Expand Up @@ -91,14 +94,15 @@ using ManoptExamples: prox_TV, prox_TV!, L2_Total_Variation
n = 3
M = Sphere(2)
N = PowerManifold(M, NestedPowerRepresentation(), n)
q = artificial_S2_lemniscate([0.0, 0.0, 1.0], n)
q = Lemniscate(n)
f(N, x) = L2_Total_Variation(N, q, 0.5, x)
proxes! = (
(N, qr, λ, p) -> prox_distance!(N, qr, λ, q, p),
(N, q, λ, p) -> prox_TV!(N, q, 0.5 * λ, p),
(N, q, λ, p) -> prox_Total_Variation!(N, q, 0.5 * λ, p),
)
proxes = (
(N, λ, p) -> prox_distance(N, λ, q, p), (N, λ, p) -> prox_TV(N, 0.5 * λ, p)
(N, λ, p) -> prox_distance(N, λ, q, p),
(N, λ, p) -> prox_Total_Variation(N, 0.5 * λ, p),
)
for i in 1:2
mpo1 = ManifoldProximalMapObjective(f, proxes)
Expand Down Expand Up @@ -127,7 +131,8 @@ using ManoptExamples: prox_TV, prox_TV!, L2_Total_Variation
O = CyclicProximalPointState(M, p)
f(M, p) = L2_Total_Variation(M, q, 0.5, p)
proxes = (
(M, λ, p) -> prox_distance(M, λ, q, p), (M, λ, p) -> prox_TV(M, 0.5 * λ, p)
(M, λ, p) -> prox_distance(M, λ, q, p),
(M, λ, p) -> prox_Total_Variation(M, 0.5 * λ, p),
)
s = CyclicProximalPointState(
M, f; stopping_criterion=StopAfterIteration(1), λ=i -> i
Expand Down

0 comments on commit 4c22931

Please sign in to comment.