src/DataStorage.cpp
int EchoBay::DataStorage::get_maxSamples(const uint8_t type, const int batch) const
{
    auto sumSamples = [](int sum, const ArrayI8 curr) { return sum + curr.count(); };
    int idx = (type == EchoBay::Train) ? 0 : 1;
    auto finalBatch = (batch == -1) ? _samplingBatches[idx].end() : _samplingBatches[idx].begin() + batch;
    int counter = std::accumulate(_samplingBatches[idx].begin(), finalBatch, 0, sumSamples);

    return counter;
}
/**
 * @brief get number of sampled state across all batches
 * 
 * @param type Train or validation
 * @return int number of sampled states
 */
@brief get number of sampled state across all batches

@param type Train or validation
@return int number of sampled states
@brief get number of sampled state across all batches @param type Train or validation @return int number of sampled states
int EchoBay::DataStorage::get_maxSamples(const uint8_t type, const int batch) const
{
    auto sumSamples = [](int sum, const ArrayI8 curr) { return sum + curr.count(); };
    int idx = (type == EchoBay::Train) ? 0 : 1;
    auto finalBatch = (batch == -1) ? _samplingBatches[idx].end() : _samplingBatches[idx].begin() + batch;
    int counter = std::accumulate(_samplingBatches[idx].begin(), finalBatch, 0, sumSamples);
    return counter;
}
int EchoBay :: DataStorage :: get_maxSamples ( const uint8_t type , const int batch ) const { auto sumSamples = [ ] ( int sum , const ArrayI8 curr ) { return sum + curr . count ( ) ; } ; int idx = ( type == EchoBay :: Train ) ? 0 : 1 ; auto finalBatch = ( batch == -1 ) ? _samplingBatches [ idx ] . end ( ) : _samplingBatches [ idx ] . begin ( ) + batch ; int counter = std :: accumulate ( _samplingBatches [ idx ] . begin ( ) , finalBatch , 0 , sumSamples ) ; return counter ; }
@brief get number of sampled state across all batches
@brief get number of sampled state across all batches