Skip to content

Commit

Permalink
Create aliases for structs
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Oct 18, 2023
1 parent 3877e3c commit 9adecd7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
33 changes: 16 additions & 17 deletions docs/src/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,20 @@ solution_summary(model)
```

```@docs
Manopt.ManoptJuMPExt.VectorizedManifold
MOI.dimension(::Manopt.ManoptJuMPExt.VectorizedManifold)
Manopt.ManoptJuMPExt.Optimizer
MOI.empty!(::Optimizer)
MOI.supports(::Optimizer, ::MOI.RawOptimizerAttribute)
MOI.get(::Optimizer, ::MOI.RawOptimizerAttribute)
MOI.set(::Optimizer, ::MOI.RawOptimizerAttribute, ::Any)
MOI.supports_incremental_interface(::Optimizer)
MOI.copy_to(::Optimizer, ::MOI.ModelLike)
MOI.supports_add_constrained_variables(::Optimizer, ::Type{<:VectorizedManifold})
MOI.add_constrained_variables(::Optimizer, ::VectorizedManifold)
MOI.is_valid(model::Optimizer, ::MOI.VariableIndex)
MOI.get(model::Optimizer, ::MOI.NumberOfVariables)
MOI.supports(::Optimizer, ::MOI.RawOptimizerAttribute)
MOI.set(::Optimizer, ::MOI.VariablePrimalStart, ::MOI.VariableIndex, ::Union{Real,Nothing})
ArrayShape
JuMP_VectorizedManifold
MOI.dimension(::JuMP_VectorizedManifold)
JuMP_Optimizer
MOI.empty!(::JuMP_Optimizer)
MOI.supports(::JuMP_Optimizer, ::MOI.RawOptimizerAttribute)
MOI.get(::JuMP_Optimizer, ::MOI.RawOptimizerAttribute)
MOI.set(::JuMP_Optimizer, ::MOI.RawOptimizerAttribute, ::Any)
MOI.supports_incremental_interface(::JuMP_Optimizer)
MOI.copy_to(::JuMP_Optimizer, ::MOI.ModelLike)
MOI.supports_add_constrained_variables(::JuMP_Optimizer, ::Type{<:JuMP_VectorizedManifold})
MOI.add_constrained_variables(::JuMP_Optimizer, ::JuMP_VectorizedManifold)
MOI.is_valid(model::JuMP_Optimizer, ::MOI.VariableIndex)
MOI.get(model::JuMP_Optimizer, ::MOI.NumberOfVariables)
MOI.supports(::JuMP_Optimizer, ::MOI.RawOptimizerAttribute)
MOI.set(::JuMP_Optimizer, ::MOI.VariablePrimalStart, ::MOI.VariableIndex, ::Union{Real,Nothing})
JuMP_ArrayShape
```
4 changes: 4 additions & 0 deletions ext/ManoptJuMPExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ function __init__()
# So that the user can use the convenient `Manopt.Optimizer`
if isdefined(Base, :setglobal!)
setglobal!(Manopt, :JuMP_Optimizer, Optimizer)
setglobal!(Manopt, :JuMP_VectorizedManifold, VectorizedManifold)
setglobal!(Manopt, :JuMP_ArrayShape, ArrayShape)
else
Manopt.eval(:(const JuMP_Optimizer = $Optimizer))
Manopt.eval(:(const JuMP_VectorizedManifold = $VectorizedManifold))
Manopt.eval(:(const JuMP_ArrayShape = $ArrayShape))
end
return nothing
end
Expand Down

0 comments on commit 9adecd7

Please sign in to comment.