* indentations + whitespace cleanup
This commit is contained in:
parent
8457e39efe
commit
56c6edab04
285 changed files with 6068 additions and 6223 deletions
|
|
@ -53,7 +53,7 @@ the original population, is an instantiation of the next population and
|
|||
has often a selection function embedded in it to select new individuals.
|
||||
|
||||
Note that the actual work is performed in the apply function.
|
||||
AND that the apply function is responsible for invalidating
|
||||
AND that the apply function is responsible for invalidating
|
||||
the object if necessary
|
||||
*/
|
||||
template <class EOT>
|
||||
|
|
@ -72,8 +72,8 @@ class eoGenOp : public eoOp<EOT>, public eoUF<eoPopulator<EOT> &, void>
|
|||
|
||||
void operator()(eoPopulator<EOT>& _pop)
|
||||
{
|
||||
_pop.reserve( max_production() );
|
||||
apply(_pop);
|
||||
_pop.reserve( max_production() );
|
||||
apply(_pop);
|
||||
}
|
||||
|
||||
//protected :
|
||||
|
|
@ -114,10 +114,10 @@ class eoBinGenOp : public eoGenOp<EOT>
|
|||
public:
|
||||
eoBinGenOp(eoBinOp<EOT>& _op) : op(_op) {}
|
||||
|
||||
unsigned max_production(void) { return 1; }
|
||||
unsigned max_production(void) { return 1; }
|
||||
|
||||
/** do the work: get 2 individuals from the population, modifies
|
||||
only one (it's a eoBinOp)
|
||||
only one (it's a eoBinOp)
|
||||
*/
|
||||
void apply(eoPopulator<EOT>& _pop)
|
||||
{
|
||||
|
|
@ -169,9 +169,9 @@ class eoQuadGenOp : public eoGenOp<EOT>
|
|||
void apply(eoPopulator<EOT>& _pop)
|
||||
{
|
||||
EOT& a = *_pop;
|
||||
EOT& b = *++_pop;
|
||||
|
||||
|
||||
EOT& b = *++_pop;
|
||||
|
||||
|
||||
if(op(a, b))
|
||||
{
|
||||
a.invalidate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue