nojhan/paradiseo — pull request #33 by nevik (2013-09-18 11:46:02+00:00)
Title: Add filtered operators and initializer

These three classes are variants of the standard initializer (`eoInit`) and the main operators (`eoMonOp` and `eoQuadOp`) which filter the output individuals by a simple mechanism:

* create an instance `C`, which takes an object of its superclass to do the actual work
* add an arbitrary number of filter functions with the signature `bool function(EOT individual)`
* when `operator()` is called on `C`,
* the operators will call their underlying operator to create one or two new individuals, and then apply all filter functions; if any of them returns `false` ( *"not accepted"* ), the created individual(s) is/are rejected and `operator()` will return `false` ( *"individual(s) unchanged"* )
* the initializer will call its underlying initializer to create one individual, and then apply all filter functions; if any of them returns `false` ( *"not accepted"* ), it will use the underlying initializer to create a new individual; this is repeated until the individual is accepted

Some points to consider and discuss:
* would you like to have tests for these classes? if so, do you have any guidelines for unit tests? (I have no experience with tests myself, but i'm willing to actively contribute)
* I will add some Doxygen comments soon
* shall `eoInitFilter` be renamed to `eoFilterInit` (so all classes follow a common scheme) ?
* do you think an analogous class for `eoBinOp` should be created?