This repository has been archived on 2026-03-28. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
eodev/eo/tutorial/ParadisEO/Lesson2/SlaveDistEvalBitEA.cpp
evomarc a1fffff045 Changing the include file that contain all include from
eoparadiseo to eoparadiseo.h
because teh CVS tool in Microsoft Windaube doesn't make the difference
with the directory ParadisEO
2002-04-12 14:39:58 +00:00

41 lines
755 B
C++

#include <stdexcept> // runtime_error
#include <iostream> // cout
#include <strstream> // ostrstream, istrstream
#include <paradiseo.h>
#include <ga.h>
typedef eoBit<double> Indi; // A bitstring with fitness double
#include "binary_value.h"
void main_function(int argc, char **argv) {
eoEvalFuncPtr <Indi, double, const vector <bool> & > eval (binary_value) ;
eoListener <Indi> listen (argc, argv) ;
eoEvaluator <Indi> evaluator ("Mars",
listen,
eval) ;
// Runs
evaluator () ;
}
// A main that catches the exceptions
int main(int argc, char **argv)
{
try
{
main_function(argc, argv);
}
catch(exception& e)
{
cout << "Exception: " << e.what() << '\n';
}
return 1;
}