src/Reservoir.cpp
int EchoBay::Reservoir::get_NrSWT(const int layer) const
{
    auto sumNrSWT = [](int sum, const ArrayI curr){return sum + curr.size();};
    auto finalLayer = (layer == -1) ? _WoutIndex.end() : _WoutIndex.begin() + layer;

    return 1 + std::accumulate(_WoutIndex.begin(), finalLayer, 0, sumNrSWT);
}
/**
 * @brief Return the sum of Nr across layers for SWT topology
 * 
 * @param layer number of layers. Default -1 counts all layers
 * @return int sum of SWT Nr across layers
 */
@brief Return the sum of Nr across layers for SWT topology

@param layer number of layers. Default -1 counts all layers
@return int sum of SWT Nr across layers
@brief Return the sum of Nr across layers for SWT topology @param layer number of layers . Default - 1 counts all layers @return int sum of SWT Nr across layers
int EchoBay::Reservoir::get_NrSWT(const int layer) const
{
    auto sumNrSWT = [](int sum, const ArrayI curr){return sum + curr.size();};
    auto finalLayer = (layer == -1) ? _WoutIndex.end() : _WoutIndex.begin() + layer;
    return 1 + std::accumulate(_WoutIndex.begin(), finalLayer, 0, sumNrSWT);
}
int EchoBay :: Reservoir :: get_NrSWT ( const int layer ) const { auto sumNrSWT = [ ] ( int sum , const ArrayI curr ) { return sum + curr . size ( ) ; } ; auto finalLayer = ( layer == -1 ) ? _WoutIndex . end ( ) : _WoutIndex . begin ( ) + layer ; return 1 + std :: accumulate ( _WoutIndex . begin ( ) , finalLayer , 0 , sumNrSWT ) ; }
@brief Return the sum of Nr across layers for SWT topology
@brief Return the sum of Nr across layers for SWT topology