Skip to content

Commit bde1682

Browse files
committed
Fix typos
1 parent cdf53ee commit bde1682

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

docs/src/submodules/Nonlinear/overview.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ julia> new_expr = Nonlinear.add_expression(model, :(my_f($x + 1)))
222222
MathOptInterface.Nonlinear.ExpressionIndex(2)
223223
```
224224
By default, `Nonlinear` will compute first- and second-derivatives of the
225-
registered operator using `ForwardDiff.jl`. Override this by passing functions
226-
which compute the respective derivative:
225+
registered operator using [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl).
226+
Override this by passing functions which compute the respective derivative:
227227
```jldoctest nonlinear_developer
228228
julia> f′(x) = 2 * sin(x) * cos(x)
229229
f′ (generic function with 1 method)
@@ -248,14 +248,15 @@ g (generic function with 1 method)
248248
249249
julia> Nonlinear.register_operator(model, :my_g, 2, g)
250250
```
251-
Now, you can use `:my_f` in expressions:
251+
Now, you can use `:my_g` in expressions:
252252
```jldoctest nonlinear_developer
253253
julia> new_expr = Nonlinear.add_expression(model, :(my_g($x + 1, $x)))
254254
MathOptInterface.Nonlinear.ExpressionIndex(3)
255255
```
256256
By default, `Nonlinear` will compute the gradient of the registered
257-
operator using `ForwardDiff.jl`. (Hessian information is not supported.)
258-
Override this by passing a function to compute the gradient:
257+
operator using [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl).
258+
(Hessian information is not supported.) Override this by passing a function to
259+
compute the gradient:
259260
```jldoctest nonlinear_developer
260261
julia> function ∇g(ret, x...)
261262
ret[1] = 2 * x[1] + x[2]
@@ -292,7 +293,7 @@ Nonlinear.Evaluator with available features:
292293
```
293294
The functions of the [Nonlinear programming](@ref) API implemented by
294295
[`Nonlinear.Evaluator`](@ref) depends upon the chosen
295-
[`Nonlinear.AbstractAutomaticDifferentiation`](@ref backend.
296+
[`Nonlinear.AbstractAutomaticDifferentiation`](@ref) backend.
296297

297298
The `:ExprGraph` feature means we can call [`objective_expr`](@ref) and
298299
[`constraint_expr`](@ref) to retrieve the expression graph of the problem.
@@ -341,7 +342,7 @@ easily identify the arguments to an operator. However, it has a significant
341342
draw-back: each node in the graph requires a `Vector`, which is heap-allocated
342343
and tracked by Julia's garbage collector (GC). For large models, we can expect
343344
to have millions of nodes in the expression graph, so this overhead quickly
344-
becomes prohibiative for computation.
345+
becomes prohibitive for computation.
345346

346347
An alternative is to record the expression as a linear tape:
347348
```jldoctest expr_graph

src/Nonlinear/types.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ end
249249
"""
250250
ExprGraphOnly() <: AbstractAutomaticDifferentiation
251251
252-
The default implementation of `AbstractAutomaticDifferentiation`. This only
253-
supported `:ExprGraph`.
252+
The default implementation of `AbstractAutomaticDifferentiation`. The only
253+
supported feature is `:ExprGraph`.
254254
"""
255255
struct ExprGraphOnly <: AbstractAutomaticDifferentiation end
256256

0 commit comments

Comments
 (0)