Back to Top page.

EGTEvaluation.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 $Id: EGTEvaluation.h,v 1.3 2002/11/21 12:28:41 motegi Exp $
00003 Copyright (C) 2002 Higuchi Lab. All rights reserved.
00004 
00005 *****************************************************************************/
00006 #ifndef INCLUDE__EVALUATION_H__FILE
00007 #define INCLUDE__EVALUATION_H__FILE
00008 
00017 template <class TP>
00018 class EGTEvaluation {
00019 public:
00020   typedef TP Pop;
00021   typedef typename Pop::Graph Graph;
00022 
00024   virtual ~EGTEvaluation() { }
00025 
00033   virtual void Evaluate(Pop& pop) {
00034     const UInt uPopMax = pop.GetNumGraphs();
00035     for (UInt i=0; i<uPopMax; ++i) {
00036       if (pop.GetGraph(i)->GetEvaluated() == false) {
00037         Evaluate(pop.GetGraph(i));
00038         pop.GetGraph(i)->SetEvaluated(true);
00039       }
00040     }
00041   }
00049   virtual void Evaluate(Graph* pg) = 0;
00050 };
00051 
00052 #endif //INCLUDE__EVALUATION_H__FILE
00053 
00054 
00055