29    template<
typename Filter_>
 
   34      typedef std::deque<std::pair<String, Filter_>> 
BaseClass;
 
   52      template <
typename DT2_, 
typename IT2_>
 
   56      template <
typename DT2_, 
typename IT2_>
 
   81        for(
auto it = ids_.begin(); it != ids_.end(); ++it)
 
   85          BaseClass::push_back(std::make_pair<String, Filter_>(std::move(
id), std::move(new_filter)));
 
   99          static_cast<BaseClass&
>(*this) = std::forward<BaseClass>(other);
 
  109        result.resize(this->size());
 
  111        for(
size_t i(0); i < result.size(); ++i)
 
  113          result.at(i).first = this->at(i).first;
 
  114          result.at(i).second.
clone(this->at(i).second, clone_mode);
 
  127          BaseClass::push_back(std::make_pair<String, InnerFilterType>(it->first, it->second->clone(clone_mode)));
 
  134      template<
typename OtherFilter_>
 
  139        BaseClass::resize(other.size());
 
  141        for(
size_t i(0); i < this->size(); ++i)
 
  143          this->at(i).first = other.at(i).first;
 
  144          this->at(i).second.convert(other.at(i).second);
 
  151        std::size_t my_bytes(0);
 
  153        for(
size_t i(0); i < this->size(); ++i)
 
  155          my_bytes += this->at(i).second.bytes();
 
  161      Filter_& find_or_add(
const String& name)
 
  163        for(
iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  165          if(it->first == name)
 
  169        this->push_back(std::make_pair(name, Filter_()));
 
  170        return this->back().second;
 
  175      template<
typename Vector_>
 
  178        for(
const_iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  179          it->second.filter_rhs(vector);
 
  183      template<
typename Vector_>
 
  186        for(
const_iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  187          it->second.filter_sol(vector);
 
  191      template<
typename Vector_>
 
  194        for(
const_iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  195          it->second.filter_def(vector);
 
  199      template<
typename Vector_>
 
  202        for(
const_iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  203          it->second.filter_cor(vector);
 
  207      template<
typename Matrix_>
 
  210        for(
const_iterator it(BaseClass::begin()); it != BaseClass::end(); ++it)
 
  211          it->second.filter_mat(matrix);
 
Sequence of filters of the same type.
FilterSequence & operator=(FilterSequence &&other)
move-assign operator
void clone(const FilterSequence &other, CloneMode clone_mode=CloneMode::Deep)
Clones data from another FilterSequence.
Filter_ InnerFilterType
The type of the filter that gets applied in sequence.
std::deque< std::pair< String, Filter_ > > BaseClass
Our baseclass.
FilterSequence(const std::deque< String > &ids_)
Constructs a FilterSequence of empty filters.
void convert(const FilterSequence< OtherFilter_ > &other)
Converts another FilterSequence to this type.
void filter_mat(Matrix_ &matrix) const
Applies the filter onto a system matrix.
virtual ~FilterSequence()
Empty virtual destructor.
BaseClass::const_iterator const_iterator
Use the baseclass' const_iterator.
FilterSequence()
Empty default constructor.
void filter_def(Vector_ &vector) const
Applies the filter onto a defect vector.
Filter_::DataType DataType
The filter's floating point type.
void filter_cor(Vector_ &vector) const
Applies the filter onto a correction vector.
Filter_::IndexType IndexType
The filter's index type.
FilterSequence clone(CloneMode clone_mode=CloneMode::Deep) const
Creates a clone of itself.
void filter_rhs(Vector_ &vector) const
Applies the filter onto the right-hand-side vector.
void filter_sol(Vector_ &vector) const
Applies the filter onto the solution vector.
std::size_t bytes() const
Returns the total amount of bytes allocated.
Filter_::VectorType VectorType
The type of vector the filter can be applied to.
BaseClass::iterator iterator
Use the baseclass' iterator.
String class implementation.