From 4623dc66e854418f6e555065477ca619a9a0ff7e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 21 Apr 2016 10:41:46 +0300 Subject: plots: update the actual plots --- plots.html | 159 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 76 insertions(+), 83 deletions(-) (limited to 'plots.html') diff --git a/plots.html b/plots.html index 481056e..ff2986e 100644 --- a/plots.html +++ b/plots.html @@ -5,114 +5,108 @@ groups: - navbar navbar_link:  Plots custom_css: plots.css -plot_kinds: - - sorted - - randomized - - reversed +input_order: + - ascending + - random + - descending plots: - - codename: bubble + - codename: bubble_sort brief_name: Bubble sort display_name: Bubble sort min_length: 0 max_length: 200 - repetitions: - sorted: 1000 - randomized: 100 - reversed: 100 + iterations: 100 complexity: - sorted: O(n) - randomized: O(n2) - reversed: O(n2) - - codename: bubble_optimized + ascending: O(n) + random: O(n2) + descending: O(n2) + - codename: bubble_sort_optimized brief_name: "… \"optimized\"" display_name: "\"Optimized\" bubble sort" min_length: 0 max_length: 200 - repetitions: - sorted: 1000 - randomized: 100 - reversed: 100 + iterations: 100 complexity: - sorted: O(n) - randomized: O(n2) - reversed: O(n2) - - codename: heap + ascending: O(n) + random: O(n2) + descending: O(n2) + - codename: heapsort brief_name: Heapsort display_name: Heapsort min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: O(n log n) - - codename: insertion + - codename: insertion_sort brief_name: Insertion sort display_name: Insertion sort min_length: 0 max_length: 200 - repetitions: - sorted: 1000 - randomized: 100 - reversed: 100 + iterations: + ascending: 1000 + random: 100 + descending: 100 complexity: - sorted: O(n) - randomized: O(n2) - reversed: O(n2) - - codename: merge + ascending: O(n) + random: O(n2) + descending: O(n2) + - codename: merge_sort brief_name: Merge sort display_name: Merge sort min_length: 0 max_length: 200 - repetitions: 100 + iterations: 1000 complexity: O(n log n) - - codename: quick_first + - codename: quicksort_first brief_name: Quicksort (first element as pivot) display_name: Quicksort (first element as pivot) min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: - sorted: O(n2) - randomized: O(n log n) - reversed: O(n2) - - codename: quick_second + ascending: O(n2) + random: O(n log n) + descending: O(n2) + - codename: quicksort_second brief_name: "… second element…" display_name: Quicksort (second element as pivot) min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: - sorted: O(n2) - randomized: O(n log n) - reversed: O(n2) - - codename: quick_middle + ascending: O(n2) + random: O(n log n) + descending: O(n2) + - codename: quicksort_middle brief_name: "… middle element…" display_name: Quicksort (middle element as pivot) min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: O(n log n) - - codename: quick_last + - codename: quicksort_last brief_name: "… last element…" display_name: Quicksort (last element as pivot) min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: - sorted: O(n2) - randomized: O(n log n) - reversed: O(n2) - - codename: quick_random + ascending: O(n2) + random: O(n log n) + descending: O(n2) + - codename: quicksort_random brief_name: "… random element…" display_name: Quicksort (random element as pivot) min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: O(n log n) - - codename: selection + - codename: selection_sort brief_name: Selection sort display_name: Selection sort min_length: 0 max_length: 200 - repetitions: 100 + iterations: 100 complexity: O(n2) ---

Plots

@@ -134,19 +128,19 @@ to produce the plots are listed below.

- + - + - + - +
CPUIntel Atom N2800Intel Core i3-5005U
OSWindows 7 Professional Service Pack 1Windows 8.1
Python3.4.13.5.1
matplotlib1.4.01.5.1
@@ -163,10 +157,9 @@ Visit https://githu

In short, each of the implemented algorithms was provided with three input sequences:

Use the table below to quickly navigate to the plots for the corresponding algorithm.

@@ -175,11 +168,11 @@ corresponding algorithm.

Algorithm - Complexity + Complexity - {% for kind in page.plot_kinds %} - {{ kind }} + {% for order in page.input_order %} + {{ order }} {% endfor %} @@ -187,8 +180,8 @@ corresponding algorithm.

{% for algorithm in page.plots %}
{{ algorithm.brief_name }} - {% for kind in page.plot_kinds %} - {% if algorithm.complexity[kind] %}{{ algorithm.complexity[kind] }}{% else %}{{ algorithm.complexity }}{% endif %} + {% for order in page.input_order %} + {% if algorithm.complexity[order] %}{{ algorithm.complexity[order] }}{% else %}{{ algorithm.complexity }}{% endif %} {% endfor %} {% endfor %} @@ -201,25 +194,25 @@ corresponding algorithm.

{{ algorithm.display_name }}

- {% for kind in page.plot_kinds %} - {% if algorithm.repetitions[kind] %} - {% assign repetitions = algorithm.repetitions[kind] %} - {% else %} - {% assign repetitions = algorithm.repetitions %} - {% endif %} - {% capture stem %}{{ algorithm.codename }}_{{ repetitions }}_{{ kind }}_{{ algorithm.min_length }}_{{ algorithm.max_length }}{% endcapture %} -
-
- - - -
- {{ algorithm.display_name }}
- Input: {{ kind }}
- Complexity: {% if algorithm.complexity[kind] %}{{ algorithm.complexity[kind] }}{% else %}{{ algorithm.complexity }}{% endif %}
+ {% for order in page.input_order %} + {% if algorithm.iterations[order] %} + {% assign iterations = algorithm.iterations[order] %} + {% else %} + {% assign iterations = algorithm.iterations %} + {% endif %} + {% capture stem %}{{ algorithm.codename }}_{{ iterations }}_{{ order }}_{{ algorithm.min_length }}_{{ algorithm.max_length }}{% endcapture %} +
+
+ + {{ algorithm.display_name | escape }}, {{ iterations }} iterations, {{ order }} input + +
+ {{ algorithm.display_name }}
+ Input: {{ order }}
+ Complexity: {% if algorithm.complexity[order] %}{{ algorithm.complexity[order] }}{% else %}{{ algorithm.complexity }}{% endif %}
+
-
{% endfor %}
{% endfor %} -- cgit v1.2.3