From d0f3aad1e1226217cfb0aebeee0ebdca3f738d87 Mon Sep 17 00:00:00 2001 From: Ronny Bergmann Date: Wed, 4 Sep 2024 14:29:27 +0200 Subject: [PATCH] Finish test coverage and changelog. --- Changelog.md | 6 +++++- test/solvers/test_proximal_point.jl | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index e1b8cc5c29..279660aed5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,7 +5,11 @@ All notable Changes to the Julia package `Manopt.jl` will be documented in this The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -# [0.5.1] – unreleased +# [0.5.1] – September 4, 2024 + +## Changed + +* slightly improves the test for the ` ExponentialFamilyProjection` text on the about page. ## Added diff --git a/test/solvers/test_proximal_point.jl b/test/solvers/test_proximal_point.jl index 96fc1d8bd4..9bc2728f3b 100644 --- a/test/solvers/test_proximal_point.jl +++ b/test/solvers/test_proximal_point.jl @@ -1,4 +1,4 @@ -using Manopt, Manifolds, ManifoldDiff +using Manopt, Manifolds, ManifoldDiff, Test using ManifoldDiff: prox_distance, prox_distance! @testset "Proximal Point" begin @@ -12,8 +12,13 @@ using ManifoldDiff: prox_distance, prox_distance! p0 = [0.0, 0.0, 1.0] q1 = proximal_point(M, prox_f, p0) @test distance(M, q, q1) < 1e-12 - q2 = proximal_point(M, prox_f!, p0; evaluation=InplaceEvaluation()) - @test distance(M, q1, q2) == 0 + q2 = copy(M, p0) + os2 = proximal_point!( + M, prox_f!, q2; evaluation=InplaceEvaluation(), return_objective=true + ) + @test isapprox(M, q1, q2) + q2a = get_proximal_map(M, os2[1], 1.0, q2) + @test isapprox(M, q2, q2a) os3 = proximal_point(M, prox_f, p0; return_state=true, return_objective=true) obj = os3[1] # test with get_prox map that these are fix points