diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-06 06:14:54 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-05-06 06:14:54 +0300 |
commit | d6de118675a192ce6e01574eb4eb2541db7aca7a (patch) | |
tree | f5899b5089029fc5637435482cce5e279fa5e2ce /plot.bat | |
download | sorting-algorithms-d6de118675a192ce6e01574eb4eb2541db7aca7a.tar.gz sorting-algorithms-d6de118675a192ce6e01574eb4eb2541db7aca7a.zip |
initial commit
Diffstat (limited to 'plot.bat')
-rw-r--r-- | plot.bat | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plot.bat b/plot.bat new file mode 100644 index 0000000..e389c5c --- /dev/null +++ b/plot.bat @@ -0,0 +1,40 @@ +@rem Copyright 2015 Egor Tensin <Egor.Tensin@gmail.com> +@rem This file is licensed under the terms of the MIT License. +@rem See LICENSE.txt for details. + +@setlocal enabledelayedexpansion + +@if E%1 == E goto :print_usage +@set algorithm=%1 + +@if not E%2 == E ( + set repetitions=%2 +) else ( + set repetitions=100 +) +@if not E%3 == E ( + set min=%3 +) else ( + set min=0 +) +@if not E%4 == E ( + set max=%4 +) else ( + set max=200 +) + +plot.py -l "%algorithm%" -a "%min%" -b "%max%" -r "%repetitions%" ^ + -i sorted -o "%algorithm%_%repetitions%_sorted_%min%_%max%.png" ^ + || exit /b !errorlevel! +plot.py -l "%algorithm%" -a "%min%" -b "%max%" -r "%repetitions%" ^ + -i randomized -o "%algorithm%_%repetitions%_randomized_%min%_%max%.png" ^ + || exit /b !errorlevel! +plot.py -l "%algorithm%" -a "%min%" -b "%max%" -r "%repetitions%" ^ + -i reversed -o "%algorithm%_%repetitions%_reversed_%min%_%max%.png" ^ + || exit /b !errorlevel! + +@exit /b + +:print_usage: +@echo Usage: %0 ALGORITHM [REPETITIONS [MIN [MAX]]] +@exit /b 1 |