Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ The file was started with Version `0.4`.
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.35] April 3, 2026
## [0.5.35] April 16, 2026

### Changed

* Improved formatting of the references in the Readme.md (#586)
* Bump compat for RecursiveArrayTools.jl to include version 4
* deactivate CompatHelper Action and solely use dependabot

### Fixed

* The default line search in `conjugate_gradient_descent` is now `ArmijoLinesearchStepsize` instead of `ArmijoLinesearch`, which makes it work well with custom point types.

## [0.5.34] March 3, 2026

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Manopt"
uuid = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
version = "0.5.34"
version = "0.5.35"
authors = [{family-names = "Bergmann", given-names = "Ronny", alias = "kellertuer", city = "Trondheim", affiliation = "Norwegian University of Science and Technology", country = "NO", email = "manopt@ronnybergmann.net", orcid = "https://orcid.org/0000-0001-8342-7218", website = "https://ronnybergmann.net"}]

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/conjugate_gradient_descent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function default_stepsize(
retraction_method = default_retraction_method(M),
)
# take a default with a slightly defensive initial step size.
return ArmijoLinesearchStepsize(
return ArmijoLinesearch(
M; retraction_method = retraction_method, initial_stepsize = 1.0
)
end
Expand Down
12 changes: 11 additions & 1 deletion test/solvers/test_conjugate_gradient.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Manopt, Manifolds, ManifoldsBase, Test, Random, LinearAlgebra
using LinearAlgebra: Diagonal, dot, eigvals, eigvecs
using ManifoldDiff: grad_distance

@testset "Conjugate Gradient Descent" begin
@testset "Conjugate Gradient coefficient rules" begin
Expand Down Expand Up @@ -31,7 +32,7 @@ using LinearAlgebra: Diagonal, dot, eigvals, eigvecs
initial_gradient = zero_vector(M, x0),
)
@test s1.coefficient(dmp, s1, 1) == 0
@test default_stepsize(M, typeof(s1)) isa Manopt.ArmijoLinesearchStepsize
@test default_stepsize(M, typeof(s1)) isa Manopt.ManifoldDefaultsFactory{Manopt.ArmijoLinesearchStepsize}
@test Manopt.get_message(s1) == ""

dU = Manopt.ConjugateDescentCoefficient()
Expand Down Expand Up @@ -394,4 +395,13 @@ using LinearAlgebra: Diagonal, dot, eigvals, eigvecs
)
@test q2 ≈ [1, 0, 0] rtol = 1.0e-7
end

@testset "Custom point types" begin
M = Hyperbolic(2)
data = PoincareBallPoint.([[0.1, 0.2], [0.3, 0.25], [0.35, 0.4]])
n = length(data)
f(M, p) = sum(1 / (2 * n) * distance.(Ref(M), Ref(p), data) .^ 2)
grad_f(M, p) = sum(1 / n * grad_distance.(Ref(M), data, Ref(p)))
@test conjugate_gradient_descent(M, f, grad_f, data[1]) isa PoincareBallPoint
end
end
Loading