Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 379db0f

Browse files
authoredApr 29, 2023
Merge pull request #51 from control-toolbox/return
return
2 parents 05faebb + 60e320b commit 379db0f

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed
 

‎src/description.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ makeDescription(desc::DescVarArg)::Description = Tuple(desc) # create a descript
3737
"""
3838
$(TYPEDSIGNATURES)
3939
40-
Returns the description.
40+
Return the description.
4141
4242
# Example
4343
```jldoctest
@@ -50,7 +50,7 @@ makeDescription(desc::Description)::Description = desc
5050
"""
5151
$(TYPEDSIGNATURES)
5252
53-
Returns a tuple containing only the description `y`.
53+
Return a tuple containing only the description `y`.
5454
5555
# Example
5656
```jldoctest
@@ -84,7 +84,7 @@ end
8484
"""
8585
$(TYPEDSIGNATURES)
8686
87-
Returns a complete description from an incomplete description `desc` and
87+
Return a complete description from an incomplete description `desc` and
8888
a list of complete descriptions `desc_list`. If several complete descriptions are possible,
8989
then the first one is returned.
9090
@@ -113,7 +113,7 @@ end
113113
"""
114114
$(TYPEDSIGNATURES)
115115
116-
Returns the difference between the description `x` and the description `y`.
116+
Return the difference between the description `x` and the description `y`.
117117
118118
# Example
119119
```jldoctest

‎src/model.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,49 +53,49 @@ Base.isless(i::Index, j::Index) = i.val ≤ j.val
5353
"""
5454
$(TYPEDSIGNATURES)
5555
56-
Returns :nonautonomous == time_dependence
56+
Return :nonautonomous == time_dependence
5757
"""
5858
isnonautonomous(time_dependence::Symbol) = :nonautonomous == time_dependence
5959

6060
"""
6161
$(TYPEDSIGNATURES)
6262
63-
Returns !isnonautonomous(time_dependence)
63+
Return !isnonautonomous(time_dependence)
6464
"""
6565
isautonomous(time_dependence::Symbol) = !isnonautonomous(time_dependence)
6666

6767
"""
6868
$(TYPEDSIGNATURES)
6969
70-
Returns `true` if the model has been defined as nonautonomous.
70+
Return `true` if the model has been defined as nonautonomous.
7171
"""
7272
isnonautonomous(ocp::OptimalControlModel{time_dependence}) where {time_dependence} = isnonautonomous(time_dependence)
7373

7474
"""
7575
$(TYPEDSIGNATURES)
7676
77-
Returns `true` if the model has been defined as autonomous.
77+
Return `true` if the model has been defined as autonomous.
7878
"""
7979
isautonomous(ocp::OptimalControlModel) = !isnonautonomous(ocp)
8080

8181
"""
8282
$(TYPEDSIGNATURES)
8383
84-
Returns `true` if the criterion type of `ocp` is `:min`.
84+
Return `true` if the criterion type of `ocp` is `:min`.
8585
"""
8686
ismin(ocp::OptimalControlModel) = ocp.criterion == :min
8787

8888
"""
8989
$(TYPEDSIGNATURES)
9090
91-
Returns `true` if the criterion type of `ocp` is `:max`.
91+
Return `true` if the criterion type of `ocp` is `:max`.
9292
"""
9393
ismax(ocp::OptimalControlModel) = !ismin(ocp)
9494

9595
"""
9696
$(TYPEDSIGNATURES)
9797
98-
Returns a new `OptimalControlModel` instance, that is a model of an optimal control problem.
98+
Return a new `OptimalControlModel` instance, that is a model of an optimal control problem.
9999
100100
The model is defined by the following optional keyword argument:
101101
@@ -659,7 +659,7 @@ end
659659
"""
660660
$(TYPEDSIGNATURES)
661661
662-
Returns the labels of the constraints as a `Base.keys`.
662+
Return the labels of the constraints as a `Base.keys`.
663663
664664
# Example
665665

‎src/plot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ end
195195
"""
196196
$(TYPEDSIGNATURES)
197197
198-
Returns `x` and `y` for the plot of the optimal control solution `sol`
198+
Return `x` and `y` for the plot of the optimal control solution `sol`
199199
corresponding respectively to the argument `xx` and the argument `yy`.
200200
201201
**Notes.**

‎src/utils.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
$(TYPEDSIGNATURES)
33
4-
Returns `i` ∈ [0, 9] as a subscript.
4+
Return `i` ∈ [0, 9] as a subscript.
55
"""
66
function ctindice(i::Integer)::Char
77
if i < 0 || i > 9
@@ -13,7 +13,7 @@ end
1313
"""
1414
$(TYPEDSIGNATURES)
1515
16-
Returns `i` > 0 as a subscript.
16+
Return `i` > 0 as a subscript.
1717
"""
1818
function ctindices(i::Integer)::String
1919
if i < 0
@@ -29,7 +29,7 @@ end
2929
"""
3030
$(TYPEDSIGNATURES)
3131
32-
Returns `i` ∈ [0, 9] as an upperscript.
32+
Return `i` ∈ [0, 9] as an upperscript.
3333
"""
3434
function ctupperscript(i::Integer)::Char
3535
if i < 0 || i > 9
@@ -55,7 +55,7 @@ end
5555
"""
5656
$(TYPEDSIGNATURES)
5757
58-
Returns `i` > 0 as an upperscript.
58+
Return `i` > 0 as an upperscript.
5959
"""
6060
function ctupperscripts(i::Integer)::String
6161
if i < 0
@@ -71,21 +71,21 @@ end
7171
"""
7272
$(TYPEDSIGNATURES)
7373
74-
Returns the gradient of `f` at `x`.
74+
Return the gradient of `f` at `x`.
7575
"""
7676
ctgradient(f::Function, x) = ForwardDiff.gradient(f, x)
7777

7878
"""
7979
$(TYPEDSIGNATURES)
8080
81-
Returns the Jacobian of `f` at `x`.
81+
Return the Jacobian of `f` at `x`.
8282
"""
8383
ctjacobian(f::Function, x) = ForwardDiff.jacobian(f, x)
8484

8585
"""
8686
$(TYPEDSIGNATURES)
8787
88-
Returns the interpolation of `f` at `x`.
88+
Return the interpolation of `f` at `x`.
8989
"""
9090
function ctinterpolate(x, f) # default for interpolation of the initialization
9191
return Interpolations.linear_interpolation(x, f, extrapolation_bc=Interpolations.Line())
@@ -127,14 +127,14 @@ expand(x::Vector{<:Vector{<:ctNumber}}) = vec2vec(x)
127127
"""
128128
$(TYPEDSIGNATURES)
129129
130-
Returns `x`.
130+
Return `x`.
131131
"""
132132
expand(x::Vector{<:ctNumber}) = x
133133

134134
"""
135135
$(TYPEDSIGNATURES)
136136
137-
Returns `expand(matrix2vec(x, 1))`
137+
Return `expand(matrix2vec(x, 1))`
138138
"""
139139
expand(x::Matrix{<:ctNumber}) = expand(matrix2vec(x, 1))
140140

@@ -175,7 +175,7 @@ end
175175
"""
176176
$(TYPEDSIGNATURES)
177177
178-
Returns the Poisson bracket of `f` and `g`.
178+
Return the Poisson bracket of `f` and `g`.
179179
"""
180180
function Poisson(f, g)
181181
function fg(x, p)

0 commit comments

Comments
 (0)