|
|
@ -1,7 +1,7 @@
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
#include "histogram.h"
|
|
|
|
#include "histogram.h"
|
|
|
|
|
|
|
|
#include "histogram_internal.h"
|
|
|
|
#include "svg.h"
|
|
|
|
#include "svg.h"
|
|
|
|
#include "text.h"
|
|
|
|
#include "text.h"
|
|
|
|
#include <string>
|
|
|
|
#include <string>
|
|
|
@ -33,9 +33,15 @@ Input input_data() {
|
|
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int main() {
|
|
|
|
auto in = input_data();
|
|
|
|
auto in = input_data();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double min_val, max_val;
|
|
|
|
|
|
|
|
find_minmax(in.numbers, min_val, max_val);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double bin_size = compute_bin_size(in.numbers, in.bin_count);
|
|
|
|
auto bins = make_histogram(in.numbers, in.bin_count);
|
|
|
|
auto bins = make_histogram(in.numbers, in.bin_count);
|
|
|
|
show_histogram_svg(bins);
|
|
|
|
|
|
|
|
show_histogram_text(bins);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show_histogram_svg(bins, bin_size, min_val);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
show_histogram_text(bins);
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|