From 1fe3a72e10223b1dff3861f30528caa6cfcea02f Mon Sep 17 00:00:00 2001 From: gustavo Date: Thu, 30 Mar 2000 14:20:25 +0000 Subject: [PATCH] changing Makefile.am's to accept new subdiretory structure --- eo/configure.in | 8 +- eo/src/Makefile.am | 31 +++---- eo/src/eoLottery.h | 32 +++++--- eo/src/ga/eoBitOp.h | 2 +- eo/src/obsolete/eoParserUtils.cpp | 2 +- eo/src/obsolete/eoParserUtils.h | 2 +- eo/src/other/eoExternalEO.h | 3 +- eo/src/utils/selectors.h | 2 +- eo/test/Makefile.am | 2 +- eo/test/Makefile.in | 132 ++++++++++++++++++++++++------ eo/test/t-eolottery.cpp | 4 +- 11 files changed, 148 insertions(+), 72 deletions(-) diff --git a/eo/configure.in b/eo/configure.in index f089acf0..01614d93 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -3,13 +3,13 @@ AC_INIT(src/eo) dnl Change the version number here AM_INIT_AUTOMAKE(eo) -AC_PROG_CXX +AC_PROG_CXX -CXXFLAGS=-g +CXXFLAGS = -Wall -g -AM_PROG_LIBTOOL +AM_PROG_LIBTOOL AM_MAINTAINER_MODE dnl add Makefiles that must be modified by the configuration here -AC_OUTPUT(Makefile src/Makefile test/Makefile win/Makefile) +AC_OUTPUT(Makefile src/Makefile src/es/Makefile src/ga/Makefile src/gp/Makefile src/obsolete/Makefile src/other/Makefile src/utils/Makefile test/Makefile win/Makefile) diff --git a/eo/src/Makefile.am b/eo/src/Makefile.am index 95e80d9e..6bdcbd95 100644 --- a/eo/src/Makefile.am +++ b/eo/src/Makefile.am @@ -4,26 +4,17 @@ ## ############################################################################### +SUBDIRS = es ga gp obsolete other utils + lib_LIBRARIES = libeo.a -libeo_a_SOURCES = eoPrintable.cpp eoPersistent.cpp +libeo_a_SOURCES = eoPrintable.o eoPersistent.o +#libeo_a_LIBADD = libeoutils.a libeoincdir = $(includedir)/eo -libeoinc_HEADERS = EO.h eo eo1d.h eo1dWDistance.h eo2d.h \ - eo2dVector.h eoAged.h eoAlgo.h\ - eoAltBreeder.h \ - eoAtomBitFlip.h eoAtomCreep.h eoAtomMutation.h eoAtomMutator.h \ - eoAtomRandom.h eoBin.h eoBitOp.h eoBitOpFactory.h eoBreeder.h\ - eoData.h eoDetTournament.h eoDistance.h eoDup.h eoESChrom.h \ - eoESFullChrom.h eoESFullMut.h eoEasyEA.h\ - eoEvalFunc.h eoEvalFuncPtr.h eoEvalFuncPtrCnt.h eoFitTerm.h eoFitness.h\ - eoGenTerm.h eoGeneralOp.h eoGeneration.h eoGOpSelector.h eoID.h\ - eoInclusion.h eoInsertion.h\ - eoKill.h eoLottery.h eoMerge.h eoMultiBinOp.h eoMultiMonOp.h eoMutation.h eoNegExp.h\ - eoNonUniform.h eoNormal.h eoObject.h eoOp.h eoOpSelector.h\ - eoParser.h eoPersistent.h eoPop.h eoPopOps.h eoPrintable.h\ - eoProblem.h eoProportionalGOpSel.h eoProportionalOpSel.h eoRNG.h\ - eoRnd.h eoString.h\ - eoStochTournament.h eoTerm.h eoTranspose.h eoUniform.h \ - eoUniformSelect.h eoUniformXOver.h eoVector.h eoXOver2.h - - +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 \ + es/eoESFullChrom.h es/eoESChrom.h es/eoESFullMut.h \ + ga/eoBin.h ga/eoBitOp.h ga/eoBitOpFactory.h \ + gp/eoParseTree.h gp/node_pool.h gp/parse_tree.h \ + obsolete/eoParser.h obsolete/eoParserUtils.h obsolete/eoProblem.h \ + other/eoStringMutation.h other/eoExternalEO.h other/eoString.h \ + utils/compatibility.h utils/eoData.h utils/eoParser.h utils/eoState.h utils/eoRNG.h utils/rnd_generators.h utils/selectors.h utils/eoParam.h \ No newline at end of file diff --git a/eo/src/eoLottery.h b/eo/src/eoLottery.h index de8d978d..d9816d5b 100644 --- a/eo/src/eoLottery.h +++ b/eo/src/eoLottery.h @@ -28,10 +28,13 @@ //----------------------------------------------------------------------------- -#include // -#include // accumulate -#include "utils/selectors.h" -#include // eoPop eoSelect MINFLOAT +#include // logic_error +#include // sum_fitness + +// #include // +// #include // accumulate +// #include // eoPop eoSelect MINFLOAT + //----------------------------------------------------------------------------- /** eoLottery: a selection method. Puts into the output a group of individuals @@ -45,12 +48,11 @@ template class eoLottery: public eoBinPopOp { public: /// (Default) Constructor. - eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate(_rate) + eoLottery(const float& _rate = 1.0): eoBinPopOp(), rate_(_rate) { if (minimizing_fitness()) { - eoMinimizingFitnessException up(*this); - throw up; // :-) + throw logic_error("eoLottery: minimizing fitness"); } } @@ -61,23 +63,27 @@ template class eoLottery: public eoBinPopOp */ void operator()( eoPop& pop, eoPop& breeders) { - int target = (int)(rate * pop.size()); + int target = static_cast(rate_ * pop.size()); + /* Gustavo: uncomment this if it must be here // test of consistency if (breeders.size() >= target) { throw("Problem in eoLottery: already too many offspring"); - } - + } + double total; try { - total = sum_fitness(pop); + total = sum_fitness (pop); } catch (eoNegativeFitnessException&) { // say where it occured... throw eoNegativeFitnessException(*this); } + */ + + double total = sum_fitness (pop); // selection of chromosomes while (breeders.size() < target) @@ -86,10 +92,10 @@ template class eoLottery: public eoBinPopOp } } - double Rate(void) const { return rate; } + double rate(void) const { return rate_; } private: - double rate; // selection rate + double rate_; // selection rate }; //----------------------------------------------------------------------------- diff --git a/eo/src/ga/eoBitOp.h b/eo/src/ga/eoBitOp.h index 754313e8..b1bab4b5 100644 --- a/eo/src/ga/eoBitOp.h +++ b/eo/src/ga/eoBitOp.h @@ -182,7 +182,7 @@ template class eoBinPrev: public eoMonOp }; -/** eoBinCrossover --> classic crossover */ +/** eoBinCrossover --> classic 2-point crossover */ template class eoBinCrossover: public eoQuadraticOp { diff --git a/eo/src/obsolete/eoParserUtils.cpp b/eo/src/obsolete/eoParserUtils.cpp index 084af77c..dea8ed09 100644 --- a/eo/src/obsolete/eoParserUtils.cpp +++ b/eo/src/obsolete/eoParserUtils.cpp @@ -27,7 +27,7 @@ void InitRandom( Parser & parser) { s << _seed; parser.setParamValue("--seed", s.str()); // so it will be printed out in the status file, and canbe later re-used to re-run EXACTLY the same run } -#error This does not work: load and save the entire state of the rng object. + //#error This does not work: load and save the entire state of the rng object. rng.reseed(_seed); return; diff --git a/eo/src/obsolete/eoParserUtils.h b/eo/src/obsolete/eoParserUtils.h index 4bd8dc45..6ee91d50 100644 --- a/eo/src/obsolete/eoParserUtils.h +++ b/eo/src/obsolete/eoParserUtils.h @@ -14,7 +14,7 @@ Modifications.: #ifndef EO_PARSER_UTILS #define EO_PARSER_UTILS -#include +#include #include /// Reproducible random seed diff --git a/eo/src/other/eoExternalEO.h b/eo/src/other/eoExternalEO.h index 8ca43e71..294b26bd 100644 --- a/eo/src/other/eoExternalEO.h +++ b/eo/src/other/eoExternalEO.h @@ -26,7 +26,7 @@ #ifndef eoExternalEO_h #define eoExternalEO_h -#include "EO.h" +#include /** * Definition of an object that allows an external struct @@ -65,3 +65,4 @@ class eoExternalEO : public EO, virtual public External }; +#endif diff --git a/eo/src/utils/selectors.h b/eo/src/utils/selectors.h index 2b5290f5..bb99bb2d 100644 --- a/eo/src/utils/selectors.h +++ b/eo/src/utils/selectors.h @@ -78,7 +78,7 @@ double sum_fitness(It begin, It end) { double v = static_cast(begin->fitness()); if (v < 0.0) - throw std::logical_error("Negative Fitness Encountered"); + throw std::logic_error("sum_fitness: negative fitness value encountered"); sum += v; } diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 4f27af5a..580c1922 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,7 +9,7 @@ EXTRA_DIST = LICENSE ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/ga -I$(top_builddir)/src/utils LDADDS = $(top_builddir)/src/libeo.a ############################################################################### diff --git a/eo/test/Makefile.in b/eo/test/Makefile.in index 577d6fed..95304ceb 100644 --- a/eo/test/Makefile.in +++ b/eo/test/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4a from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -49,10 +49,9 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -73,9 +72,9 @@ LN_S = @LN_S@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ NM = @NM@ +OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ -USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ VERSION = @VERSION@ DEPS = $(top_builddir)/src/libeo.a @@ -83,7 +82,7 @@ EXTRA_DIST = LICENSE ############################################################################### -INCLUDES = -I$(top_builddir)/src +INCLUDES = -I$(top_builddir)/src -I$(top_builddir)/src/ga -I$(top_builddir)/src/utils LDADDS = $(top_builddir)/src/libeo.a ############################################################################### @@ -300,6 +299,14 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best +DEP_FILES = .deps/t-eo.P .deps/t-eo2dVector.P .deps/t-eoAtomOps.P \ +.deps/t-eoESFull.P .deps/t-eoESOps.P .deps/t-eoEasyEA.P \ +.deps/t-eoGOpSel.P .deps/t-eoGeneralOps.P .deps/t-eoNonUniform.P \ +.deps/t-eoRandom.P .deps/t-eoUniform.P .deps/t-eoVector.P \ +.deps/t-eoaltbreeder.P .deps/t-eobin.P .deps/t-eobreeder.P \ +.deps/t-eofitness.P .deps/t-eogeneration.P .deps/t-eoinclusion.P \ +.deps/t-eoinsertion.P .deps/t-eolottery.P .deps/t-eoproblem.P \ +.deps/t-parser.P .deps/t-selectOne.P SOURCES = $(t_eobreeder_SOURCES) $(t_eoinclusion_SOURCES) $(t_eoinsertion_SOURCES) $(t_eo_SOURCES) $(t_eofitness_SOURCES) $(t_eoproblem_SOURCES) $(t_eobin_SOURCES) $(t_eolottery_SOURCES) $(t_eo2dVector_SOURCES) $(t_eogeneration_SOURCES) $(t_eoEasyEA_SOURCES) $(t_eoNonUniform_SOURCES) $(t_eoUniform_SOURCES) $(t_eoRandom_SOURCES) $(t_parser_SOURCES) $(t_eoESFull_SOURCES) $(t_eoESOps_SOURCES) $(t_eoAtomOps_SOURCES) $(t_selectOne_SOURCES) $(t_eoaltbreeder_SOURCES) $(t_eoGeneralOps_SOURCES) $(t_eoGOpSel_SOURCES) $(t_eoVector_SOURCES) OBJECTS = $(t_eobreeder_OBJECTS) $(t_eoinclusion_OBJECTS) $(t_eoinsertion_OBJECTS) $(t_eo_OBJECTS) $(t_eofitness_OBJECTS) $(t_eoproblem_OBJECTS) $(t_eobin_OBJECTS) $(t_eolottery_OBJECTS) $(t_eo2dVector_OBJECTS) $(t_eogeneration_OBJECTS) $(t_eoEasyEA_OBJECTS) $(t_eoNonUniform_OBJECTS) $(t_eoUniform_OBJECTS) $(t_eoRandom_OBJECTS) $(t_parser_OBJECTS) $(t_eoESFull_OBJECTS) $(t_eoESOps_OBJECTS) $(t_eoAtomOps_OBJECTS) $(t_selectOne_OBJECTS) $(t_eoaltbreeder_OBJECTS) $(t_eoGeneralOps_OBJECTS) $(t_eoGOpSel_OBJECTS) $(t_eoVector_OBJECTS) @@ -307,9 +314,9 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .cc .cpp .lo .o .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -323,9 +330,6 @@ distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: -.c.o: - $(COMPILE) -c $< - .s.o: $(COMPILE) -c $< @@ -342,9 +346,6 @@ distclean-compile: maintainer-clean-compile: -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< - .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< @@ -495,16 +496,91 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = test distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu test/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done + +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cc + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cc + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cpp + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cpp + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp info-am: info: info-am dvi-am: @@ -527,7 +603,7 @@ uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: @@ -541,27 +617,27 @@ distclean-generic: maintainer-clean-generic: mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ - clean-generic mostlyclean-am + clean-depend clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-noinstPROGRAMS distclean-compile \ - distclean-libtool distclean-tags distclean-generic \ - clean-am + distclean-libtool distclean-tags distclean-depend \ + distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-tags maintainer-clean-generic \ - distclean-am + maintainer-clean-tags maintainer-clean-depend \ + maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." @@ -572,12 +648,14 @@ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean ############################################################################### diff --git a/eo/test/t-eolottery.cpp b/eo/test/t-eolottery.cpp index 8ee3bc19..4579935e 100644 --- a/eo/test/t-eolottery.cpp +++ b/eo/test/t-eolottery.cpp @@ -45,8 +45,8 @@ main() cout << "selected by lottery population:" << endl; for (i = 0; i < pop2.size(); i++) - cout << pop2[i] << " " << pop2[i].fitness() << endl; - + cout << pop2[i] << " " << pop2[i].fitness() << endl; + return 0; }