#include "histogram.h" bool find_minmax(std::vector numbers, double& min, double& max) { if(numbers.size() == 0){ return false; } min = numbers[0]; max = numbers[0]; for (double x : numbers) { if (x < min) { min = x; } else if (x > max) { max = x; } } return true; } std::vector make_histogram(const std::vector& numbers,size_t bin_count){ std::vector bins(bin_count); double min,max; find_minmax(numbers,min,max); double bin_size=(max-min)/bin_count; for(size_t i=0; i