diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-03-08 17:43:55 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-03-08 17:43:55 +0300 |
commit | 622206cacb166e8ac65b05733582fd404042cc0b (patch) | |
tree | 32069d09b1972673ce837c55866a5e3826017b9e /plot.bat | |
parent | README update (diff) | |
download | sorting-algorithms-622206cacb166e8ac65b05733582fd404042cc0b.tar.gz sorting-algorithms-622206cacb166e8ac65b05733582fd404042cc0b.zip |
refactoring
Diffstat (limited to '')
-rw-r--r-- | plot.bat | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -4,23 +4,27 @@ @setlocal enabledelayedexpansion +@set DEFAULT_REPETITIONS=100 +@set DEFAULT_MIN=0 +@set DEFAULT_MAX=200 + @if E%1 == E goto :print_usage @set algorithm=%1 @if not E%2 == E ( set repetitions=%2 ) else ( - set repetitions=100 + set repetitions=%DEFAULT_REPETITIONS% ) @if not E%3 == E ( set min=%3 ) else ( - set min=0 + set min=%DEFAULT_MIN% ) @if not E%4 == E ( set max=%4 ) else ( - set max=200 + set max=%DEFAULT_MAX% ) plot.py -l "%algorithm%" -a "%min%" -b "%max%" -r "%repetitions%" ^ @@ -36,5 +40,5 @@ plot.py -l "%algorithm%" -a "%min%" -b "%max%" -r "%repetitions%" ^ @exit /b :print_usage: -@echo Usage: %0 ALGORITHM [REPETITIONS [MIN [MAX]]] +@echo Usage: %0 ALGORITHM [REPETITIONS=%DEFAULT_REPETITIONS% [MIN=%DEFAULT_MIN% [MAX=%DEFAULT_MAX%]]] @exit /b 1 |