Skip to content

Commit

Permalink
Fix the seed and remove an unnecessary case, which could also be reso…
Browse files Browse the repository at this point in the history
…lved by a optional positional argument.
  • Loading branch information
kellertuer committed Feb 11, 2025
1 parent 4d87704 commit e89895e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/solvers/mesh_adaptive_direct_search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ $(_var(:Keyword, :X))
@doc "$(_doc_mads)"
mesh_adaptive_direct_search(M::AbstractManifold, args...; kwargs...)

function mesh_adaptive_direct_search(M::AbstractManifold, f; kwargs...)
return mesh_adaptive_direct_search(M, f, rand(M); kwargs...)
end
function mesh_adaptive_direct_search(M::AbstractManifold, f, p; kwargs...)
function mesh_adaptive_direct_search(M::AbstractManifold, f, p=rand(M); kwargs...)
mco = ManifoldCostObjective(f)
return mesh_adaptive_direct_search(M, mco; kwargs...)
end
Expand Down
1 change: 1 addition & 0 deletions test/solvers/test_mesh_adaptive_direct_search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using Manifolds, Manopt, Test, LinearAlgebra, Random
M = Rotations(2)
p0 = [1.0 0.0; 0.0 1.0]
f(M, p) = opnorm(B - A * p)
Random.seed!(42)
s = mesh_adaptive_direct_search(
M,
f,
Expand Down

0 comments on commit e89895e

Please sign in to comment.