std::vector<std::vector<double> > DataCard::get_uncertainty_vectors(double signal_error, std::vector<double> bg_errors) { int size = bg_errors.size() + 1; std::vector<std::vector<double> > error_lines(size, std::vector<double>(size)); error_lines[0] = get_zeros(size); error_lines[0][0] = signal_error; for (int i = 0; i < bg_errors.size() ; i++) { error_lines[i+1] = get_zeros(size); error_lines[i+1][i+1] = bg_errors[i]; std::cout << error_lines[i+1][i+1] << std::endl; } return error_lines; }
int main(){ int number = 100; int zeros = get_zeros(number); printf("Number of zeros in %d factorial = %d\n", number, zeros); return 0; }