// file: TesterOfTSADDetermine.cpp

#include <cstdlib>
#include <iostream>

#include "ToolsetArrayComparableNumericM.hpp"
#include "TesterOfTSAC.hpp"

	namespace tsac = ToolsetArrayComparable;

	int main (int argc, char * argv[])
	{
		if (argc < 3 || std::atoi(argv[1]) <= 0 ||
            std::atof(argv[2]) > std::atof(argv[3])) {
			std::cout << "Please call this command with four integer arguments"
				<< " size (> 0), min, max (>= min), item!";
		} else {
			int size = std::atoi(argv[1]);
			double min = std::atof(argv[2]);
			double max = std::atof(argv[3]);
			TesterOfTSAC<double> tester = TesterOfTSAC<double>(size, min, max);
			int		max_low,
					max_high;
			double max_sum;
			tsac::determine_range_with_max_sum
				(tester.get_array(), max_low, max_high, max_sum);
			std::cout << "max_low: " << max_low << " max_high: " << max_high
				<< " max_sum: " << max_sum;
		}
		std::cout << std::endl;
		return 0;
	}
