Skip to content

Commit

Permalink
Move product manifold on alternating gradient to a new extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Aug 25, 2024
1 parent 8655671 commit 9881f73
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ RipQP = "1e40b3f8-35eb-4cd8-8edd-3e515bb9de08"
ManoptJuMPExt = "JuMP"
ManoptLRUCacheExt = "LRUCache"
ManoptLineSearchesExt = "LineSearches"
ManoptManifoldsExt = ["Manifolds", "RecursiveArrayTools"]
ManoptManifoldsExt = "Manifolds"
ManoptRecursiveArrayToolsExt = "RecursiveArrayTools"
ManoptRipQPQuadraticModelsExt = ["RipQP", "QuadraticModels"]

[compat]
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Manopt = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
QuadraticModels = "f468eda6-eac5-11e8-05a5-ff9e497bcd19"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
RipQP = "1e40b3f8-35eb-4cd8-8edd-3e515bb9de08"

[compat]
Expand Down
5 changes: 0 additions & 5 deletions ext/ManoptManifoldsExt/ManoptManifoldsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ using Manopt
using Manopt: _tex, _var, ManifoldDefaultsFactory, _produce_type
import Manopt:
max_stepsize,
alternating_gradient_descent,
alternating_gradient_descent!,
get_gradient,
get_gradient!,
set_parameter!,
Expand All @@ -23,16 +21,13 @@ using ManifoldDiff:

if isdefined(Base, :get_extension)
using Manifolds
using RecursiveArrayTools
else
using ..Manifolds
using ..RecursiveArrayTools
end

Rn(::Val{:Manifolds}, args...; kwargs...) = Euclidean(args...; kwargs...)

const NONMUTATINGMANIFOLDS = Union{Circle,PositiveNumbers,Euclidean{Tuple{}}}
include("manifold_functions.jl")
include("ChambollePockManifolds.jl")
include("alternating_gradient.jl")
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
module ManoptRecursiveArrayToolsExt
using Manopt
using ManifoldsBase
using ManifoldsBase: submanifold_components
import Manopt:
max_stepsize,
alternating_gradient_descent,
alternating_gradient_descent!,
get_gradient,
get_gradient!,
set_parameter!
using Manopt: _tex, _var, ManifoldDefaultsFactory, _produce_type

if isdefined(Base, :get_extension)
using RecursiveArrayTools
else
using ..RecursiveArrayTools
end

@doc raw"""
X = get_gradient(M::ProductManifold, ago::ManifoldAlternatingGradientObjective, p)
Expand Down Expand Up @@ -112,3 +130,4 @@ function alternating_gradient_descent!(
Manopt.solve!(dmp, agds)
return Manopt.get_solver_return(get_objective(dmp), agds)
end
end
1 change: 1 addition & 0 deletions tutorials/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Manifolds = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e"
ManifoldsBase = "3362f125-f0bb-47a3-aa74-596ffd7ef2fb"
Manopt = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"

[compat]
BenchmarkTools = "1"
Expand Down

0 comments on commit 9881f73

Please sign in to comment.