add more plots

This commit is contained in:
jacekpoz 2024-05-09 11:54:54 +02:00
parent 5e80cb7736
commit 7c45c5e026
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8
43 changed files with 175 additions and 7 deletions

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average comparisons" set ylabel "Average comparisons"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:2 t "Select 3", \ using 1:2 t "Select 3", \
"" using 1:5 t "Select 5", \ "" using 1:5 t "Select 5", \
"" using 1:8 t "Select 7", \ "" using 1:8 t "Select 7", \

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average comparisons / n" set ylabel "Average comparisons / n"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:14 t "Select 3", \ using 1:14 t "Select 3", \
"" using 1:17 t "Select 5", \ "" using 1:17 t "Select 5", \
"" using 1:20 t "Select 7", \ "" using 1:20 t "Select 7", \

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average swaps" set ylabel "Average swaps"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:3 t "Select 3", \ using 1:3 t "Select 3", \
"" using 1:6 t "Select 5", \ "" using 1:6 t "Select 5", \
"" using 1:9 t "Select 7", \ "" using 1:9 t "Select 7", \

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average swaps / n" set ylabel "Average swaps / n"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:15 t "Select 3", \ using 1:15 t "Select 3", \
"" using 1:18 t "Select 5", \ "" using 1:18 t "Select 5", \
"" using 1:21 t "Select 7", \ "" using 1:21 t "Select 7", \

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average time" set ylabel "Average time"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:4 t "Select 3", \ using 1:4 t "Select 3", \
"" using 1:7 t "Select 5", \ "" using 1:7 t "Select 5", \
"" using 1:10 t "Select 7", \ "" using 1:10 t "Select 7", \

View file

@ -5,7 +5,7 @@ set xlabel "n"
set ylabel "Average time / n" set ylabel "Average time / n"
set term pdfcairo font "JetBrainsMono-NF,12" set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/result" \ plot "./results/k1" \
using 1:16 t "Select 3", \ using 1:16 t "Select 3", \
"" using 1:19 t "Select 5", \ "" using 1:19 t "Select 5", \
"" using 1:22 t "Select 7", \ "" using 1:22 t "Select 7", \

View file

@ -0,0 +1,14 @@
set title "Average comparisons, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average comparisons"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:2 t "Select 3", \
"" using 1:5 t "Select 5", \
"" using 1:8 t "Select 7", \
"" using 1:11 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average comparisons / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average comparisons / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:14 t "Select 3", \
"" using 1:17 t "Select 5", \
"" using 1:20 t "Select 7", \
"" using 1:23 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average swaps, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average swaps"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:3 t "Select 3", \
"" using 1:6 t "Select 5", \
"" using 1:9 t "Select 7", \
"" using 1:12 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average swaps / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average swaps / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:15 t "Select 3", \
"" using 1:18 t "Select 5", \
"" using 1:21 t "Select 7", \
"" using 1:24 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average time, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average time"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:4 t "Select 3", \
"" using 1:7 t "Select 5", \
"" using 1:10 t "Select 7", \
"" using 1:13 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average time / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average time / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn" \
using 1:16 t "Select 3", \
"" using 1:19 t "Select 5", \
"" using 1:22 t "Select 7", \
"" using 1:25 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average comparisons, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average comparisons"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:2 t "Select 3", \
"" using 1:5 t "Select 5", \
"" using 1:8 t "Select 7", \
"" using 1:11 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average comparisons / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average comparisons / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:14 t "Select 3", \
"" using 1:17 t "Select 5", \
"" using 1:20 t "Select 7", \
"" using 1:23 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average swaps, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average swaps"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:3 t "Select 3", \
"" using 1:6 t "Select 5", \
"" using 1:9 t "Select 7", \
"" using 1:12 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average swaps / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average swaps / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:15 t "Select 3", \
"" using 1:18 t "Select 5", \
"" using 1:21 t "Select 7", \
"" using 1:24 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average time, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average time"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:4 t "Select 3", \
"" using 1:7 t "Select 5", \
"" using 1:10 t "Select 7", \
"" using 1:13 t "Select 9"
# vim: ft=gnuplot

View file

@ -0,0 +1,14 @@
set title "Average time / n, n ∈ {100, 200, ..., 50000}"
set style data lines
set xlabel "n"
set ylabel "Average time / n"
set term pdfcairo font "JetBrainsMono-NF,12"
plot "./results/kn2" \
using 1:16 t "Select 3", \
"" using 1:19 t "Select 5", \
"" using 1:22 t "Select 7", \
"" using 1:25 t "Select 9"
# vim: ft=gnuplot

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/k1/comp.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/k1/swap.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/k1/time.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/kn/comp.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/kn/swap.pdf Normal file

Binary file not shown.

Binary file not shown.

BIN
lab3/zad3/plots/kn/time.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -129,7 +129,7 @@ fn main() -> io::Result<()> {
.create(true) .create(true)
.write(true) .write(true)
.truncate(true) .truncate(true)
.open(format!("./results/result"))?; .open(format!("./results/kn2"))?;
for n in (100..=50000).step_by(100) { for n in (100..=50000).step_by(100) {
writeln!(results_file, "{n} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}", writeln!(results_file, "{n} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}",