Skip to content

Commit 2e3499e

Browse files
author
Alexey Stukalov
committed
formatting fixes
1 parent 615937f commit 2e3499e

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

ext/SEMNLOptExt/NLopt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ SEM.SemOptimizer_impltype(::Val{:NLopt}) = SemOptimizerNLopt
2020
############################################################################################
2121

2222
"""
23-
Uses *NLopt.jl* as the optimization engine. For more information on the available algorithms
24-
and options, see the [*NLopt.jl*](https://github.com/JuliaOpt/NLopt.jl) package and the
23+
Uses *NLopt.jl* as the optimization engine. For more information on the available algorithms
24+
and options, see the [*NLopt.jl*](https://github.com/JuliaOpt/NLopt.jl) package and the
2525
[NLopt docs](https://nlopt.readthedocs.io/en/latest/).
2626
2727
# Constructor

ext/SEMProximalOptExt/ProximalAlgorithms.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ SEM.SemOptimizer{:Proximal}(args...; kwargs...) = SemOptimizerProximal(args...;
1212
SEM.SemOptimizer_impltype(::Val{:Proximal}) = SemOptimizerProximal
1313

1414
"""
15-
Connects to `ProximalAlgorithms.jl` as the optimization backend. For more information on
16-
the available algorithms and options, see the online docs on [Regularization](@ref) and
17-
the documentation of [*ProximalAlgorithms.jl*](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl) / [ProximalOperators.jl](https://github.com/JuliaFirstOrder/ProximalOperators.jl).
18-
19-
# Constructor
20-
2115
SemOptimizerProximal(;
2216
algorithm = ProximalAlgorithms.PANOC(),
2317
operator_g,
2418
operator_h = nothing,
2519
kwargs...,
20+
)
21+
22+
Connects to `ProximalAlgorithms.jl` as the optimization backend. For more information on
23+
the available algorithms and options, see the online docs on [Regularization](@ref) and
24+
the documentation of [*ProximalAlgorithms.jl*](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl) /
25+
[ProximalOperators.jl](https://github.com/JuliaFirstOrder/ProximalOperators.jl).
2626
2727
# Arguments
28-
- `algorithm`: optimization algorithm.
28+
- `algorithm`: proximal optimization algorithm.
2929
- `operator_g`: proximal operator (e.g., regularization penalty)
3030
- `operator_h`: optional second proximal operator
3131
"""

src/optimizer/abstract.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ end
1616
"""
1717
SemOptimizer(args...; engine::Symbol = :Optim, kwargs...)
1818
19-
Constructs a `SemOptimizer` object that can be passed to [`fit`](@ref) for specifying aspects
19+
Constructs a `SemOptimizer` object that can be passed to [`fit`](@ref) for specifying aspects
2020
of the numerical optimization involved in fitting a SEM.
2121
2222
The keyword `engine` controlls which Julia package is used, with `:Optim` being the default.
2323
- `optimizer_engines()` prints a list of currently available engines.
2424
- `optimizer_engine_doc(EngineName)` prints information on the usage of a specific engine.
2525
26-
More engines become available if specific packages are loaded, for example
27-
[*NLopt.jl*](https://github.com/JuliaOpt/NLopt.jl) (also see [Constrained optimization](@ref)
28-
in the online documentation) or
26+
More engines become available if specific packages are loaded, for example
27+
[*NLopt.jl*](https://github.com/JuliaOpt/NLopt.jl) (also see [Constrained optimization](@ref)
28+
in the online documentation) or
2929
[*ProximalAlgorithms.jl*](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl)
3030
(also see [Regularization](@ref) in the online documentation).
3131
3232
The additional arguments `args...` and `kwargs...` are engine-specific and control further
3333
aspects of the optimization process, such as the algorithm, convergence criteria or constraints.
3434
Information on those can be accessed with `optimizer_engine_doc`.
3535
36-
To connect the SEM package to a completely new optimization backend, you can implement a new
36+
To connect the SEM package to a completely new optimization backend, you can implement a new
3737
subtype of SemOptimizer.
3838
"""
3939
SemOptimizer(args...; engine::Symbol = :Optim, kwargs...) =
@@ -47,7 +47,7 @@ SemOptimizer{E}(args...; kwargs...) where {E} = SemOptimizer(Val(E), args...; kw
4747
"""
4848
(1) optimizer_engine(::Type{<:SemOptimizer{E}})
4949
(2) optimizer_engine(::SemOptimizer{E})
50-
50+
5151
Returns `E`; the engine of a `SemOptimizer` object or a subtype of `SemOptimizer`.
5252
"""
5353
optimizer_engine(::Type{<:SemOptimizer{E}}) where {E} = E
@@ -62,7 +62,8 @@ the [`SemOptimizer`](@ref) constructor.
6262
The list of engines depends on the Julia packages loaded (with the `using` directive)
6363
into the current session.
6464
"""
65-
optimizer_engines() = Symbol[optimizer_engine(opt_type) for opt_type in subtypes(SemOptimizer)]
65+
optimizer_engines() =
66+
Symbol[optimizer_engine(opt_type) for opt_type in subtypes(SemOptimizer)]
6667

6768
# return the type implementing SemOptimizer{engine}
6869
# should be overridden in the extension
@@ -85,7 +86,7 @@ optimizer_engine(result::SemOptimizerResult) = optimizer_engine(result.optimizer
8586

8687
"""
8788
fit([optim::SemOptimizer], model::AbstractSem;
88-
[engine::Symbol], start_val = start_val, kwargs...)
89+
[engine::Symbol], start_val = start_val, kwargs...)
8990
9091
Return the fitted `model`.
9192

0 commit comments

Comments
 (0)