| 85 | |
| 86 | template<typename Tag> |
| 87 | typename ColorMapAggregator<Tag>::ColorMap ColorMapAggregator<Tag>::aggregate( const ElementBitSet& elementBitSet ) |
| 88 | { |
| 89 | if ( elementBitSet.none() ) |
| 90 | return {}; |
| 91 | int last = elementBitSet.find_last(); |
| 92 | if ( needUpdate_ ) |
| 93 | updateAggregated_( last + 1 ); |
| 94 | else if ( last >= aggregatedColorMap_.size() ) |
| 95 | aggregatedColorMap_.resize( last + 1, defaultColor_ ); |
| 96 | |
| 97 | ColorMap res( elementBitSet.size() ); |
| 98 | for ( const auto& e : elementBitSet ) |
| 99 | res[e] = aggregatedColorMap_[e]; |
| 100 | |
| 101 | return res; |
| 102 | } |
| 103 | |
| 104 | template<typename Tag> |
| 105 | bool ColorMapAggregator<Tag>::checkInputData_( const PartialColorMap& partitialColorMap ) |