code: создаем гистограмму отдельно (2)

master
PodolskyNK 12 месяцев назад
Родитель 23e596abdb
Сommit 3fcd5ab840

@ -32,6 +32,10 @@
<Add option="-Wall" />
<Add option="-fexceptions" />
</Compiler>
<Unit filename="histogram.cpp" />
<Unit filename="histogram.h">
<Option target="&lt;{~None~}&gt;" />
</Unit>
<Unit filename="main.cpp" />
<Extensions>
<lib_finder disable_auto="1" />

@ -1,5 +1,5 @@
#include "histogram.h"
using namespace std;
static void find_minmax(const vector<double>& numbers, double& min, double& max)
{
min = numbers[0];
@ -16,9 +16,7 @@ static void find_minmax(const vector<double>& numbers, double& min, double& max)
}
}
}
vector<size_t>
make_histogram(const vector<double>& numbers, size_t& bin_count)
vector<size_t> make_histogram(const vector<double>& numbers, size_t& bin_count)
{
double min = 0;
double max = 0;

@ -1,8 +1,10 @@
#ifndef HISTOGRAM_H_INCLUDED
#define HISTOGRAM_H_INCLUDED
#include <vector>
std::vector<size_t>
make_histogram(const std::vector<double>& numbers, size_t bin_count);
#endif // HISTOGRAM_H_INCLUDED

@ -25,7 +25,6 @@ input_data() {
return in;
}
void
show_histogram_text(const vector<size_t>& bins, size_t& bin_count) {
const size_t SCREEN_WIDTH = 80;

Загрузка…
Отмена
Сохранить