Сравнить коммиты

..

Ничего общего в коммитах. '1aceeea07c4189e9429ce49d97f754ac7fc59a2b' и 'a606379143ec8a7d12e4075b11a464186673c96d' имеют совершенно разные истории.

@ -3,7 +3,7 @@
#include "histogram.h" #include "histogram.h"
#include "svg.h" #include "svg.h"
#include "text.h" #include "text.h"
#include <curl/curl.h> //#include "mycheck.h"
using namespace std; using namespace std;
@ -19,55 +19,53 @@ struct Input
}; };
Input Input
input_data(istream& in, bool promt) input_data(istream& in)
{ {
size_t number_count, bin_count, IMAGE_WIDTH; size_t number_count, bin_count, IMAGE_WIDTH;
if (promt) cerr << "Enter number count: "; cerr << "Enter number count: ";
in >> number_count; in >> number_count;
Input input; Input n;
cerr << " Input width of image, > 70 but not >800 : ";
if (promt) cerr << " Input width of image, > 70 but not >800 : "; in >> n.IMAGE_WIDTH;
in >> input.IMAGE_WIDTH; if(n.IMAGE_WIDTH < 70 || n.IMAGE_WIDTH > 800 ) {
if(input.IMAGE_WIDTH < 70 || input.IMAGE_WIDTH > 800 ) { while(n.IMAGE_WIDTH < 70 || n.IMAGE_WIDTH > 800) {
while(input.IMAGE_WIDTH < 70 || input.IMAGE_WIDTH > 800) { cerr << " Input width of image, >70 but not >800 : ";
if (promt) cerr << " Input width of image, >70 but not >800 : "; in >> n.IMAGE_WIDTH;
in >> input.IMAGE_WIDTH;
} }
} }
//size_t number_count = in.number_counts; //size_t number_count = in.number_counts;
input.numbers.resize( number_count ); n.numbers.resize( number_count );
if (promt) cerr << "Enter numbers: "; cerr << "Enter numbers: ";
// vector<double> numbers(number_count); // vector<double> numbers(number_count);
for (size_t i = 0; i < number_count; i++) for (size_t i = 0; i < number_count; i++)
{ {
in >> input.numbers[i]; in >> n.numbers[i];
} }
if (promt) cerr << "Count of baskets: "; cerr << "Count of baskets: ";
in >> input.bin_count; in >> n.bin_count;
return input; return n;
} }
int main() int main()
{ {
curl_global_init(CURL_GLOBAL_ALL);
auto input = input_data(cin, true); auto n = input_data(cin);
auto bins = make_histogram( input.numbers, input.bin_count ); auto bins = make_histogram( n.numbers, n.bin_count );
//int chek_block_width(in.IMAGE_WIDTH); //int chek_block_width(in.IMAGE_WIDTH);
//chek_block_width(in.IMAGE_WIDTH, in.number_count); //chek_block_width(in.IMAGE_WIDTH, in.number_count);
//if (chek_block_width==1) //if (chek_block_width==1)
show_histogram_svg( bins, input.IMAGE_WIDTH ); show_histogram_svg( bins,n.IMAGE_WIDTH );
//if(chek_block_width==0) return 0; //if(chek_block_width==0) return 0;
//show_histogram_svg(bins); //show_histogram_svg(bins);

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