Skip to content

Commit ee45ab9

Browse files
Fix noise_mixture syntax and callback alignment
1 parent 68e0843 commit ee45ab9

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/callback.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function build_callback(trajectory_arr, epsilon, max_active, shortcut, shortcut_
33
noise_print_update = true
44
noise_print_count = 0
55
noise_update_count = 0
6-
if verbose == 1 && noise_mixture == false
6+
if verbose == 1 && !noise_mixture
77
Printf.@printf(
88
stdout,
99
"%s %s %s %s\n",
@@ -22,10 +22,10 @@ function build_callback(trajectory_arr, epsilon, max_active, shortcut, shortcut_
2222
lpad("Noise", 10),
2323
lpad("#Atoms", 7),
2424
)
25-
elseif verbose == 2 && noise_mixture == false
25+
elseif verbose == 2 && !noise_mixture
2626
Printf.@printf(
2727
stdout,
28-
"%s %s %s %s %s %s %s\n",
28+
"%s %s %s %s %s %s %s\n",
2929
lpad("Iteration", 12),
3030
lpad("Primal", 12),
3131
lpad("Dual gap", 12),
@@ -62,7 +62,7 @@ function build_callback(trajectory_arr, epsilon, max_active, shortcut, shortcut_
6262
state.lmo.fwdata.fw_time[1] = state.time
6363

6464
if (mod(state.t, callback_iter) == 0 || noise_print_update)
65-
if verbose == 1 && noise_mixture == false
65+
if verbose == 1 && !noise_mixture
6666
Printf.@printf(
6767
stdout,
6868
"%s %.4e %.4e %s\n",
@@ -81,7 +81,7 @@ function build_callback(trajectory_arr, epsilon, max_active, shortcut, shortcut_
8181
rp[],
8282
lpad(length(active_set), 7)
8383
)
84-
elseif verbose == 2 && noise_mixture == false
84+
elseif verbose == 2 && !noise_mixture
8585
Printf.@printf(
8686
stdout,
8787
"%s %.4e %.4e %.4e %s %s %s\n",

src/separable_distance.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function separable_distance(
6565
shortcut_scale = 10,
6666
kwargs...
6767
) where {T <: Real, N}
68-
if verbose >0
68+
if verbose > 0
6969
if typeof(lmo) <: KSeparableLMO{T}
7070
lmo.lmos[1].parallelism && @info "The number of threads is $(Threads.nthreads())"
7171
else
@@ -80,7 +80,7 @@ function separable_distance(
8080
end
8181
# left for consistency between runs
8282
Random.seed!(0)
83-
83+
8484
if isnothing(noise)
8585
noise = similar(C)
8686
noise .= T(0)
@@ -141,7 +141,7 @@ function separable_distance(
141141
end
142142

143143
# print last iteration
144-
if verbose == 1 && noise_mixture == false
144+
if verbose == 1 && !noise_mixture
145145
Printf.@printf(
146146
stdout,
147147
"%s %.4e %.4e %s\n",
@@ -160,7 +160,7 @@ function separable_distance(
160160
rp[],
161161
lpad(length(active_set), 7)
162162
)
163-
elseif verbose == 2 && noise_mixture == false
163+
elseif verbose == 2 && !noise_mixture
164164
Printf.@printf(
165165
stdout,
166166
"%s %.4e %.4e %.4e %s %s %s\n",

0 commit comments

Comments
 (0)