More reconstruction

This commit is contained in:
Marius Drechsler 2024-07-20 20:09:02 +02:00
parent 0de30b0d76
commit b73f8e6e63
5 changed files with 82 additions and 8 deletions

View file

@ -210,9 +210,39 @@ With these new points for the vertical steps of $cal(Q)$, we can draw the new qu
As for metric 2, we can apply the same strategy and find the points for the vertical steps to be at $1/16, 5/16, 9/16$ and $13/16$. This quantizer can be visualized together with the first metric quantizer in @fig:smhd_2_2_reconstruction, forming the complete quantizer for the reconstruction phase of a 2-bit 2-metric configuration $cal(R)(2,2,tilde(x))$.
#grid(
columns: (1fr, 1fr),
[
#scale(x: 80%, y: 80%)[
#figure(
include("../graphics/quantizers/s-metric/2_2_reconstruction.typ"),
caption: [2-bit 2-metric reconstruction quantizer]
)<fig:smhd_2_2_reconstruction> ]
],
[
#scale(x: 80%, y: 80%)[
#figure(
include("../graphics/quantizers/s-metric/3_2_reconstruction.typ"),
caption: [2-bit 3-metric reconstruction quantizer],
)<fig:smhd_3_2_reconstruction> ]
]
)
Analytically, the offset we are applying to $cal(E)(2, 2, tilde(x))$ can be defined as
$ phi = lr(frac(1, 2^n dot s)mid(|))_(n=2, s=2) = 1 / 8 $<eq:offset>
This is also shown in @fig:smhd_2_2_reconstruction, as our quantizer curve is moved $1/8$ to the left and the right.
==== Odd number of metrics
If a odd number of metrics is given, the offset can still be calculated using @eq:offset. Additionally, we will keep the original quantizer used during enrollment.
#figure(
include("../graphics/quantizers/s-metric/2_2_reconstruction.typ"),
caption: [2-bit 2-metric reconstruction quantizer]
)<fig:smhd_2_2_reconstruction>
kind: "algorithm",
supplement: [Algorithm],
include("../pseudocode/find_quantizers.typ")
)<alg:fancy>
As shown in @alg:fancy

View file

@ -12,15 +12,15 @@
y-label: $cal(R)(2, 2, tilde(x))$,
x-label: $tilde(x)$,
y-tick-step: none,
y-ticks: ((3/16, [00]), (7/16, [01]), (11/16, [10]), (15/16, [11])),
y-ticks: ((1/4, [00]), (2/4, [01]), (3/4, [10]), (1, [11])),
axis-style: "left",
x-min: 0,
x-max: 1,
y-min: 0,
y-max: 1,{
plot.add(((0,3/16), (3/16,3/16), (7/16,7/16), (11/16,11/16), (15/16, 15/16), (15/16, 3/16), (1, 3/16)), line: "vh", style: line_style, label: [Metric 1])
plot.add(((0, 15/16), (1/16, 15/16), (1/16, 3/16), (5/16, 3/16), (9/16, 7/16), (13/16, 11/16), (13/16, 15/16), (1, 15/16)),line: "vh", style: line_style2, label: [Metric 2])
plot.add-hline(3/16, 7/16, 11/16, 15/16, style: dashed)
plot.add-vline(3/16, 7/16, 11/16, 15/16, style: dashed)
plot.add(((0,1/4), (1/8,1/4), (3/8,2/4), (5/8,3/4), (7/8, 1), (7/8, 1/4), (1, 1/4)), line: "vh", style: line_style, label: [Metric 1])
plot.add(((0, 1), (1/8, 1), (1/8, 1/4), (3/8, 1/4), (5/8, 2/4), (7/8, 3/4), (7/8, 1), (1, 1)),line: "vh", style: line_style2, label: [Metric 2])
plot.add-hline(1/4, 2/4, 3/4, 1, style: dashed)
plot.add-vline(1/4, 2/4, 3/4, 1, style: dashed)
})
})

View file

@ -0,0 +1,28 @@
#import "@preview/cetz:0.2.2": canvas, plot
#let line_style = (stroke: (paint: red, thickness: 2pt))
#let line_style2 = (stroke: (paint: blue, thickness: 2pt))
#let line_style3 = (stroke: (paint: green, thickness: 2pt))
#let dashed = (stroke: (dash: "dashed"))
#canvas({
plot.plot(size: (8,6),
legend: "legend.south",
legend-style: (orientation: ltr, item: (spacing: 0.5)),
x-tick-step: 1/4,
//x-ticks: ((3/16, [3/16]), (7/16, [7/16]), (11/16, [11/16]), (15/16, [15/16])),
y-label: $cal(R)(3, 2, tilde(x))$,
x-label: $tilde(x)$,
y-tick-step: none,
y-ticks: ((1/4, [00]), (2/4, [01]), (3/4, [10]), (1, [11])),
axis-style: "left",
x-min: 0,
x-max: 1,
y-min: 0,
y-max: 1,{
plot.add(((0, 1/4), (2/12, 1/4), (5/12, 2/4), (8/12, 3/4), (11/12, 1), (11/12, 1/4), (1, 1/4)),line: "vh", style: line_style, label: [Metric 1])
plot.add(((0,1/4), (1/4,1/4), (2/4,2/4), (3/4,3/4), (4/4, 4/4)), line: "vh", style: line_style2, label: [Metric 2])
plot.add(((0, 1),(1/12, 1), (1/12, 1/4), (4/12, 1/4), (4/12, 2/4), (7/12, 3/4), (10/12, 1), (1, 1)), line: "hv", style: line_style3, label: [Metric 3])
plot.add-hline(1/4, 2/4, 3/4, 1, style: dashed)
plot.add-vline(1/4, 2/4, 3/4, 1, style: dashed)
})
})

BIN
main.pdf

Binary file not shown.

View file

@ -0,0 +1,16 @@
#import "@preview/lovelace:0.3.0": *
#pseudocode-list(booktabs: true, numbered-title: [My cool algorithm])[
+ do something
+ do something else
+ *while* still something to do
+ do even more
+ *if* not done yet *then*
+ wait a bit
+ resume working
+ *else*
+ go home
+ *end*
+ *end*
]