Сравнить коммиты
3 Коммитов
6eb46fd053
...
77874d3b68
Автор | SHA1 | Дата |
---|---|---|
|
77874d3b68 | 4 месяцев назад |
|
aa518e1fed | 4 месяцев назад |
|
dcb3401ade | 4 месяцев назад |
@ -1,25 +1,31 @@
|
|||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "svg.h"
|
#include "svg.h"
|
||||||
|
|
||||||
|
|
||||||
struct Input {
|
struct Input {
|
||||||
vector<double> vec;
|
vector<double> vec;
|
||||||
size_t korz{};
|
size_t korz{};
|
||||||
};
|
};
|
||||||
Input input_data() {
|
Input input_data(istream& in, bool promt = false) {
|
||||||
Input in;
|
Input lin;
|
||||||
size_t n, korz;
|
size_t n, korz;
|
||||||
|
if(promt)
|
||||||
cerr << "Number of elem ";
|
cerr << "Number of elem ";
|
||||||
cin >> n;
|
in >> n;
|
||||||
in.vec.resize(n);
|
lin.vec.resize(n);
|
||||||
for (size_t i = 0; i < n; i++)
|
for (size_t i = 0; i < n; i++)
|
||||||
cin >> in.vec[i];
|
in >> lin.vec[i];
|
||||||
cerr << "Enter bin count: ";
|
if(promt)
|
||||||
cin >> in.korz;
|
cerr << "Enter bin count: ";
|
||||||
return in;
|
in >> lin.korz;
|
||||||
|
return lin;
|
||||||
}
|
}
|
||||||
int main() {
|
int main() {
|
||||||
auto in = input_data();
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
auto in = input_data(cin);
|
||||||
auto bins = make_histogram(in.korz, in.vec);
|
auto bins = make_histogram(in.korz, in.vec);
|
||||||
show_histogram_svg(bins);
|
show_histogram_svg(bins);
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче