35
35
Compute an euclidean norm with domain size `dom_size` of a scalar.
36
36
"""
37
37
function co_euclidean (x; dom_size, params... )
38
- return co_euclidean_val (x; val= 0.0 , dom_size)
38
+ return co_euclidean_val (x; val = 0.0 , dom_size)
39
39
end
40
40
41
41
"""
@@ -48,13 +48,13 @@ co_abs_diff_var_vars(x; nvars, params...) = abs(x - nvars)
48
48
co_var_minus_vars(x; nvars)
49
49
Return the difference `x - nvars` if positive, `0.0` otherwise, where `nvars` denotes the numbers of variables.
50
50
"""
51
- co_var_minus_vars (x; nvars, params... ) = co_var_minus_val (x; val= nvars)
51
+ co_var_minus_vars (x; nvars, params... ) = co_var_minus_val (x; val = nvars)
52
52
53
53
"""
54
54
co_vars_minus_var(x; nvars)
55
55
Return the difference `nvars - x` if positive, `0.0` otherwise, where `nvars` denotes the numbers of variables.
56
56
"""
57
- co_vars_minus_var (x; nvars, params... ) = co_val_minus_var (x; val= nvars)
57
+ co_vars_minus_var (x; nvars, params... ) = co_val_minus_var (x; val = nvars)
58
58
59
59
60
60
# Parametric layers
89
89
comparison_layer(param = false)
90
90
Generate the layer of transformations functions of the ICN. Iff `param` value is set, also includes all the parametric comparison with that value. The operations are mutually exclusive, that is only one will be selected.
91
91
"""
92
- function comparison_layer (parameters= Vector {Symbol} ())
92
+ function comparison_layer (parameters = Vector {Symbol} ())
93
93
comparisons = make_comparisons (:none )
94
94
95
95
for p in parameters
123
123
124
124
for (f, results) in funcs_param
125
125
for (key, vals) in enumerate (data)
126
- @test f (vals. first; val= vals. second[1 ]) == results[key]
126
+ @test f (vals. first; val = vals. second[1 ]) == results[key]
127
127
end
128
128
end
129
129
@@ -135,15 +135,15 @@ end
135
135
136
136
for (f, results) in funcs_vars
137
137
for (key, vals) in enumerate (data)
138
- @test f (vals. first, nvars= vals. second[2 ]) == results[key]
138
+ @test f (vals. first, nvars = vals. second[2 ]) == results[key]
139
139
end
140
140
end
141
141
142
142
funcs_val_dom = [CN. co_euclidean_val => [1.4 , 2.0 ]]
143
143
144
144
for (f, results) in funcs_val_dom
145
145
for (key, vals) in enumerate (data)
146
- @test f (vals. first, val= vals. second[1 ], dom_size= vals. second[2 ]) ≈
146
+ @test f (vals. first, val = vals. second[1 ], dom_size = vals. second[2 ]) ≈
147
147
results[key]
148
148
end
149
149
end
152
152
153
153
for (f, results) in funcs_dom
154
154
for (key, vals) in enumerate (data)
155
- @test f (vals. first, dom_size= vals. second[2 ]) ≈ results[key]
155
+ @test f (vals. first, dom_size = vals. second[2 ]) ≈ results[key]
156
156
end
157
157
end
158
158
0 commit comments