You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -16,29 +10,29 @@ function integer_search(stop_at::Integer)::Array{Array{Number, 1}}
16
10
A = []
17
11
upper_bound =10
18
12
increment_bound =10
19
-
processed = []
20
-
i = 0
13
+
processed = []
14
+
i =0
21
15
p =Progress(stop_at, 1) # minimum update interval: 1 second
22
-
16
+
23
17
whiletrue
24
18
for q in1:upper_bound, n in1:upper_bound, d in1:upper_bound
25
-
# skip configurations that have already been processed
26
-
# arelessthan(upper_bound - increment_bound, q, n, d) && continue
27
-
(q, n, d) ∈ processed &&continue
19
+
# skip configurations that have already been processed
20
+
# arelessthan(upper_bound - increment_bound, q, n, d) && continue
21
+
(q, n, d) ∈ processed &&continue
28
22
# note that we actually don't want to filter out non-linear codes
29
-
# distance shouldn't be larger than the block length; filter trivial distances of one; we filter out combinations when all are equal; filter out codes that are generalised hamming codes; filter out even distances
30
-
# if d < n && ! isone(q) #&& ! CodingTheory.allequal(q, n, d) && ! ishammingperfect(q, n, d) && ! iseven(d) && ! isprimepower(q)
# distance shouldn't be larger than the block length; filter trivial distances of one; we filter out combinations when all are equal; filter out codes that are generalised hamming codes; filter out even distances
24
+
# if d < n && ! isone(q) #&& ! CodingTheory.allequal(q, n, d) && ! ishammingperfect(q, n, d) && ! iseven(d) && ! isprimepower(q)
@showprogressfor q in1:upper_bound, n in1:upper_bound, d in1:upper_bound
73
-
# skip configurations that have already been processed
74
-
# arelessthan(upper_bound - increment_bound, q, n, d) && continue
75
-
(q, n, d) ∈ processed &&continue
76
-
# remove q non prime powers
75
+
# skip configurations that have already been processed
76
+
# arelessthan(upper_bound - increment_bound, q, n, d) && continue
77
+
(q, n, d) ∈ processed &&continue
78
+
# remove q non prime powers
77
79
ifisprimepower(big(q))
78
80
hb =hamming_bound(q, n, d)
79
81
sb =singleton_bound(q, n, d)
80
-
# filter out the more trivial bounds that are one (or if distance is one); filter out distances that are more than or equal to the block length, as they don't make sense in our context; filter out even distances
81
-
# if d < n || 1 ∉ (hb, sb, d)
82
-
if d < n &&! isone(d) &&! CodingTheory.allequal(q, n, d) &&! iszero(mod(d, 2))
83
-
push!(processed, (q, n, d))
84
-
# i += 1; println("$i:\t$q, $n, $d")
82
+
# filter out the more trivial bounds that are one (or if distance is one); filter out distances that are more than or equal to the block length, as they don't make sense in our context; filter out even distances
83
+
# if d < n || 1 ∉ (hb, sb, d)
84
+
if d < n &&
85
+
!isone(d) &&
86
+
!CodingTheory.allequal(q, n, d) &&
87
+
!iszero(mod(d, 2))
88
+
push!(processed, (q, n, d))
89
+
# i += 1; println("$i:\t$q, $n, $d")
85
90
comparison = hb > sb ?1: (sb > hb ?-1:0)
86
91
push!(A, [q, n, d, hb, sb, comparison])
87
92
isequal(length(A), stop_at) &&return stop_at, A
@@ -93,27 +98,32 @@ function bound_comparison(stop_at::Integer)::Tuple{Int, Array{Array{Number, 1}}}
93
98
end
94
99
95
100
functionplot_bound_comparison(stop_at::Integer)
96
-
number_of_bounds, A = bound_comparison(stop_at)
97
-
D = DataFrame(q = Number[], n = Number[], d = Number[], hamming_bound = Number[], singleton_bound = Number[], comparison = Number[])
Please specify the number of datapoints you want to calculate from the command line, along with q, n, and d. For example
12
-
./examples/plot_random.jl 6 7 3 1000 10000 # q, n, d, num_data_points, selection_set_size
13
-
That is respectively: the size of the alphabet; the block length of the words; the distance of the code; the number of datapoints in the code; and the selection set size of each "random" sample.
14
-
"""))
4
+
throw(error("""
5
+
Please specify the number of datapoints you want to calculate from the command line, along with q, n, and d. For example
6
+
./examples/plot_random.jl 6 7 3 1000 10000 # q, n, d, num_data_points, selection_set_size
7
+
That is respectively: the size of the alphabet; the block length of the words; the distance of the code; the number of datapoints in the code; and the selection set size of each "random" sample.
8
+
""",),)
15
9
end
16
10
17
11
global q =parse(Int, ARGS[1])
@@ -24,4 +18,4 @@ global upper_bound_adjustment = 10
0 commit comments