/*****************************************************************************/ // Copyright (c) Illumina 2008 // Author: Richard Shaw // // This software is covered by the "Illumina Genome Analyzer Software // License Agreement" and the "Illumina Source Code License Agreement", // and certain third party copyright/licenses, and any user of this // source file is bound by the terms therein (see accompanying files // Illumina_Genome_Analyzer_Software_License_Agreement.pdf and // Illumina_Source_Code_License_Agreement.pdf and third party // copyright/license notices). /*****************************************************************************/ #include "statistics/Cum_Errs.h" /*****************************************************************************/ void Cum_Errs::set_num_cycles(const unsigned int num_cycles) { my_num_cycles = num_cycles; my_cum_errs.resize(num_cycles * max_to_count); } /*****************************************************************************/ std::ostream& operator<<(std::ostream& ostrm, const Cum_Errs& cum_errs) { ostrm << "Cycle:"; for (unsigned int num_errs(1); num_errs <= cum_errs.max_to_count; ++num_errs) { ostrm << "\t" << num_errs; } ostrm << std::endl; unsigned int ele_ind(0); for (unsigned int cycle_num(1); cycle_num <= cum_errs.my_num_cycles; ++cycle_num) { ostrm << cum_errs.my_cycle_prefix_ch << cycle_num; for (unsigned int num_errs(1); num_errs <= cum_errs.max_to_count; ++num_errs) { ostrm << "\t" << cum_errs.my_cum_errs[ele_ind++]; } ostrm << std::endl; } ostrm << std::endl; return ostrm; } /*****************************************************************************/