Ejemplo n.º 1
0
// set the dataset for a specified map to zero for all killed bands
void BandPass::_zeroChannelsMap(const BinMap& map)
{
     foreach( const Range<float>& r, _killed.subranges() ) {
         int min = map.binIndex(r.min());
         int max = map.binIndex(r.max());
         if( max < min ) { int tmp; tmp = max; max = min; min = tmp; };
         int mapId=map.hash();
         if(_dataSets[mapId].size() < max ) _dataSets[mapId].resize(max + 1);
         do {
             _dataSets[mapId][min] = 0.0;
         } while( ++min <= max );
     }
}