@@ -43,81 +43,81 @@ function CodingTheory.degree_distributions_plot(C::AbstractLDPCCode)
4343 return f
4444end
4545
46- """
47- $TYPEDSIGNATURES
46+ # """
47+ # $TYPEDSIGNATURES
4848
49- Return a bar graph and a dictionary of (length, count) pairs for unique short
50- cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
51- when there are no cycles.
49+ # Return a bar graph and a dictionary of (length, count) pairs for unique short
50+ # cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
51+ # when there are no cycles.
5252
53- # Note
54- - Short cycles are defined to be those with lengths between ``g`` and ``2g - 2``,
55- where ``g`` is the girth.
56- - Run `using Makie` to activate this extension.
57- """
58- function CodingTheory. count_short_cycles_plot (C:: AbstractLDPCCode )
59- if isempty (C. short_cycle_counts) || isempty (C. elementary_cycle_counts)
60- CodingTheory. _count_cycles (C)
61- end
53+ # # Note
54+ # - Short cycles are defined to be those with lengths between ``g`` and ``2g - 2``,
55+ # where ``g`` is the girth.
56+ # - Run `using Makie` to activate this extension.
57+ # """
58+ # function CodingTheory.count_short_cycles_plot(C::AbstractLDPCCode)
59+ # if isempty(C.short_cycle_counts) || isempty(C.elementary_cycle_counts)
60+ # CodingTheory._count_cycles(C)
61+ # end
6262
63- len = length (C. short_cycle_counts)
64- x_data = [0 for _ in 1 : len]
65- y_data = [0 for _ in 1 : len]
66- index = 1
67- for (i, j) in C. short_cycle_counts
68- x_data[index] = i
69- y_data[index] = j
70- index += 1
71- end
63+ # len = length(C.short_cycle_counts)
64+ # x_data = [0 for _ in 1:len]
65+ # y_data = [0 for _ in 1:len]
66+ # index = 1
67+ # for (i, j) in C.short_cycle_counts
68+ # x_data[index] = i
69+ # y_data[index] = j
70+ # index += 1
71+ # end
7272
73- fig = Figure ();
74- ax = Axis (fig[1 , 1 ], xlabel = " Cycle Length" , ylabel = " Occurrences" ,
75- title = " Short Cycle Counts" )
76- barplot! (ax, x_data, y_data, bar_width = 1 , xticks = x_data, yticks = y_data)
77- # fig = Plots.bar(x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data,
78- # legend = false, xlabel = "Cycle Length", ylabel = "Occurrences",
79- # title = "Short Cycle Counts")
80- display (fig)
81- return fig, C. short_cycle_counts
82- end
73+ # fig = Figure();
74+ # ax = Axis(fig[1, 1], xlabel = "Cycle Length", ylabel = "Occurrences",
75+ # title = "Short Cycle Counts")
76+ # barplot!(ax, x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data)
77+ # # fig = Plots.bar(x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data,
78+ # # legend = false, xlabel = "Cycle Length", ylabel = "Occurrences",
79+ # # title = "Short Cycle Counts")
80+ # display(fig)
81+ # return fig, C.short_cycle_counts
82+ # end
8383
84- """
85- $TYPEDSIGNATURES
84+ # """
85+ # $TYPEDSIGNATURES
8686
87- Return a bar graph and a dictionary of (length, count) pairs for unique elementary
88- cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
89- when there are no cycles.
87+ # Return a bar graph and a dictionary of (length, count) pairs for unique elementary
88+ # cycles in the Tanner graph of `C`. An empty graph and dictionary are returned
89+ # when there are no cycles.
9090
91- # Note
92- - Elementary cycles do not contain the same vertex twice and are unable to be
93- decomposed into a sequence of shorter cycles.
94- - Run `using Makie` to activate this extension.
95- """
96- function CodingTheory. count_elementary_cycles_plot (C:: AbstractLDPCCode )
97- if isempty (C. short_cycle_counts) || isempty (C. elementary_cycle_counts)
98- CodingTheory. _count_cycles (C)
99- end
91+ # # Note
92+ # - Elementary cycles do not contain the same vertex twice and are unable to be
93+ # decomposed into a sequence of shorter cycles.
94+ # - Run `using Makie` to activate this extension.
95+ # """
96+ # function CodingTheory.count_elementary_cycles_plot(C::AbstractLDPCCode)
97+ # if isempty(C.short_cycle_counts) || isempty(C.elementary_cycle_counts)
98+ # CodingTheory._count_cycles(C)
99+ # end
100100
101- len = length (C. elementary_cycle_counts)
102- x_data = [0 for _ in 1 : len]
103- y_data = [0 for _ in 1 : len]
104- index = 1
105- for (i, j) in C. elementary_cycle_counts
106- x_data[index] = i
107- y_data[index] = j
108- index += 1
109- end
101+ # len = length(C.elementary_cycle_counts)
102+ # x_data = [0 for _ in 1:len]
103+ # y_data = [0 for _ in 1:len]
104+ # index = 1
105+ # for (i, j) in C.elementary_cycle_counts
106+ # x_data[index] = i
107+ # y_data[index] = j
108+ # index += 1
109+ # end
110110
111- fig = Figure ();
112- ax = Axis (fig[1 , 1 ], xlabel = " Cycle Length" , ylabel = " Occurrences" ,
113- title = " Elementary Cycle Counts" )
114- barplot! (ax, x_data, y_data, bar_width = 1 , xticks = x_data, yticks = y_data)
115- # fig = Plots.bar(x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data,
116- # legend = false, xlabel = "Cycle Length", ylabel = "Occurrences",
117- # title = "Elementary Cycle Counts")
118- display (fig)
119- return fig, C. elementary_cycle_counts
120- end
111+ # fig = Figure();
112+ # ax = Axis(fig[1, 1], xlabel = "Cycle Length", ylabel = "Occurrences",
113+ # title = "Elementary Cycle Counts")
114+ # barplot!(ax, x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data)
115+ # # fig = Plots.bar(x_data, y_data, bar_width = 1, xticks = x_data, yticks = y_data,
116+ # # legend = false, xlabel = "Cycle Length", ylabel = "Occurrences",
117+ # # title = "Elementary Cycle Counts")
118+ # display(fig)
119+ # return fig, C.elementary_cycle_counts
120+ # end
121121
122122"""
123123$TYPEDSIGNATURES
0 commit comments