t-dispatcher-round.cpp

Repair a candidate solution by sequentially applying several repairers on subparts of the solution (subparts being defined by the corresponding set of indexes). Only work on EOT that implements the "push_back( EOT::AtomType )" and "operator[](uint)" and "at(uint)" methods (i.e. random access containers).

Expects _addresses_ of the repairer operators.

Use the second template type if you want a different container to store indexes. You can use any iterable. For example, you may want to use a set if you need to be sure that indexes are use only once: edoRepairerDispatcher<EOT, std::set<unsigned int> > rpd; std::set<unsigned int> idx(1,1); idx.insert(2); rpd.add( idx, &repairer );

A diagram trying to visually explain how it works:

| /-\ | /------------\ | +---|---+ Dispatcher | | | v | | | |+-----+| --------------------------------+ | || x_0 || +-+-+-+ | +------------\ | /-\ | |+-----+| |2|3|5+*----*-* Repairer A +---|---+ | | || x_1 || +-+-+-+ | | | | v | | | |+-----+| | | | |+-----+| | | || x_2 || | | | || x_2 || | | |+-----+| | | | |+-----+| | | || x_3 || | | | || x_3 || | | |+-----+| | | | |+-----+| | | || x_4 || | | | || x_5 || | | |+-----+| | | | |+-----+| | | || x_5 || | | | | | | | | |+-----+| | | | +---|---+ | | || x_6 || | | \------------/ | \-/ | |+-----+| <-------------------------------+ | || x_7 || | | | |+-----+| +-+-+ | | | || x_8 || |2|3+*------+ | |+-----+| +-+-+ | | || x_9 || | | |+-----+| +-+-+ | +------------\ /-\ | | | | |1|5+*--------* Repairer B +-------+ | | | | | +-+-+ | | | | | | | | | | | | | | | | | | | | +-------+ | | +---|---+ | \------------/ \-/ \-/ | \------------/ v

All Classes Functions Variables Typedefs