From 28219fcc1216dab2cc2e75f855ce7a82a055ebf1 Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 18:02:03 +0000 Subject: [PATCH] makefiles almost work --- eo/src/Makefile.am | 6 +++--- eo/src/eoPopOps.h | 3 ++- eo/src/other/eoExternalEO.h | 2 +- eo/src/utils/Makefile.am | 2 +- eo/test/t-eolottery.cpp | 2 ++ 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 6bdcbd95c..59bfd6c16 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,11 +4,11 @@ ## ############################################################################### -SUBDIRS = es ga gp obsolete other utils +SUBDIRS = es ga gp obsolete utils # other lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.o eoPersistent.o -#libeo_a_LIBADD = libeoutils.a +libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp +libeo_a_LIBADD = obsolete/eoParserUtils.o utils/eoParser.o utils/eoRNG.o utils/eoState.o libeoincdir = $(includedir)/eo libeoinc_HEADERS = EO.h eoDup.h eoKill.h eoProportionalGOpSelector.h eoTournament.h eo1d.h eoEasyEA.h eoLottery.h eoProportionalOpSel.h eoTranspose.h eo1dWDistance.h eoEvalFunc.h eoMerge.h eoRandomBreed.h eoUniform.h eo2d.h eoEvalFuncPtr.h eoMutation.h eoRandomIndiSelector.h eoUniformSelect.h eo2dVector.h eoEvalFuncPtrCnt.h eoNegExp.h eoRandomSelect.h eoUniformXOver.h eoAlgo.h eoFactory.h eoNonUniform.h eoRank.h eoVector.h eoAtomBitFlip.h eoFitTerm.h eoNormal.h eoRnd.h eoWrappedOps.h eoAtomCreep.h eoFitness.h eoObject.h eoScalarFitness.h eoXOver2.h eoAtomMutation.h eoGOpBreeder.h eoOp.h eoScheme.h eoAtomMutator.h eoGOpSelector.h eoOpFactory.h eoSelectFactory.h eoBreeder.h eoID.h eoPersistent.h eoSteadyStateGeneration.h eoAtomRandom.h eoGenTerm.h eoOpSelMason.h eoSequentialGOpSelector.h eoBackInserter.h eoGeneration.h eoOpSelector.h eoSteadyStateEA.h eoDetTournament.h eoInclusion.h eoPop.h eoSteadyStateInserter.h eoDetTournamentIndiSelector.h eoIndiSelector.h eoPopOps.h eoStochTournament.h eoDetTournamentInserter.h eoInserter.h eoPrintable.h eoStochTournamentInserter.h eoDistance.h eoInsertion.h eoProportionalGOpSel.h eoTerm.h \ diff --git a/eo/src/eoPopOps.h b/eo/src/eoPopOps.h index 7324f6ee7..d92f00db6 100644 --- a/eo/src/eoPopOps.h +++ b/eo/src/eoPopOps.h @@ -92,7 +92,8 @@ class eoBinPopOp: public eoObject{ @param _parents the initial generation. Will be kept constant @param _siblings the created offspring. Will be usually an empty population */ - virtual void operator () ( eoPop& _parents, eoPop& _siblings ) = 0; + virtual void operator () (const eoPop& _parents, + eoPop& _siblings ) = 0; /** @name Methods from eoObject */ //@{ diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 7efe7786d..ab9b4816d 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -26,7 +26,7 @@ #ifndef eoExternalEO_h #define eoExternalEO_h -#include +#include // EO /** * Definition of an object that allows an external struct diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 294ad82c6..2a474e018 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -7,7 +7,7 @@ INCLUDES = -I$(top_builddir)/src lib_LIBRARIES = libeoutils.a -libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp +libeoutils_a_SOURCES = eoParser.cpp eoRNG.cpp eoState.cpp libeoincdir = $(includedir)/eo/utils libeoinc_HEADERS = compatibility.h eoParam.h eoRNG.h rnd_generators.h eoData.h eoParser.h eoState.h selectors.h diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp index 4579935ef..f4dfdb3b9 100644 --- a/eo/test/t-eolottery.cpp +++ b/eo/test/t-eolottery.cpp @@ -37,6 +37,7 @@ main() } cout << "original population:" << endl; + sort(pop.begin(), pop.end()); for (i = 0; i < pop.size(); i++) cout << pop[i] << " " << pop[i].fitness() << endl; @@ -44,6 +45,7 @@ main() lottery(pop, pop2); cout << "selected by lottery population:" << endl; + sort(pop2.begin(), pop2.end()); for (i = 0; i < pop2.size(); i++) cout << pop2[i] << " " << pop2[i].fitness() << endl;