data/train/cpp/323d6e1ca67ea9d4ed5ae3db303ae8a4000cfd92Sample.cc
Sample::value_type GetSampleFromNumber(const int sample_num)
    {
        // throw if not found
        if (sample_num < 0 or sample_num >= Sample::static_size)
        {
            throw std::domain_error("[dy::GetSampleInfo] Error: sample number out of bounds!");
        }
        return static_cast<Sample::value_type>(sample_num);
    }
// Get the Sample from a number
Get the Sample from a number
Get the Sample from a number
Sample::value_type GetSampleFromNumber(const int sample_num)
    {
        if (sample_num < 0 or sample_num >= Sample::static_size)
        {
            throw std::domain_error("[dy::GetSampleInfo] Error: sample number out of bounds!");
        }
        return static_cast<Sample::value_type>(sample_num);
    }
Sample :: value_type GetSampleFromNumber ( const int sample_num ) { if ( sample_num < 0 or sample_num >= Sample :: static_size ) { throw std :: domain_error ( " " ) ; } return static_cast < Sample :: value_type > ( sample_num ) ; }
Get the Sample from a number
Get the Sample from a number
// throw if not found