Skip to content

Commit 5470a18

Browse files
authored
Format .jl files
1 parent f85560f commit 5470a18

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

docs/src/guide.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@ constraint(
6060
c,
6161
3x[i+1]^3 + 2 * x[i+2] - 5 + sin(x[i+1] - x[i+2])sin(x[i+1] + x[i+2]) + 4x[i+1] -
6262
x[i]exp(x[i] - x[i+1]) - 3 for i = 1:(N-2);
63-
lcon = -1.0, ucon = 1.0
63+
lcon = -1.0,
64+
ucon = 1.0,
6465
)
6566

6667
# If you want to create a single-bounded constraint, you can set `lcon` to `-Inf` or `ucon` to `Inf`. For example, if we wanted to set the lower bound of the constraint to -1 and the upper bound to infinity, we could do it as follows:
6768
constraint(
6869
c,
6970
3x[i+1]^3 + 2 * x[i+2] - 5 + sin(x[i+1] - x[i+2])sin(x[i+1] + x[i+2]) + 4x[i+1] -
7071
x[i]exp(x[i] - x[i+1]) - 3 for i = 1:(N-2);
71-
lcon = -1.0, ucon = Inf
72+
lcon = -1.0,
73+
ucon = Inf,
7274
)
7375

7476
# ## ExaModel

ext/ExaModelsMOI.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,12 @@ function _exafy(i::R, var_to_idx, p) where {R<:Real}
445445
end
446446

447447
function _exafy(e::MOI.ScalarNonlinearFunction, var_to_idx, p = ())
448-
return op(e.head)((begin
449-
c, p = _exafy(e, var_to_idx, p)
450-
c
451-
end for e in e.args)...), p
448+
return op(e.head)((
449+
begin
450+
c, p = _exafy(e, var_to_idx, p)
451+
c
452+
end for e in e.args
453+
)...), p
452454
end
453455

454456
function _exafy(e::MOI.ScalarAffineFunction{T}, var_to_idx, p = ()) where {T}

src/graph.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ end
115115

116116
@inline Base.getproperty(n::ParSource, s::Symbol) = ParIndexed(n, s)
117117
@inline Base.getindex(n::ParSource, i) = ParIndexed(n, i)
118-
@inline Base.indexed_iterate(n::P, idx, start = 1) where P <: Union{ParSource, ParIndexed} = (ParIndexed(n, idx), idx + 1)
118+
@inline Base.indexed_iterate(n::P, idx, start = 1) where {P<:Union{ParSource,ParIndexed}} =
119+
(ParIndexed(n, idx), idx + 1)
119120

120121

121122
@inline Base.getindex(n::VarSource, i) = Var(i)

src/simdfunction.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct SIMDFunction{F,C1,C2}
2525
end
2626

2727
@inline (sf::SIMDFunction{F,C1,C2})(i, x, θ) where {F,C1,C2} = sf.f(i, x, θ)
28-
@inline (sf::SIMDFunction{F,C1,C2})(i, x, θ) where {F <: Real,C1,C2} = sf.f
28+
@inline (sf::SIMDFunction{F,C1,C2})(i, x, θ) where {F<:Real,C1,C2} = sf.f
2929

3030
"""
3131
SIMDFunction(gen::Base.Generator, o0 = 0, o1 = 0, o2 = 0)

0 commit comments

Comments
 (0)