From 2af4074c2c7dd266f85e384502e7f11db5956ce7 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 20 Apr 2000 10:48:07 +0000 Subject: [PATCH] Remove eoBinaryTerm, should not have been here in the first place --- eo/src/eoTerm.h | 70 ------------------------------------------------- 1 file changed, 70 deletions(-) diff --git a/eo/src/eoTerm.h b/eo/src/eoTerm.h index e21b84ef..198cb939 100644 --- a/eo/src/eoTerm.h +++ b/eo/src/eoTerm.h @@ -52,75 +52,5 @@ public: virtual bool operator() ( const eoPop< EOT >& _pop ) = 0 ; }; - -/** eoParamTerm, a terminator that compares two statistics and decides whether the - * algorithm should stop or not. -*/ - -#include - -template -class eoBinaryTerm : public eoTerm -{ -public : - - typedef typename Pred::first_argument_type first_argument_type; - typedef typename Pred::second_argument_type second_argument_type; - - /// Ctors/dtors - eoBinaryTerm(first_argument_type& _param1, second_argument_type& _param2) : param1(_param1), param2(_param2), compare() {} - - virtual ~eoBinaryTerm() {}; - - /** - */ - virtual bool operator() ( const eoPop< EOT >& _pop ) - { - return compare(param1, param2); - } - - /// Class name. - virtual string className() const { return "eoStatTerm"; } - -private : - - first_argument_type& param1; - second_argument_type& param2; - Pred compare; -}; - -#include -/** Combined termination condition for the genetic algorithm - * - * The eoCombinedTerm will perform a logical and on all the terminators - * contained in it. This means that the terminator will say stop (return false) - * when one of the contained terminators says so - * - * - * So now you can say: - - eoTerm1 term1; - eoTerm2 term2; - eoCombinedTerm term3(term1, term2); - - -template -class eoCombinedTerm : public eoTerm, public std::pair&, eoTerm& > -{ -public : - - eoCombinedTerm(const eoTerm& _first, const eoTerm& _second) : std::pair(_first, _second) {} - - ~eoCombinedTerm() {} - - bool operator()(const eoPop& _pop) - { - if (first(_pop)) - return second(_pop); - - return false; // quit evolution - } -}; -*/ #endif