Skip to content

[AUTO] JuliaFormatter.jl run #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .breakage/get_jso_users.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name ∈ jso_names || error("argument should be one of ", jso_names)

dependents = String[]
try
global dependents = filter(x -> x ∈ jso_names, PkgDeps.users(name))
global dependents = filter(x -> x ∈ jso_names, PkgDeps.users(name))
catch e
# package not registered; don't insert into dependents
# package not registered; don't insert into dependents
end

println(dependents)
8 changes: 4 additions & 4 deletions src/cat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function hcat_prod!(
β,
) where {T, I <: Integer}
mul!(res, A, view(v, 1:Ancol), α, β)
mul!(res, B, view(v, (Ancol + 1):nV), α, one(T))
mul!(res, B, view(v, (Ancol+1):nV), α, one(T))
end

function hcat_ctprod!(
Expand All @@ -29,7 +29,7 @@ function hcat_ctprod!(
β,
) where {T, I <: Integer}
mul!(view(res, 1:Ancol), A, u, α, β)
mul!(view(res, (Ancol + 1):nV), B, u, α, β)
mul!(view(res, (Ancol+1):nV), B, u, α, β)
end

function hcat(A::AbstractLinearOperator, B::AbstractLinearOperator)
Expand Down Expand Up @@ -74,7 +74,7 @@ function vcat_prod!(
β,
) where {T, I <: Integer}
mul!(view(res, 1:Anrow), A, u, α, β)
mul!(view(res, (Anrow + 1):nV), B, u, α, β)
mul!(view(res, (Anrow+1):nV), B, u, α, β)
end

function vcat_ctprod!(
Expand All @@ -88,7 +88,7 @@ function vcat_ctprod!(
β,
) where {T, I <: Integer}
mul!(res, A, view(v, 1:Anrow), α, β)
mul!(res, B, view(v, (Anrow + 1):nV), α, one(T))
mul!(res, B, view(v, (Anrow+1):nV), α, one(T))
end

function vcat(A::AbstractLinearOperator, B::AbstractLinearOperator)
Expand Down
2 changes: 1 addition & 1 deletion src/lbfgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function push_common!(
if data.ys[k] != 0
@. data.a[k] = data.s[k] / data.scaling_factor # B₀ = I / γ.

for j = 1:(i - 1)
for j = 1:(i-1)
l = mod(insert + j - 1, data.mem) + 1
if data.ys[l] != 0
data.a[k] .+= dot(data.b[l], data.s[k]) .* data.b[l]
Expand Down
2 changes: 1 addition & 1 deletion src/lsr1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function push!(op::LSR1Operator, s::AbstractVector, y::AbstractVector)
k = mod(data.insert + i - 2, data.mem) + 1
if data.ys[k] != 0
data.a[k] .= data.y[k] - data.s[k] / data.scaling_factor # = y - B₀ * s
for j = 1:(i - 1)
for j = 1:(i-1)
l = mod(data.insert + j - 2, data.mem) + 1
if data.ys[l] != 0
as = dot(data.a[l], data.s[k]) / data.as[l]
Expand Down
2 changes: 1 addition & 1 deletion src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function solve_shifted_system!(
@. data.shifted_p[:, i] = x_0 * data.shifted_u

sign_t = 1
for t = 1:(i - 1)
for t = 1:(i-1)
c0 = dot(view(data.shifted_p, :, t), data.shifted_u)
c1 = sign_t .* data.shifted_v[t]
c2 = c1 * c0
Expand Down
4 changes: 2 additions & 2 deletions test/test_lbfgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function test_lbfgs()

# Insert a few {s,y} pairs.
insert = 0
for i = 1:(mem + 2)
for i = 1:(mem+2)
s = ones(n) * i
y = [i; ones(n - 1)]
if dot(s, y) > 1.0e-20
Expand Down Expand Up @@ -100,7 +100,7 @@ function test_lbfgs()
H = InverseLBFGSOperator(n, mem = mem, damped = true, scaling = false, σ₂ = 0.8, σ₃ = Inf)

insert_B = insert_H = 0
for i = 1:(mem + 2)
for i = 1:(mem+2)
s = simple_vector(Float64, n)
y = simple_vector(Float64, n)
ys = dot(y, s)
Expand Down
2 changes: 1 addition & 1 deletion test/test_linop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ function test_linop()
op = H * opDiagonal(Λ) * H'
@test check_positive_definite(op)
@test check_positive_definite(op, semi = true)
Λ = collect(eltype(v), 0:(nrow - 1))
Λ = collect(eltype(v), 0:(nrow-1))
op = H * opDiagonal(Λ) * H'
@test check_positive_definite(op, semi = true)
A = Matrix(op)
Expand Down
2 changes: 1 addition & 1 deletion test/test_lsr1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function test_lsr1()
@test B.data.insert == 1

# Insert a few {s,y} pairs.
for i = 1:(mem + 2)
for i = 1:(mem+2)
s = ones(n) * i
y = [i; ones(n - 1)]
push!(B, s, y)
Expand Down
Loading