Skip to content

Commit 5d6573f

Browse files
Merge pull request #297 from ChrisRackauckas/fix-formatting
Apply JuliaFormatter to fix code formatting
2 parents f96bc5e + 9f8c77b commit 5d6573f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/esn/esn_inits.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ function informed_init(rng::AbstractRNG, ::Type{T}, dims::Integer...;
305305
idxs = findall(Bool[zero_connections .== input_matrix[jdx, :]
306306
for jdx in axes(input_matrix, 1)])
307307
random_row_idx = idxs[DeviceAgnostic.rand(rng, T, 1:end)]
308-
random_clm_idx = range(1, state_size; step = 1)[DeviceAgnostic.rand(rng, T, 1:end)]
308+
random_clm_idx = range(1, state_size; step = 1)[DeviceAgnostic.rand(
309+
rng, T, 1:end)]
309310
input_matrix[random_row_idx, random_clm_idx] = (DeviceAgnostic.rand(rng, T) -
310311
T(0.5)) .* (T(2) * T(scaling))
311312
end
@@ -943,6 +944,7 @@ function digital_chaotic_adjacency(rng::AbstractRNG, bit_precision::Integer;
943944
end
944945
adjacency_matrix[matrix_order, 1] = 1
945946
for row_index in 1:matrix_order, column_index in 1:matrix_order
947+
946948
if row_index != column_index && rand(rng) < extra_edge_probability
947949
adjacency_matrix[row_index, column_index] = 1
948950
end

src/esn/esn_predict.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ function obtain_esn_prediction(esn,
1818
x_new = esn.states_type(esn.nla_type, x, out_pad)
1919

2020
for i in 1:prediction_len
21-
x, x_new = next_state_prediction!(esn, x, x_new, out, out_pad, i, tmp_array,
21+
x,
22+
x_new = next_state_prediction!(esn, x, x_new, out, out_pad, i, tmp_array,
2223
args...)
2324
out_tmp = get_prediction(output_layer.training_method, output_layer, x_new)
2425
out = store_results!(output_layer.training_method, out_tmp, output, i)
@@ -48,7 +49,8 @@ function obtain_esn_prediction(esn,
4849
x_new = esn.states_type(esn.nla_type, x, out_pad)
4950

5051
for i in 1:prediction_len
51-
x, x_new = next_state_prediction!(esn, x, x_new, prediction.prediction_data[:, i],
52+
x,
53+
x_new = next_state_prediction!(esn, x, x_new, prediction.prediction_data[:, i],
5254
out_pad, i, tmp_array, args...)
5355
out_tmp = get_prediction(training_method, output_layer, x_new)
5456
out = store_results!(training_method, out_tmp, output, i)

src/reca/reca_input_encodings.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function encoding(rm::RandomMaps, input_vector, tot_encoded_vector)
7070
input_vector,
7171
new_tot_enc_vec[((i - 1) * rm.expansion_size + 1):(i * rm.expansion_size)],
7272
rm.maps[i,
73-
:])
73+
:])
7474
end
7575

7676
return new_tot_enc_vec

0 commit comments

Comments
 (0)