/*****************************************************************************/ // 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/Base_Calls.h" /*****************************************************************************/ void init_table(const std::string& str, std::valarray& table) { const unsigned int num_char_codes(2 << 8); table.resize(num_char_codes, 0); unsigned int code_val(0); for (std::string::const_iterator ch_citer(str.begin()); ch_citer != str.end(); ++ch_citer) { table[*ch_citer] = code_val++; } } /*****************************************************************************/